samba not using nscd (fwd)

Andrew Morgan morgan at
Thu Feb 27 15:51:38 GMT 2003

Reposting for the third time...  Please let me know if there is more or
different information needed, or where I might look to debug this further


---------- Forwarded message ----------
Date: Tue, 21 Jan 2003 13:37:43 -0800 (PST)
From: Andrew Morgan <morgan at>
To: samba-technical at
Subject: samba not using nscd

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...

Andy Morgan
Central Computing
Oregon State University

More information about the samba-technical mailing list