Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up Samba on a Linux machine running CentOS 6 (called localhost, and the AD computer I am connecting to is, and I have done everything successfully, except when I type

wbinfo -u

It shows a local user, LOCALHOST+[username] and also a domain user [username] below it. Oddly, when I do cat /etc/passwd, it doesn't show the local user account...

The problem I have is I want Samba to authenticate against the AD server first before the local user, so I set up /etc/nsswitch.conf as such

passwd: winbind files
shadow: winbind files
group: winbind files

But I believe that is not the right way to do it? Because I might potentially lock out the root access if there is a "root" user in the Active Directory DC.

Any thoughts as to why this is happening? I have also tried deleting the samba cache at /var/lib/samba and restarted the servers, but that LOCALHOST+[username] still shows up for some reason...

If I can remove that user, I can do

passwd: files winbind, etc

which is the right way.

Any help greatly appreciated!

share|improve this question
there is no root user in AD, the safe way to configure nsswitch is passwd: files winbind, we need to see your smb.conf – Dejan Nov 28 '13 at 19:18

Your Answer


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

Browse other questions tagged or ask your own question.