[Samba] Why would nsswitch.conf be needed at all ?

Frederic Olivie alf at club.fr
Thu Jan 20 15:47:48 GMT 2005

> > I have setup a samba server as a domain member to share print queues.
> > As I'm doing print quotas, I need the users to be authenticated properly.
> > The setup works except that it appears that I need to add winbind to my nsswitch.conf.
> > This is kind of upsetting as I don't see a reason why I have to share windows users' namespace with my linux users base (mainly root and system users btw).
> > As far as samba is concerned, it creates uid/gid mappings on the fly. Why would it absolutely need the system to be able to resolve username/uids ?
> windbind does this exactly in order to be able to provide such
> information via NSS.  Samba is a UNIX process, it needs to know about
> the users.

I'm not sure I agree. Samba is a unix process which needs to know about a username/uid mapping. As it gets this information internally via winbind, I just don't understand why it has to make sure the mapping is also recognized by the system.

The only real use I see of the nsswitch.conf is to allow any other non samba software to get access to this mapping (/bin/ls as a simple example).

So, why would samba ever need to control that the system is able to do this mapping when everything happens internally (sending a job to cups is certainly not a case in which a usernam/uid mapping is usefull. It would only be if one chooses to use lprm from a shell under one of the domain users) ?

More information about the samba mailing list