Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm setting up an Ubuntu 11.04 server VM for use as a database server. It would make everyone's lives easier if we could have folks login using windows credentials and perhaps even make the machine work with the current AD-driven security we've got elsewhere.

The first leg of this was really easy to accomplish -- apt-get install likewise-open and I was pretty much in business. The problem I'm having is getting our admins into the sudoers groups -- I can't seem to get anything to take. I've tried:

a) usermod -aG sudoers [username]
b) adding the user names in several formats (DOMAIN\user, user@domain) to the sudoers file.

None of which seemed to take, I still get told "DOMAIN\user is not in the sudoers file. This incident will be reported."

So, how do I add non-local users to the sudoers?

share|improve this question

5 Answers 5

up vote 4 down vote accepted

I encounter this problem and here's my solution:

Edit /etc/sudoers: with the following entries

First check aduser using command id

#id <AD user>( #id domain\\aduser01 )

Results on mine:

SMB\aduser01@linux01:~/Desktop$ id smb\\aduser02
uid=914883676(SMB\aduser02) gid=914883073(SMB\domain^users) groups=914883073(SMB\domain^users),1544(BUILTIN\Administrators),1545(BUILTIN\Users),914883072(SMB\domain^admins)

getent passwd and gid NUMBERS doesn't work for me. DOMAIN\\domain^users works for me

%SMB\\domain^users ALL=(ALL) ALL

as we all know individual AD user works also

SMB\\<aduser01> ALL=(ALL) ALL
share|improve this answer

The best information I could find on the subject is here:


It basically asks you to modify your /etc/sudoers file with the correct configuration to allow the people in your administrator's group on AD to have access to all privileges.

If you need to be selective and restrict by user, you can do that too. But it warns that you must make sure to find out what the user's name on the linux system is by using getend passwd command as shown.

share|improve this answer
Thanks really could not figure out where to look. For the record, DOMIAN\\username works for individuals. –  Wyatt Barnett Sep 30 '11 at 18:38

Using Centify direct I have added domain user into /etc/sudoers file.

(Domain User) ALL=(ALL) ALL

share|improve this answer

we have a long domain name with .local sufix,

neighter the

%domainname\\group ALL=(ALL) ALL

nor the

%domainname.local\\group ALL=(ALL) ALL


but if I only use the groupname like this:

%Domain^Admins ALL=(ALL) ALL

it works.

share|improve this answer

I use the common command

sudo usermod -a -G sudo DOMAIN\username 

and replace DOMAIN\user with DOMAIN\\\username.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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