[PROBLEM FOUND] Samba logon bug

James Willard james at whispering.org
Sat Mar 13 05:08:15 GMT 1999


Luke,

   I have finally had the chance to sit down and figure out why I was not
able to get WinNT and Win95 to logon to my samba PDC. Judging from the
cause, I would guess that not everyone is seeing this bug.

   I haven't isolated the exact section of code that's at fault, but here is
what I've found so far. After smbd and nmbd are started, I attempt to logon
with my Win95 machine. Smbd fork()'s and goes into the routine to read the
smbpasswd file. Only, it hangs after reading the first line:

[pid  6517] open("/usr/local/samba/private/smbpasswd", O_RDONLY) = 8
[pid  6517] chmod("/usr/local/samba/private/smbpasswd", 0600) = 0
[pid  6517] read(8, "#\n#\n#\nhalt:7:XXXXXXXXXXXXXXXX"..., 1024) = 1024
[pid  6517] time(NULL)                  = 921300649
[pid  6517] write(3, "[1999/03/12 23:50:49, 6] lib/uti"..., 58) = 58
[pid  6517] write(3, "  getfileline: skipping comment "..., 46) = 46
[pid  6517] time(NULL)                  = 921300649
[pid  6517] write(3, "[1999/03/12 23:50:49, 6] lib/uti"..., 58) = 58
[pid  6517] write(3, "  getfileline: skipping comment "..., 46) = 46
[pid  6517] time(NULL)                  = 921300649
[pid  6517] write(3, "[1999/03/12 23:50:49, 6] lib/uti"..., 58) = 58
[pid  6517] write(3, "  getfileline: skipping comment "..., 46) = 46
<and it hangs, eating up cpu time>

   Now, my smbpasswd file looks like this:

#
# SMB password file.
#
halt:7:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:halt
operator:11:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:operator
root:0:blahblahblah:blahblahblah:[U          ]:LCT-36DF60BB:
shutdown:6:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:shutdown
sync:5:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:sync
bin:1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:bin
ftp:404:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:
daemon:2:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:daemon
adm:3:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:adm
lp:4:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:lp
mail:8:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:mail
postmaster:14:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:postmaster
<18 more entries snipped>

   Note: Passwords have been replaced ;)

   I have found that removing the first two user lines: halt and operator
causes smbd to parse the smbpasswd file normally and Win95 and NT can
magically log in again. Removing the 3 line comment has no effect.

   I will continue looking at this to find the bad section of code, but I
figured since you guys do this stuff every day, you could probably find the
problem much quicker than I can.

Keep me posted,

James Willard
james at whispering.org


-- 


More information about the samba-technical mailing list