LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Error adding new user to samba pdc (http://www.linuxquestions.org/questions/debian-26/error-adding-new-user-to-samba-pdc-666884/)

alissonbn 09-01-2008 12:02 PM

Error adding new user to samba pdc
 
Hi there!
i'm running Etch with samba 3.2.3.
I have here a samba pdc, which worked just fine until some days ago. The problem is that I can't add anymore users to the samba database!! i can still remove users or modify passwords.
here what I get
Code:

servidor:/var/lib/samba# smbpasswd -a lorenzo
New SMB password:
Retype new SMB password:
Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Failed to add entry for user lorenzo.
Failed to modify password entry for user lorenzo

This NT_STATUS_UNSUCCESSFUL error seems a generic error from samba, which returned tons of web pages about lots of different errors. If I try to set the debug lvl to 10, i get a "pdb_getsampwnam (TDB): error fetching database.".

Code:

servidor:/var/lib/samba# smbpasswd -D 10 -a lorenzo
Netbios name list:-
my_netbios_names[0]="SERVIDOR"
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 NDS_ldapsam
Successfully added passdb backend 'NDS_ldapsam'
Attempting to register passdb backend NDS_ldapsam_compat
Successfully added passdb backend 'NDS_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 find an passdb backend to match tdbsam (tdbsam)
Found pdb backend tdbsam
pdb backend tdbsam has a valid init
New SMB password:
Retype new SMB password:
tdbsam_open: successfully opened /var/lib/samba/passdb.tdb
pdb_getsampwnam (TDB): error fetching database.
 Key: USER_lorenzo
pdb_set_username: setting username lorenzo, was
pdb_set_full_name: setting full name Lorenzo,,,, was
pdb_set_domain: setting domain OMEGAZERO, was
Home server: servidor
pdb_set_profile_path: setting profile path \\servidor\lorenzo\profile, was
Home server: servidor
pdb_set_homedir: setting home dir \\servidor\lorenzo, was
pdb_set_dir_drive: setting dir drive Y:, was NULL
pdb_set_logon_script: setting logon script logon.bat, was
pdb_set_user_sid: setting user sid S-1-5-21-2162734222-1466927943-1974952566-3052
pdb_set_user_sid_from_rid:
 setting user sid S-1-5-21-2162734222-1466927943-1974952566-3052 from rid 3052
account_policy_get: name: password history, val: 0
account_policy_get: name: maximum password age, val: -1
account_policy_get: name: password history, val: 0
Storing (new) account lorenzo with RID 3052
Locking key 555345525F6C6F72656E
Allocated locked data 0x0xa145d38
Unlocking key 555345525F6C6F72656E
Locking key 5249445F303030303062
Allocated locked data 0x0xa145bb8
Unlocking key 5249445F303030303062
Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Failed to add entry for user lorenzo.
Failed to modify password entry for user lorenzo

I googled without success and even looked at the source code. it seemed to me that there's some kind of corruption in my passdb.tdb file.
does anyone know what i can do to solve this problem?
if not, how can I reset the db? just by rm *.tdb?
i'll be very upset to re-add all the machines and users to the domain:(

thanks for any help and for your time

checkmate3001 09-01-2008 12:10 PM

Try removing lorenzo from the database:
Code:

smbpasswd -x lorenzo
and then re-adding him. Perhaps that will fix things? I had similar (but not exactly) issue when I tried to add a user that I had added before. Somehow there was something left behind that I was un-aware of and it caused problems. I eventually removed the user from samba and then the machine and tried it again.

alissonbn 09-01-2008 12:14 PM

Quote:

Originally Posted by checkmate3001 (Post 3266285)
Try removing lorenzo from the database:
Code:

smbpasswd -x lorenzo
and then re-adding him. Perhaps that will fix things? I had similar (but not exactly) issue when I tried to add a user that I had added before. Somehow there was something left behind that I was un-aware of and it caused problems. I eventually removed the user from samba and then the machine and tried it again.

Thks for replying.
I tried doing so, but unfortunately without success, i get the same error:
Code:

servidor:/home/alisson# smbpasswd -x lorenzo
Failed to delete entry for user lorenzo.
Failed to modify password entry for user lorenzo
servidor:/home/alisson# smbpasswd -a lorenzo
New SMB password:
Retype new SMB password:
Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Failed to add entry for user lorenzo.
Failed to modify password entry for user lorenzo



All times are GMT -5. The time now is 12:37 AM.