[Samba] pdbedit -e broken
sambaz at gmx.com
sambaz at gmx.com
Tue Feb 25 15:42:23 MST 2014
----- Original Message -----
From: Andrew Bartlett
Sent: 02/23/14 09:58 AM
To: sambaz at gmx.com
Subject: Re: [Samba] pdbedit -e broken
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/~ab
artlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba1) I am taking an existing database and creating a new text file containing some of the data from that database using an option called "export". Whilst you can argue for reporting the "import", I don't think it makes for a particular good user experience. Perhaps you could say "transferring".2) I don't understand your explanation about the RID and UID, sorry. I can generate a smbpasswd file, without errors, using pdbedit -L -w. If I then import this on another server is it not going to work?
I want to transfer users from one server to another. I have no trust of binary database formats and prefer a plain text representation whenever possible.
More information about the samba