[Samba] "Failed to add users for testing" - pdb_getsampwnam (TDB): error fetching database

Rowland Penny rowlandpenny241155 at gmail.com
Wed Dec 2 09:20:11 UTC 2015


On 02/12/15 02:28, craig at mypenguin.net.au wrote:
> Hi,
>
> Running samba-4.1.12-24 on Centos 7.1, I've created about 15 user
> accounts which are working perfectly, then for some reason today I go to
> create another account and it starts erroring?
>
> Config;
>   security = user
>   passdb backend = tdbsam
>
>
> [root at sysvm-smb samba]# pdbedit   -a testing
> new password:
> retype new password:
> Failed to add entry for user testing.
>
>
> With Debugging;
> ------------- Cut -------------
> Attempting to find a passdb backend to match tdbsam (tdbsam)
> No builtin backend found, trying to load plugin
> Probing module 'tdbsam'
> Probing module 'tdbsam': Trying to load from
> /usr/lib64/samba/pdb/tdbsam.so
> Module 'tdbsam' loaded
> Attempting to register passdb backend tdbsam
> Successfully added passdb backend 'tdbsam'
> Found pdb backend tdbsam
> pdb backend tdbsam has a valid init
> new password:
> retype new password:
> tdbsam_open: successfully opened /var/lib/samba/private/passdb.tdb
> pdb_getsampwnam (TDB): error fetching database.
>   Key: USER_testing
>   Finding user testing
>   Trying _Get_Pwnam(), username as lowercase is testing
>   Trying _Get_Pwnam(), username as uppercase is TESTING
>   Checking combinations of 0 uppercase letters in testing
>   Get_Pwnam_internals didn't find user [testing]!
>   Could not find user testing and no add script defined
>   Failed to add entry for user testing.
>

I think you will find that you are trying to create a samba user and 
samba cannot find a Unix user with the same name. To prove this, create 
the user first as a Unix user with adduser or whatever centos uses, then 
try again with pdbedit.

Rowland



More information about the samba mailing list