Add new user -> swat core dump

Pierre Dehaen dehaen at drever.be
Fri Nov 23 06:29:09 GMT 2001


Hello,

I have a problem when I try to create a new user with swat. I used binaries of 
Samba 2.2.2 coming from www.samba.org and from www.sunfreeware.com 
on Solaris 2.6 and on 8. I also compiled the sources and the result is the 
same.

When I click on "Add New User"  (Server Password Management), I receive 
a nearly blank page: I can only see the samba gif on top and the user is not 
created in the smbpasswd file. The source of that html page ends with:

--------------------------[start]
...
<input type=submit name=chg_s_passwd_flag value="Change Password">
<input type=submit name=add_user_flag value="Add New User">
<input type=submit name=delete_user_flag value="Delete User">
<input type=submit name=disable_user_flag value="Disable User">
<input type=submit name=enable_user_flag value="Enable User">
<p></FORM>
--------------------------[end]



This problem does not appear when I use a non existing unix user (I receive 
the same page back with an error message), nor when I delete an existing 
samba user, nor when I enable/disable a user. It only happens when I create 
a user or change the password of a user.


On the Solaris box, I can find a core file in the swat directory. If I truss (see 
the system calls) the inetd process and its childs, I see at the end:

---------------------------------------------[start]
...[27542 is the swat PID]...
27542:	open64("/usr/local/samba/private/smbpasswd", O_RDONLY) = 5
27542:	sigaction(SIGALRM, 0xEFFFEF98, 0x00000000)      = 0
27542:	alarm(5)                                        = 300
27542:	fcntl(5, F_SETLKW64, 0xEFFFF0A8)                = 0
27542:	alarm(0)                                        = 5
27542:	sigaction(SIGALRM, 0xEFFFEF98, 0x00000000)      = 0
27542:	fchmod(5, 0600)                                 = 0
27542:	read(5, " #   S a m b a   S M B  ".., 1024)     = 1024
27542:	read(5, " 5 C F A 4 E 6 5 D 6 6 2".., 1024)     = 1024
27542:	read(5, " 0 E 4 0 1 C : 7 9 7 D E".., 1024)     = 1024
27542:	read(5, " A B 8 0 1 4 6 F 5 7 4 9".., 1024)     = 1024
27542:	read(5, " 1 E 3 :\n m a r c e l p".., 1024)     = 1024
27542:	read(5, " [ U                    ".., 1024)     = 1024
27542:	read(5, " A 1 D 1 9 C 8 8 5 7 A 9".., 1024)     = 1024
27542:	read(5, " 4 3 5 B 5 1 4 0 4 E E :".., 1024)     = 1024
27542:	read(5, " F F 2 7 6 E 3 D 9 2 C A".., 1024)     = 1024
27542:	read(5, " a i : 1 4 1 : 0 1 2 3 7".., 1024)     = 204
27542:	read(5, 0x0014E074, 1024)                       = 0
27542:	sigaction(SIGALRM, 0xEFFFF0C8, 0x00000000)      = 0
27542:	alarm(5)                                        = 0
27542:	fcntl(5, F_SETLKW64, 0xEFFFF1D8)                = 0
27542:	alarm(0)                                        = 5
27542:	sigaction(SIGALRM, 0xEFFFF0C8, 0x00000000)      = 0
27542:	llseek(5, 0, SEEK_CUR)                          = 9420
27542:	close(5)                                        = 0
27542:	Incurred fault #6, FLTBOUNDS  %pc = 0x00099A90
27542:	siginfo: SIGSEGV SEGV_MAPERR addr=0x000000E9
27542:	Received signal #11, SIGSEGV [caught]
27542:	siginfo: SIGSEGV SEGV_MAPERR addr=0x000000E9
27542:	time()                                          = 1006354606
27542:	time()                                          = 1006354606
27542:	umask(022)                                      = 022
27542:	open64("", O_WRONLY|O_CREAT|O_TRUNC, 0666)      Err#2 
ENOENT
27542:	umask(022)                                      = 022
27542:	umask(022)                                      = 022
...[the last lines repeated several times]...
27542:	open64("", O_WRONLY|O_CREAT|O_TRUNC, 0666)      Err#2 
ENOENT
27542:	umask(022)                                      = 022
27542:	sigaction(SIGABRT, 0x00000000, 0xEFFFEA90)      = 0
27542:	write(1, " H T T P / 1 . 0   2 0 0".., 1696)    = 1696
27542:	sigaction(SIGABRT, 0xEFFFE960, 0xEFFFE9E0)      = 0
27542:	sigprocmask(SIG_UNBLOCK, 0xEFFFEA10, 0x00000000) = 0
27542:	getpid()                                        = 27542 [171]
27542:	kill(27542, SIGABRT)                            = 0
27542:	Received signal #6, SIGABRT [default]
27542:	siginfo: SIGABRT pid=27542 uid=0
27542:	*** process killed ***
171:	Received signal #18, SIGCLD, in poll() [caught]
171:	siginfo: SIGCLD CLD_DUMPED pid=27542 status=0x0006
...[171 is the inetd PID]...
---------------------------------------------[end]




I also set the "log level = 10" and "log file = /usr/local/samba/var/log.all" but 
this did not gave me any log ! I only saw in the truss that he was now and 
then trying to open a file "" (empty name). I changed the following line of 
debug.c from:
   pstring debugf     = "";
to:
   pstring debugf     = "/usr/local/samba/var/log.all";



This gave me the following log:
(note: this is comming from another computer after a fresh install - no 
smbpasswd)

--------------------------------[start]
[2001/11/23 13:38:38, 1] lib/debug.c:debug_message(247)
INFO: Debug class all level = 10   (pid 20671 from pid 20671)
doing parameter log file = /usr/local/samba/var/log.all
doing parameter max log size = 500
doing parameter timestamp logs = No
doing parameter keepalive = 0
doing parameter character set = ISO8859-1
[2001/11/23 13:38:38, 5] lib/util_unistr.c:load_unicode_map(532)
load_unicode_map: loading unicode map for codepage ISO8859-1.
doing parameter dns proxy = No
[2001/11/23 13:38:38, 2] param/loadparm.c:do_section(2902)
Processing section "[home]"
doing parameter comment = home Stuff
doing parameter path = /export/home
doing parameter read only = No
doing parameter guest ok = Yes
doing parameter browseable = No
[2001/11/23 13:38:38, 2] param/loadparm.c:do_section(2902)
Processing section "[doc]"
doing parameter comment = Samba documentation
doing parameter path = /usr/local/samba/doc
doing parameter guest ok = Yes
doing parameter browseable = No
[2001/11/23 13:38:38, 4] param/loadparm.c:lp_load(3343)
pm_process() returned Yes
[2001/11/23 13:38:38, 7] param/loadparm.c:lp_servicenumber(3442)
lp_servicenumber: couldn't find homes
lp_servicenumber: couldn't find printers
lp_servicenumber: couldn't find printers
check_access: allow = , deny =
pass_check: Checking password for user root (l=6)
pdb_getsampwnam: search by name: pms40
startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd
startsmbfilepwent_internal: unable to open file 
/usr/local/samba/private/smbpass
wd. Error was No such file or directory
unable to open passdb database.
==========================================================
INTERNAL ERROR: Signal 11 in pid 20671 (2.2.2)
Please read the file BUGS.txt in the distribution
==========================================================
PANIC: internal error
--------------------------------[end]




I used the following configuration file:
--------------------------------[start]
[global]
        workgroup = UNIX
        netbios name = DUNDEE
        server string = Samba Server
        interfaces = 192.9.200.38
        encrypt passwords = Yes
        map to guest = Bad User
        log level = 10
        log file = /usr/local/samba/var/log.all
        max log size = 500
        timestamp logs = No
        keepalive = 0
        character set = ISO8859-1
        dns proxy = No

[home]
        comment = home Stuff
        path = /export/home
        read only = No
        guest ok = Yes
        browseable = No
--------------------------------[end]



I tried to understand what happened through the source files but without 
success (got lost after a few hours).

I also tried to analyse the core file with "adb" but I'm not used to such a 
debugger and I don't know exactly what to do with it...

Regards,
Pierre
PS: It worked fine with 2.0.7 in the past.
E-mail:dehaen at ecam.be
Tel/Fax: +32 10 24 78 87
Mobile: +32 496 28 54 66





More information about the samba mailing list