TDB Error When Adding New SMB User using Smbpasswd

Rafal Szczesniak mimir at
Mon Mar 31 10:29:57 GMT 2008

On Fri, Mar 28, 2008 at 08:36:56AM -0700, hevfuture wrote:
> When I add a new samba user using the smbpasswd command (smbpasswd -a
> sample_username), I get the following error: 
> _____________
> Unable to modify TDB passwd ! Error: Record exists
>  occurred while storing the RID index (RID_                 )
> Failed to add entry for user sample_username. 
> Failed to modify password entry for user sample_username. 
> _____________
> Does anyone know of any solutions to this error?  

Looks like your password database is messed up. Have you tried to use tdbdump
to check what's in that file actually ?

> I have rebooted several times and also searched on Google, but the only
> proposed solution has been to reinstall the server. Is there any way to
> repair just the tdb file, or just samba? 

It is more likely the tdb file is wrong. Running smbpasswd with higher debug
level (-D3 or -D5 command line parameter) might tell a bit you more.

Rafal Szczesniak
Samba Team member
Likewise Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the samba-technical mailing list