I am on CentOS 6.7 and want to add two domain admins to the sudo group.
I have tried adding both users individully and both together see below:
someuser ALL=(ALL) ALL #THIS Works, but is not a domain account
%domain\ admins ALL=(ALL) ALL #this does not work
CS\domainUser ALL=(ALL) ALL #this does not work either
cs\domainUser ALL=(ALL) ALL #this does not work either
anotherdomainUser ALL=(ALL) ALL #this does not work either
When I su
into each doamin user then run the sudo
command I type my password as prompted and I get a wrong password error.
What am I doing wrong?
Best Answer
When you're doing groups, you need to have two backslashes. This tells Linux/sudo that you're escaping a backslash, otherwise, it treats it as something else.
%domain\\group ALL=(ALL) ALL