Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] pdbedit -e broken

1,531 views
Skip to first unread message

sam...@gmx.com

unread,
Feb 21, 2014, 3:50:01 AM2/21/14
to
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?

2) How do I correctly export all of my data?

The failed users have nothing to distinguish them from the working users.

I am using Samba 3.4.7 on Ubuntu 10.04.4 LTS
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Andrew Bartlett

unread,
Feb 23, 2014, 5:00:01 AM2/23/14
to
On Fri, 2014-02-21 at 03:36 -0500, sam...@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

sam...@gmx.com

unread,
Feb 25, 2014, 5:50:02 PM2/25/14
to
----- Original Message -----
From: Andrew Bartlett
Sent: 02/23/14 09:58 AM
To: sam...@gmx.com
Subject: Re: [Samba] pdbedit -e broken

On Fri, 2014-02-21 at 03:36 -0500, sam...@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.
0 new messages