winbind/nsswitch issue

Ephi Dror ephi at
Wed May 12 02:27:48 GMT 2004

Hi All,

Is it possible to configure SAMBA/nsswitch that when SAMBA calls getpwnam,
nsswitch will only use winbind but if any other non SAMBA apps calls
getpwnam, nsswitch will use either "file" or "nis" BUT not "winbind".

In other words, if a user name "foo" is part of the windows domain as well
as in nis, I would like to have either winbind or nis  providing the passwd
struct depending on who actually called getpwnam.

It is like asking to have the order in /etc/nsswitch.conf put once as:

passwd  winbind nis   ->   for SAMBA


passed  nis  winbind   -> for none SAMBA apps

I thought about two solutions to that issue:

1. To have two different nsswitch.conf and to override the open calls of
SAMBA to check open of nsswitch.conf. It will open a private nsswitch.conf
that only have winbind as an option

2. To chroot samba to work on separate environment than the other apps.

Any other idea?


More information about the samba-technical mailing list