[Samba] Failed to modify entry for user in samba with tdb backend

Francesc Guasch Ortiz frankie.guasch at gmail.com
Tue Mar 3 05:22:21 MST 2015


I have a debian server with samba. I can no longer manage users accounts. I
can't add, modify or remove them.

This is Debian wheezy with samba 3.6.6. There is no ldap and the database
backend is tdb. I usually managed users with smbpasswd, but it no longer
works.

When I try to create a new user:

    # smbpasswd -a blabla
    New SMB password: ****
    Retype new SMB password: ****
    Failed to add entry for user blabla.

Trying to remove users with pdbedit or smbpasswd isn't working also,
returning the same error:

    # pdbedit -L olduser
    olduser:1314:OldName

    # smbpasswd -x olduser
    Failed to delete entry for user olduser.

I tried using tdbtool
     # tdbtool /var/lib/samba/passdb.tdb check Database integrity is OK and
has 570 records.

I checked the keys length, I made a tiny perl script that checked all the
output of tdbtool keys to see if one entry had different keys thant it
should, but I see no mistakes there:
     key 9 bytes: USER_old

I'm stuck, any hint would be appreciated, thank you.


More information about the samba mailing list