[Samba] Precedence of usernames w/Winbind

Andrew Bartlett abartlet at samba.org
Sun Jul 14 07:44:02 GMT 2002

Nir Soffer wrote:
> I might be missing obvious here, but here goes:
> Samba 2.2.4.
> Using "winbind use default domain = <DOMAIN>" option usernames map
> correctly, however, when logging on from an W2K machine I still get
> the autogenerated UID instead of my NIS (Or /etc/passwd) UID.

Two points:

Why are you running winbind?  It seems you really just want
'security=domain', and don't need winbindd.

Secondly.  'winbind use sdefault domain =' is *NOT SUPPORTED* in 2.2. 
The option exists only becouse of a merge from HEAD, where we completed
implementation.  The 2.2 code has *known flaws* with this option in

> Both nis and files precede winbind in /etc/nsswitch.conf
> Commenting out winbind from /etc/nsswitch.conf works, which means
> there isn't some magic piece of code that communicates with winbind
> directly.
> If so - how come I get assigned my winbind UID and not my /etc/passwd
> UID? What exactly am I missing?

It does a lookup of 'domain\username' actually, and gets the UID from

> I was under the impression that all Samba does with lookups is a
> getpw* and doesn't muck about. Running getent passwd put my NIS UID
> _before_ the winbind UID. Shouldn't that mean that I would be assigned
> my normal UID before it turns to the autogenerated one?

Samba incresinly does all sorts of things...  Using getpw*() lookups
sometimes is not appropriate, or (as in this case) is simply done in a
way you might not quite expect.

Andrew Bartlett

Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net

More information about the samba mailing list