samba not using nscd

Andrew Morgan morgan at orst.edu
Tue Jan 21 21:38:00 GMT 2003


I've got samba installed on several different machines in my environment,
but samba on the linux machines doesn't seem to use nscd all the time.  On
my RedHat 7.1 machine running samba 2.2.7, it uses nscd for name lookups
initially, then decides to bypass nscd and lookup names directly.  I have
strace output showing this, if someone would like to look at it.  This
also happens on a Debian stable machine running samba 2.2.3a-12.

On my Solaris 8 machine running samba 2.2.7a, it correctly uses nscd for
all lookups.

You ask, why do I care?  I care because I am using nss_ldap on all of
these machines.  When it bypasses nscd, I get another connection to the
ldap server for every smbd process, which I'd like to avoid.

Could this be related to the user-switching between root and the
connected user that happens in samba?  The first time the smbd process
stops using nscd shows the following in the strace file:

fcntl64(4, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=592, len=1}, 0xbfffdca0) = 0
stat64("/users/u2/b/bishopc", 0xbfffe1e0) = -1 ENOENT (No such file or directory)
geteuid32()                             = 0
getegid32()                             = 0
getgroups32(0, [])                      = 0
geteuid32()                             = 0
getegid32()                             = 0
setgroups32(0, [])                      = 0
setresgid32(rgid 4294967295, egid 0, sgid 4294967295) = 0
getegid32()                             = 0
setresuid32(ruid 4294967295, euid 0, suid 4294967295) = 0
geteuid32()                             = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 19

at which point it starts loading the libnss_* libraries, etc, rather than
using the nscd socket which it has previously used.

If there is more information needed to track this down, just let me know
what to provide...

Thanks,
Andy Morgan
Central Computing
Oregon State University




More information about the samba-technical mailing list