Jamie Harris
2002-Aug-05 00:56 UTC
[Samba] {long} smbd maxes CPU when returning user details and loops...
Hello all, I've been using Samba for a few years now and have finally come across a problem that I can't seem to sort out myself so I thought I'd use your intelligence 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 to 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 back!!! There is nothing unusual in the samba logs so I strace'd the smbd that was 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 URL http://www.colute.net/samba/ If I've missed anything (it wouldn't surprise me) then please mail me back requesting the info. cheers Jamie... -- =-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *** This message was transmitted on 100% recycled electrons *** =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Gerald (Jerry) Carter
2002-Aug-05 10:05 UTC
[Samba] {long} smbd maxes CPU when returning user details and loops...
On Mon, 5 Aug 2002, Jamie Harris wrote:> 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 back!!!Try setting 'winbind enum user = no' and 'winbind enum group = no'. Hope this helps. cheers, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--