I've only got LDAP configured as a passdb type in my smb.conf, but
samba appears to be completely ignoring that and creating an
/etc/samba/smbpass file (full output of that at the bottom)
my smb.conf has:
ldap admin dn = "cn=Admin,dc=byramhealthcare,dc=com"
ldap ssl = off
passdb backend ldapsam:ldap://ldapmaster.byramhealthcare.com
ldap delete dn = no
ldap user suffix = ou=People,dc=byramhealthcare,dc=com
ldap machine suffix = ou=Systems,dc=byramhealthcare,dc=com
ldap suffix = "ou=People,dc=byramhealthcare,dc=com"
... and here's what I get when I try to add a user, presumably to the
LDAP pdb.. it finds the ldapsam pdf, but then never talks to it...
# smbpasswd -D 99 -a testuser
Netbios name list:-
my_netbios_names[0]="TESTBOX"
New SMB password:
Retype new SMB password:
Trying to load: smbpasswd
Attempting to register passdb backend ldapsam
Successfully added passdb backend 'ldapsam'
Attempting to register passdb backend ldapsam_compat
Successfully added passdb backend 'ldapsam_compat'
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 guest
Successfully added passdb backend 'guest'
Attempting to find an passdb backend to match smbpasswd (smbpasswd)
Found pdb backend smbpasswd
pdb backend smbpasswd has a valid init
Trying to load: guest
Attempting to find an passdb backend to match guest (guest)
Found pdb backend guest
pdb backend guest has a valid init
getsampwnam (smbpasswd): search by name: testuser
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
startsmbfilepwent_internal: unable to open file /etc/samba/smbpasswd.
Error wasNo such file or directory
unable to open passdb database.
Finding user testuser
Trying _Get_Pwnam(), username as lowercase is testuser
Get_Pwnam_internals did find user [testuser]!
pdb_set_username: setting username testuser, was
element 11 -> now SET
pdb_set_full_name: setting full name Dereks Test User,,,, was
element 12 -> now SET
pdb_set_unix_homedir: setting home dir /home/testuser, was NULL
element 21 -> now SET
pdb_set_domain: setting domain TESTBOX, was
element 13 -> now DEFAULT
pdb_set_user_sid: setting user sid
S-1-5-21-2358132418-1227356351-887936944-3002
element 17 -> now SET
pdb_set_user_sid_from_rid:
setting user sid S-1-5-21-2358132418-1227356351-887936944-3002
from rid3002
tdb_pack(ddffd, 1024) -> 28
tdb_pack(d, 996) -> 4
tdb_pack(ddd, 992) -> 12
tdb_pack(ddd, 980) -> 12
tdb_pack(ddd, 968) -> 12
tdb_pack(ddffd, 1024) -> 19
tdb_pack(d, 1005) -> 4
tdb_pack(ddffd, 1024) -> 20
tdb_pack(d, 1004) -> 4
tdb_pack(ddffd, 1024) -> 25
tdb_pack(d, 999) -> 4
tdb_pack(ddffd, 1024) -> 31
tdb_pack(d, 993) -> 4
tdb_pack(ddffd, 1024) -> 30
tdb_pack(d, 994) -> 4
tdb_pack(ddffd, 1024) -> 29
tdb_pack(d, 995) -> 4
tdb_pack(ddd, 991) -> 12
tdb_pack(ddffd, 1024) -> 30
tdb_pack(d, 994) -> 4
tdb_pack(ddffd, 1024) -> 25
tdb_pack(d, 999) -> 4
tdb_pack(ddffd, 1024) -> 27
tdb_pack(d, 997) -> 4
tdb_pack(ddd, 993) -> 12
tdb_pack(ddd, 981) -> 12
tdb_pack(ddd, 969) -> 12
tdb_pack(ddffd, 1024) -> 26
tdb_pack(d, 998) -> 4
tdb_pack(ddffd, 1024) -> 27
tdb_pack(d, 997) -> 4
tdb_unpack(ddffd, 34) -> 30
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 67) -> 27
tdb_unpack(d, 40) -> 4
tdb_unpack(ddd, 36) -> 12
tdb_unpack(ddd, 24) -> 12
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 31) -> 27
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 29) -> 25
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 24) -> 20
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 30) -> 26
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 29) -> 25
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 45) -> 29
tdb_unpack(d, 16) -> 4
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 68) -> 28
tdb_unpack(d, 40) -> 4
tdb_unpack(ddd, 36) -> 12
tdb_unpack(ddd, 24) -> 12
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 35) -> 31
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 34) -> 30
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 23) -> 19
tdb_unpack(d, 4) -> 4
pdb_set_group_sid: setting group sid
S-1-5-21-2358132418-1227356351-887936944-1201
element 18 -> now SET
pdb_set_group_sid_from_rid:
setting group sid S-1-5-21-2358132418-1227356351-887936944-1201
from rid 1201
Home server: testbox
pdb_set_profile_path: setting profile path \\testbox\testuser\profile,
was
element 2 -> now DEFAULT
Home server: testbox
pdb_set_homedir: setting home dir \\testbox\testuser, was
element 1 -> now DEFAULT
pdb_set_dir_drive: setting dir drive , was NULL
element 3 -> now DEFAULT
pdb_set_logon_script: setting logon script , was
element 4 -> now DEFAULT
element 19 -> now DEFAULT
element 19 -> now CHANGED
element 19 -> now CHANGED
element 31 -> now CHANGED
element 30 -> now CHANGED
element 10 -> now CHANGED
element 20 -> now CHANGED
account_policy_get: maximum password age:1814400
element 9 -> now CHANGED
account_policy_get: minimum password age:0
element 8 -> now CHANGED
element 17: SET
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
startsmbfilepwent_internal: unable to open file /etc/samba/smbpasswd.
Error wasNo such file or directory
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
getsmbfilepwent: end of file reached.
endsmbfilepwent_internal: closed password file.
Added user testuser.
bash-2.05b#
bash-2.05b# rm smbpasswd
bash-2.05b# smbpasswd -D 99 -a testuser
Netbios name list:-
my_netbios_names[0]="TESTBOX"
New SMB password:
Retype new SMB password:
Trying to load: smbpasswd
Attempting to register passdb backend ldapsam
Successfully added passdb backend 'ldapsam'
Attempting to register passdb backend ldapsam_compat
Successfully added passdb backend 'ldapsam_compat'
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 guest
Successfully added passdb backend 'guest'
Attempting to find an passdb backend to match smbpasswd (smbpasswd)
Found pdb backend smbpasswd
pdb backend smbpasswd has a valid init
Trying to load: guest
Attempting to find an passdb backend to match guest (guest)
Found pdb backend guest
pdb backend guest has a valid init
getsampwnam (smbpasswd): search by name: testuser
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
startsmbfilepwent_internal: unable to open file /etc/samba/smbpasswd.
Error wasNo such file or directory
unable to open passdb database.
Finding user testuser
Trying _Get_Pwnam(), username as lowercase is testuser
Get_Pwnam_internals did find user [testuser]!
pdb_set_username: setting username testuser, was
element 11 -> now SET
pdb_set_full_name: setting full name Dereks Test User,,,, was
element 12 -> now SET
pdb_set_unix_homedir: setting home dir /home/testuser, was NULL
element 21 -> now SET
pdb_set_domain: setting domain TESTBOX, was
element 13 -> now DEFAULT
pdb_set_user_sid: setting user sid
S-1-5-21-2358132418-1227356351-887936944-3002
element 17 -> now SET
pdb_set_user_sid_from_rid:
setting user sid S-1-5-21-2358132418-1227356351-887936944-3002
from rid3002
tdb_pack(ddffd, 1024) -> 28
tdb_pack(d, 996) -> 4
tdb_pack(ddd, 992) -> 12
tdb_pack(ddd, 980) -> 12
tdb_pack(ddd, 968) -> 12
tdb_pack(ddffd, 1024) -> 19
tdb_pack(d, 1005) -> 4
tdb_pack(ddffd, 1024) -> 20
tdb_pack(d, 1004) -> 4
tdb_pack(ddffd, 1024) -> 25
tdb_pack(d, 999) -> 4
tdb_pack(ddffd, 1024) -> 31
tdb_pack(d, 993) -> 4
tdb_pack(ddffd, 1024) -> 30
tdb_pack(d, 994) -> 4
tdb_pack(ddffd, 1024) -> 29
tdb_pack(d, 995) -> 4
tdb_pack(ddd, 991) -> 12
tdb_pack(ddffd, 1024) -> 30
tdb_pack(d, 994) -> 4
tdb_pack(ddffd, 1024) -> 25
tdb_pack(d, 999) -> 4
tdb_pack(ddffd, 1024) -> 27
tdb_pack(d, 997) -> 4
tdb_pack(ddd, 993) -> 12
tdb_pack(ddd, 981) -> 12
tdb_pack(ddd, 969) -> 12
tdb_pack(ddffd, 1024) -> 26
tdb_pack(d, 998) -> 4
tdb_pack(ddffd, 1024) -> 27
tdb_pack(d, 997) -> 4
tdb_unpack(ddffd, 34) -> 30
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 67) -> 27
tdb_unpack(d, 40) -> 4
tdb_unpack(ddd, 36) -> 12
tdb_unpack(ddd, 24) -> 12
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 31) -> 27
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 29) -> 25
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 24) -> 20
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 30) -> 26
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 29) -> 25
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 45) -> 29
tdb_unpack(d, 16) -> 4
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 68) -> 28
tdb_unpack(d, 40) -> 4
tdb_unpack(ddd, 36) -> 12
tdb_unpack(ddd, 24) -> 12
tdb_unpack(ddd, 12) -> 12
tdb_unpack(ddffd, 35) -> 31
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 34) -> 30
tdb_unpack(d, 4) -> 4
tdb_unpack(ddffd, 23) -> 19
tdb_unpack(d, 4) -> 4
pdb_set_group_sid: setting group sid
S-1-5-21-2358132418-1227356351-887936944-1201
element 18 -> now SET
pdb_set_group_sid_from_rid:
setting group sid S-1-5-21-2358132418-1227356351-887936944-1201
from rid 1201
Home server: testbox
pdb_set_profile_path: setting profile path \\testbox\testuser\profile,
was
element 2 -> now DEFAULT
Home server: testbox
pdb_set_homedir: setting home dir \\testbox\testuser, was
element 1 -> now DEFAULT
pdb_set_dir_drive: setting dir drive , was NULL
element 3 -> now DEFAULT
pdb_set_logon_script: setting logon script , was
element 4 -> now DEFAULT
element 19 -> now DEFAULT
element 19 -> now CHANGED
element 19 -> now CHANGED
element 31 -> now CHANGED
element 30 -> now CHANGED
element 10 -> now CHANGED
element 20 -> now CHANGED
account_policy_get: maximum password age:1814400
element 9 -> now CHANGED
account_policy_get: minimum password age:0
element 8 -> now CHANGED
element 17: SET
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
startsmbfilepwent_internal: unable to open file /etc/samba/smbpasswd.
Error wasNo such file or directory
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
getsmbfilepwent: end of file reached.
endsmbfilepwent_internal: closed password file.
Added user testuser.