[Samba] getent passwd blank response

Rowland penny rpenny at samba.org
Mon Aug 17 09:36:14 UTC 2020

On 17/08/2020 10:20, L.P.H. van Belle via samba wrote:
> Hai,
>> I have an issue that "getent passwd SAMDOM\usrname" returns a blank response.
> And
>> Running "getent passwd" returns all the local users.
> Both results "are" correct.
> But have you tried this :
> getent passwd "SAMDOM\username"
> And does id username still work
Have you ever heard of this statement 'Cannot see the wood for the trees' ?

Totally missed that :-(

Unless you have in smb.conf (which are not recommended):

winbind enum users = yes

winbind enum groups = yes

Running 'getent passwd' and 'getent group' will only show local users 
and groups.

you need to specify a username or group, but if you also specify the 
workgroup name, you still will not get output unless it is specified 
correctly, this will not work:

getent passwd SAMDOM\username

But any of these will:

getent passwd SAMDOM\\username

getent passwd 'SAMDOM\username'

getent passwd "SAMDOM\username"

Of course, they all depend on smb.conf, nsswitch.conf and the links 
being setup correctly.


More information about the samba mailing list