1

This question already has an answer here:

I want to give access domain admins group to sudoers access. I have come across with many commands but nun of works for me.

fname.lname ALL=(ALL) ALL

With this command i can give access to a particular user, But i want to give access to all the members of the domain admin group.

%DOMAINNAME\\domain\ admins ALL=(ALL) ALL
%DOMAINNAME\\domain\ admins ALL=(ALL) ALL
%DOM.DOMAINNAME.COM\\domain\ admins ALL=(ALL) ALL
DOMAINNAME\\domain\ admins ALL=(ALL) ALL
DOMAINNAME\\domain\ admins ALL=(ALL) ALL
DOM.DOMAINNAME.COM\\domain\ admins ALL=(ALL) ALL
%DOMAINNAME\\domain_admins ALL=(ALL) ALL

Like many commands i have tried but non out of these working.

My domain Group have two words i.e domain admins

Complete domain name is like: DOM.DOMAINNAME.COM

And short name is DOMAINNAME

Tell me how can i give access to sudoers for a group.

I am working on python scripting where it asks for sudo run but the user doesn't have sudo access or everytime no any domain user is entertain to enter credentials.

marked as duplicate by roaima, Jeff Schaller, G-Man, Mr Shunz, Thomas Jan 21 at 11:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

I have worked a lot on it, And after so many tries and searching i got this working

%domain\ admins ALL=(ALL) ALL

Since i was having DOMAIN name as two words i have to use: domain\ admins

domain admins

This was the exact group name i was having.

And % to specify group. and without % i would think it is take as username.

NO NEED TO SPECIFY DOMAIN That i was trying before. i.e:

%DOM.DOMAINNAME.COM\\domain\ admins ALL=(ALL) ALL
  • Sometimes it is necessary to use the domain prefix. It depends on the mechanism used to link to the external authenticator, winbind or sssd. You can see this in the flagged duplicate. – roaima Jan 21 at 8:35
  • Oh i can see that. But in my case i have used sssd so it is working fine. – Rajat jain Jan 21 at 10:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.