Bug 11760 - creating a user with smbpasswd leads to a segfault
Summary: creating a user with smbpasswd leads to a segfault
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.3.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on: 11530
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 15:39 UTC by Rowland Penny
Modified: 2022-01-09 15:58 UTC (History)
0 users

See Also:


Attachments
gdb output (8.47 KB, text/plain)
2016-02-29 15:39 UTC, Rowland Penny
no flags Details
log file (28.23 KB, text/plain)
2016-02-29 15:39 UTC, Rowland Penny
no flags Details
smb.conf (1.02 KB, text/plain)
2016-02-29 15:40 UTC, Rowland Penny
no flags Details
user object (342 bytes, text/plain)
2016-02-29 15:41 UTC, Rowland Penny
no flags Details
gdb output (10.50 KB, text/plain)
2016-03-01 12:56 UTC, Rowland Penny
no flags Details
log file (30.80 KB, text/plain)
2016-03-01 12:57 UTC, Rowland Penny
no flags Details
user object (477 bytes, text/plain)
2016-03-01 12:57 UTC, Rowland Penny
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rowland Penny 2016-02-29 15:39:04 UTC
Created attachment 11876 [details]
gdb output

If you set Samba 4.3.5 as an NT4-style PDC with ldapsam:editposix (though the later may be a red herring, another user is getting the same problem and he is using ipasam) and then try to create a user with 'smbpasswd -a username', the command ends in a segfault.

You get asked for the users password (twice), the user is created in ldap, but the commands exits without adding the password to the user.

I have attached the smb.conf in use, a level 10 log, a copy of the users object in ldap and what happens when you run smbpasswd with gdb.
Comment 1 Rowland Penny 2016-02-29 15:39:50 UTC
Created attachment 11877 [details]
log file
Comment 2 Rowland Penny 2016-02-29 15:40:31 UTC
Created attachment 11878 [details]
smb.conf
Comment 3 Rowland Penny 2016-02-29 15:41:02 UTC
Created attachment 11879 [details]
user object
Comment 4 Martin Juhl 2016-02-29 15:55:54 UTC
I'm getting the same segfault, using ipasam... But my user doesn't gets created in the LDAP/FreeIPA...
Comment 5 Garming Sam 2016-02-29 21:28:56 UTC
Looks a bit like this bug: https://bugzilla.samba.org/show_bug.cgi?id=11530
(which has a fix in master)
Comment 6 Rowland Penny 2016-02-29 21:57:19 UTC
(In reply to Garming Sam from comment #5)

OK, I will download master from git and compile it.
Comment 7 Rowland Penny 2016-03-01 12:55:30 UTC
(In reply to Rowland Penny from comment #6)

OK, getting closer ;-)
smbpasswd from samba-master creates the user and adds the password, but it still segfaults, see attached files: new_user, new_gdb_result and new_log.wb-EXAMPLE
Comment 8 Rowland Penny 2016-03-01 12:56:38 UTC
Created attachment 11881 [details]
gdb output
Comment 9 Rowland Penny 2016-03-01 12:57:16 UTC
Created attachment 11883 [details]
log file
Comment 10 Rowland Penny 2016-03-01 12:57:58 UTC
Created attachment 11884 [details]
user object
Comment 11 Björn Jacke 2022-01-05 17:09:52 UTC
is this still a problem?
Comment 12 Rowland Penny 2022-01-05 17:31:22 UTC
(In reply to Björn Jacke from comment #11)
I have no idea, it is six years since I reported this and I no longer use an NT4-style PDC in any way and do not want to either.

Based on this and SMBv1 (hopefully) going away, shall we just close this ?
Comment 13 Rowland Penny 2022-01-09 15:58:41 UTC
(In reply to Rowland Penny from comment #12)
Okay, somewhere between 4.3.5 and 4.15.3 this must have got fixed, because it no longer segfaults. 
Closing as resolved.