[Samba] {long} smbd maxes CPU when returning user details and loops...

Jamie Harris jamie at jharris.homeip.net
Mon Aug 5 00:56:28 GMT 2002

Hello all,

I've been using Samba for a few years now and have finally come across
problem that I can't seem to sort out myself so I thought I'd use your
instead...  Heres the situation.

I've got a Linux box (2.4.17) acting as a PDC for some
dual boot
Linux/NT boxen.  Currently users have a single home directory (over NIS
Linux and Samba to Windows) with separate passwords (NIS/smbpasswd
file). I've decided
to look into using PAM and Winbind to allow the use
of just the 'Windows' (read 'Samba') user
credentials for  logins.
Having successfully PAM'afied my Slackware and got Windbindd up
and cooking  the following happens.

When I run "getent passwd" it will return the users
from /etc/passwd on the local box fine, then return user details from the
NIS server, then itwill  pause for about 60 seconds before returning the list of Windows
users (the correct listin the  form DOMAIN+username).

During this 60 seconds smbd has maxed one of the
processors on the
server (it's a Dual PPro 200).  The same thing happens when you logon.

You enter your username (in  mycase NETLAB+jharris), you then wait a long
time, then you
enter your password, you wait a  long time, then you get
your prompt.  If the server is doing
anything else when you attempt to
logon PAM times out before it gets the user details

There is nothing unusual in the samba logs so I strace'd the smbd that
servicing my requests, here's where it gets strange!  Smbd successfully
opens smbpasswd,reads 4KB from the file (I'm on an Intel platform so this seems to make
sense).  It then openspasswd and reads a number of 4KB
pages which I assume its using to get details such as the
users shell etc to match up with the details from smbpasswd.  Before it
gets anywhere near theend of the passwd file it close the file, then opens the file again and
reads the _same_ pages!!It does this 38 times. Once its got bored on time 38 it then reads another
4KB page fromsmbpasswd and starts the process
again.  Hence the pause.

Any suggestions from you
gurus??  (And the rest of you for that matter ;))

I've posted the results of the strace's,
and my smb.conf incase this
is any use, beware that decompressing the traces lands you with
a 3MB'ish
and a 10MB'ish file.  The files at available at the following


If I've missed anything (it wouldn't surprise
me) then please mail me back
requesting the info.



 ***   This message was transmitted on 100% recycled
electrons     ***

More information about the samba mailing list