Why does 2.2.5 want to read /etc/passwd soooo many times?

Jamie Harris jamie at jharris.homeip.net
Thu Aug 8 01:29:02 GMT 2002


Hi all,

I've been posting on the general Samba list but haven't had any good
answers sothought I'd change my question a little for you guys.

My (2.2.5) smbd (on Linux 2.4.17)
maxes one of my server's processors (it's only a little dual PPro 200)
whenever a Linux boxusing Winbind requests any user details.  If winbind is enumerating users
then 'getentpasswd' holds a processor at 100% for about 2 mins, and attempting to
logon with a domain useron the Linux workstation isn't much better.  If I stop winbind enumerating
users thingsobviously improve with the getent but logons are still unusable (PAM will
time me out before Iget a password prompt!)

Anyway...  I strace'd the smbd in question and noticed that it
reads a bit of  smbpasswd, then reads a number of pages from passwd, then
closes passwd, thenopens passwd, reads some pages (the same ones I think!), closes passwd,
opens passwd etcetc...  It does this 38times for each 4KB page read from smbpasswd.

Can anyone shed any
light on this behaviour?  I would have thought that reading the passwd
file once you make a lotmore sense!!  A bug perhaps?  The only information smbd appears to need to
get from passwd is theusers read name which isn't important to me so is there anyway I can
disable thisbehaviour?

If anyone is interested the results of the process traces are available at
http://www.colute.net/samba but they're rather large when decompressed.

cheers all -
any comments greatly appreciated

Jamie...
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=-=
 ***      This message was transmitted on 100% recycled electrons     ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=






More information about the samba-technical mailing list