[Samba] pdbedit -e broken

Andrew Bartlett abartlet at samba.org
Sun Feb 23 02:58:24 MST 2014

On Fri, 2014-02-21 at 03:36 -0500, sambaz at gmx.com wrote:
> I am trying to export my samba password database using
> pdbedit -e smbpasswd:smbpass
> Mixed in with successful accounts are many errors:
> Importing account for bob...ok
> build_sam_pass: Failing attempt to store user with non-uid based user RID.
> Importing account for fred...failed
> Importing account for brian...ok
> 1) Why does it say "importing" when I am exporting?

Because you are doing both, exporting from your existing database into
an smbpasswd database. 

> 2) How do I correctly export all of my data?
> The failed users have nothing to distinguish them from the working users.

The smbpasswd file does not store user RID values, it used a
'algorithmic' mapping of 2*uid+1000.  To write out a valid smbpasswd
file, this must be reversed.  If that doesn't match the user's UID, the
import fails. 

what do you want to do with your database, one 'exported'?

Andrew Bartlett
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba mailing list