[Samba] Smbpasswd -x doesn't delete entry

Jay B Knotts jbk at paragonsys.com
Fri May 14 14:20:17 GMT 2004


I hope someone give me a clue to what is happening here.

This is a new installation. 

I can add users to samba with no problems but
I can't delete them from the ldap db using smbpasswd -x <username>
nor via pdbedit -x -u <username>

The ldap entry looks like this -

#
dn: uid=tester,ou=People,dc=mycompany,dc=com
uid: tester
sambaSID: S-1-5-21-118495222-1838158642-270368766-2026
sambaPrimaryGroupSID: S-1-5-21-118495222-1838158642-270368766-2023
sambaPwdCanChange: 1084486966
sambaPwdMustChange: 2147483647
sambaLMPassword: 27B5F7A8A911453AFA8297B31DAE3F0B
sambaNTPassword: D005EA53CDE1161A736D8CA6D63529CB
sambaPwdLastSet: 1084486966
sambaAcctFlags: [U          ]
objectClass: sambaSamAccount
objectClass: account
==============================================

When I try to delete that entry I get the following error messages -

# smbpasswd -x tester

ldapsam_delete_sam_account: Deleting user tester from LDAP.
smbldap_search: base => [dc=mycompany,dc=com], filter =>
[(&(uid=tester)(objectclass=sambaSamAccount))], scope => [2]
ldapsam_delete_entry: deleting attribute uid
ldapsam_delete_entry: deleting attribute sambaSID
ldapsam_delete_entry: deleting attribute sambaPrimaryGroupSID
ldapsam_delete_entry: deleting attribute sambaPwdCanChange
ldapsam_delete_entry: deleting attribute sambaPwdMustChange
ldapsam_delete_entry: deleting attribute sambaLMPassword
ldapsam_delete_entry: deleting attribute sambaNTPassword
ldapsam_delete_entry: deleting attribute sambaPwdLastSet
ldapsam_delete_entry: deleting attribute sambaAcctFlags
ldapsam_delete_entry: deleting attribute objectClass
smbldap_modify: dn => [uid=tester,ou=People,dc=mycompany,dc=com]
ldapsam_delete_entry: Could not delete attributes for
uid=tester,ou=People,dc=mycompany,dc=com, error: Object class violation
(object class 'account' requires attribute 'uid')
Failed to delete entry for user tester.
Failed to modify password entry for user tester
#

I'm not sure why this is happening. Any ideas or pointers?

Thanks
jay


More information about the samba mailing list