samba not using nscd (fwd)

Andrew Morgan morgan at orst.edu
Thu Feb 27 20:07:36 GMT 2003


That's what I thought too.  Samba is not linked to any ldap libraries
itself, but something is triggering it to not use nscd.  That's why I
mentioned the switch from user to root and back as a possibility.  I don't
know enough about nscd under linux to say.

My guess is that this is being done by glibc without samba's knowledge
(let's hope!), but if I knew what was triggering it maybe I could work
around it.  Has anyone else seen this behavior?

	Andy

On Thu, 27 Feb 2003, Jelmer Vernooij wrote:

>
> Isn't it up to libc to decide whether or not to use nscd? Or to nscd?
> Afaik there is no way that samba can actually _know_ about nscd.
>
> Jelmer
>
> On Thu, Feb 27, 2003 at 07:51:38AM -0800, Andrew Morgan wrote about 'samba not using nscd (fwd)':
>
> > 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
> > myself.
>
> > Thanks,
> > 	Andy
>
> > ---------- Forwarded message ----------
> > Date: Tue, 21 Jan 2003 13:37:43 -0800 (PST)
> > From: Andrew Morgan <morgan at orst.edu>
> > To: samba-technical at samba.org
> > 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...
>
> > Thanks,
> > Andy Morgan
> > Central Computing
> > Oregon State University
>
> --
> Jelmer Vernooij <jelmer at nl.linux.org> - http://nl.linux.org/~jelmer/
>  20:15:28 up 1 day,  6:28, 12 users,  load average: 0.09, 0.13, 0.05
>



More information about the samba-technical mailing list