root@testpdc:~# gdb smbpasswd GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from smbpasswd...done. (gdb) run -a ldap04 Starting program: /usr/local/samba/bin/smbpasswd -a ldap04 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1". INFO: Current debug levels: all: 10 tdb: 10 printdrivers: 10 lanman: 10 smb: 10 rpc_parse: 10 rpc_srv: 10 rpc_cli: 10 passdb: 10 sam: 10 auth: 10 winbind: 10 vfs: 10 idmap: 10 quota: 10 acls: 10 locking: 10 msdfs: 10 dmapi: 10 registry: 10 scavenger: 10 dns: 10 ldb: 10 tevent: 10 doing parameter printing = bsd doing parameter printcap name = /dev/null doing parameter store dos attributes = yes doing parameter map read only = no doing parameter map archive = no doing parameter dos filetime resolution = yes doing parameter fake directory create times = yes doing parameter csc policy = disable pm_process() returned Yes lp_servicenumber: couldn't find homes Netbios name list:- my_netbios_names[0]="TESTPDC" Attempting to register passdb backend smbpasswd Successfully added passdb backend 'smbpasswd' Attempting to register passdb backend tdbsam Successfully added passdb backend 'tdbsam' Attempting to register passdb backend wbc_sam Successfully added passdb backend 'wbc_sam' Attempting to register passdb backend samba_dsdb Successfully added passdb backend 'samba_dsdb' Attempting to register passdb backend samba4 Successfully added passdb backend 'samba4' Attempting to register passdb backend ldapsam Successfully added passdb backend 'ldapsam' Attempting to register passdb backend NDS_ldapsam Successfully added passdb backend 'NDS_ldapsam' Attempting to register passdb backend IPA_ldapsam Successfully added passdb backend 'IPA_ldapsam' Attempting to find a passdb backend to match ldapsam (ldapsam) Found pdb backend ldapsam smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=EXAMPLE))] smbldap_search_ext: base => [dc=example,dc=com], filter => [(&(objectClass=sambaDomain)(sambaDomainName=EXAMPLE))], scope => [2] The connection to the LDAP server was closed smb_ldap_setup_connection: ldap://localhost StartTLS issued: using a TLS connection smbldap_open_connection: connection opened ldap_connect_system: Binding to ldap server ldap://localhost as "cn=admin,dc=example,dc=com" ldap_connect_system: successful connection to the LDAP server ldap_connect_system: LDAP server does support paged results The LDAP server is successfully connected pdb backend ldapsam has a valid init New SMB password: Retype new SMB password: smbldap_search_ext: base => [dc=example,dc=com], filter => [(&(uid=ldap04)(objectclass=sambaSamAccount))], scope => [2] ldapsam_getsampwnam: Unable to locate user [ldap04] count=0 smbldap_search_ext: base => [dc=example,dc=com], filter => [(&(uid=ldap04)(objectClass=posixAccount))], scope => [2] smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=EXAMPLE))] smbldap_search_ext: base => [dc=example,dc=com], filter => [(&(objectClass=sambaDomain)(sambaDomainName=EXAMPLE))], scope => [2] attribute sambaNextGroupRid does not exist smbldap_make_mod: deleting attribute |sambaNextRid| values |1001| smbldap_make_mod: adding attribute |sambaNextRid| value |1002| smbldap_modify: dn => [sambaDomainName=EXAMPLE,dc=example,dc=com] pdb_set_username: setting username ldap04, was pdb_set_domain: setting domain EXAMPLE, was pdb_set_user_sid: setting user sid S-1-5-21-3433748774-3946474326-2194090801-1002 smbldap_make_mod: adding attribute |uid| value |ldap04| init_ldap_from_sam: Setting entry for user: ldap04 smbldap_make_mod: adding attribute |sambaSID| value |S-1-5-21-3433748774-3946474326-2194090801-1002| smbldap_make_mod: adding attribute |sambaAcctFlags| value |[DU ]| ldapsam_create_user: Creating new posix user Opening cache file at /usr/local/samba/var/cache/gencache.tdb Opening cache file at /usr/local/samba/var/lock/gencache_notrans.tdb Parsing value for key [IDMAP/SID2XID/S-1-5-21-3433748774-3946474326-2194090801-513]: value=[10000:G] Parsing value for key [IDMAP/SID2XID/S-1-5-21-3433748774-3946474326-2194090801-513]: id=[10000], endptr=[:G] sid S-1-5-21-3433748774-3946474326-2194090801-513 -> gid 10000 smbldap_add: dn => [uid=ldap04,ou=users,dc=example,dc=com] ldapsam_create_user: added account [ldap04] in the LDAP database smbldap_search_ext: base => [dc=example,dc=com], filter => [(&(uid=ldap04)(objectclass=sambaSamAccount))], scope => [2] init_sam_from_ldap: Entry found for user: ldap04 pdb_set_username: setting username ldap04, was pdb_set_domain: setting domain EXAMPLE, was pdb_set_nt_username: setting nt username ldap04, was pdb_set_user_sid_from_string: setting user sid S-1-5-21-3433748774-3946474326-2194090801-1002 pdb_set_user_sid: setting user sid S-1-5-21-3433748774-3946474326-2194090801-1002 attribute sambaPwdLastSet does not exist attribute sambaLogonTime does not exist attribute sambaLogoffTime does not exist attribute sambaKickoffTime does not exist attribute sambaPwdCanChange does not exist attribute displayName does not exist pdb_set_full_name: setting full name ldap04, was attribute sambaHomeDrive does not exist pdb_set_dir_drive: setting dir drive , was NULL attribute sambaHomePath does not exist pdb_set_homedir: setting home dir , was attribute sambaLogonScript does not exist pdb_set_logon_script: setting logon script , was attribute sambaProfilePath does not exist pdb_set_profile_path: setting profile path , was attribute description does not exist attribute sambaUserWorkstations does not exist attribute sambaMungedDial does not exist attribute sambaLMPassword does not exist attribute sambaNTPassword does not exist Adding cache entry with key=[ACCT_POL/password history] and timeout=[Thu Jan 1 01:00:00 1970 BST] (-1456758799 seconds in the past) ldapsam_get_account_policy_from_ldap smbldap_search_ext: base => [sambaDomainName=EXAMPLE,dc=example,dc=com], filter => [(objectClass=sambaDomain)], scope => [0] cache_account_policy_set: updating account pol cache Adding cache entry with key=[ACCT_POL/password history] and timeout=[Mon Feb 29 15:14:19 2016 GMT] (60 seconds ahead) attribute sambaBadPasswordCount does not exist attribute sambaBadPasswordTime does not exist attribute sambaLogonHours does not exist attribute gecos does not exist Program received signal SIGSEGV, Segmentation fault. __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 50 ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: No such file or directory. (gdb) bt #0 __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 #1 0xb7e0d2ed in tcopy_passwd (mem_ctx=0x8003f080, from=0xbffff7fc) at ../lib/util/util_pw.c:39 #2 0xb7d500a4 in init_sam_from_ldap (ldap_state=0x80027d40, sampass=0x8003f080, entry=0x8003ec88) at ../source3/passdb/pdb_ldap.c:1029 #3 0xb7d51c51 in ldapsam_getsampwnam (my_methods=0x80027bf8, user=0x8003f080, sname=0x800081c0 "ldap04") at ../source3/passdb/pdb_ldap.c:1507 #4 0xb7d77901 in pdb_getsampwnam (sam_acct=0x8003f080, username=0x800081c0 "ldap04") at ../source3/passdb/pdb_interface.c:334 #5 0xb7d69bac in local_password_change ( user_name=0x800081c0 "ldap04", local_flags=577, new_passwd=0x8000db90 "p4ssword", pp_err_str=0xbffffbb8, pp_msg_str=0xbffffbbc) at ../source3/passdb/passdb.c:782 #6 0x800032ac in password_change (remote_mach=0x0, username=0x800081c0 "ldap04", old_passwd=0x0, new_pw=0x8000db90 "p4ssword", local_flags=577) at ../source3/utils/smbpasswd.c:264 #7 0x80003a88 in process_root (local_flags=577) at ../source3/utils/smbpasswd.c:466 #8 0x80003fad in main (argc=3, argv=0xbffffd14) at ../source3/utils/smbpasswd.c:627 (gdb) quit A debugging session is active. Inferior 1 [process 2114] will be killed. Quit anyway? (y or n) y