Hi, I was having problem with the tdbsam backend in which a particular user got listed twice with pdbedit. (http://www.mail-archive.com/samba at lists.samba.org/msg109110.html) Without much hope in fixing it, I am planning to re-generating passdb.tdb on my PDC by: (1)exporting tdbsam to smbpasswd backend (2)delete passdb.tdb (3)re-import smbpasswd to tdbsam backend With the command ` pdbedit -i tdbsam -e smbpasswd`, I got a few errors for ~10 users: build_sam_pass: Failing attempt to store user with non-uid based user RID. Importing account for some_user...failed pdbedit -L -v does not really give me any information on "user RID", so I am confused how it can be fixed. Does the procedure make sense, or is there anything I am missing? Thanks, Abe
On Thu, Jul 08, 2010 at 11:32:32AM +1000, Abe Lau wrote:> Hi, > I was having problem with the tdbsam backend in which a particular user got > listed twice with pdbedit. > (http://www.mail-archive.com/samba at lists.samba.org/msg109110.html) > > Without much hope in fixing it, I am planning to re-generating passdb.tdb on > my PDC by: > (1)exporting tdbsam to smbpasswd backend > (2)delete passdb.tdb > (3)re-import smbpasswd to tdbsam backendIf you do this you lose a lot of the extra data that tdbsam stores that smbpasswd does not. Jeremy.
On 07/08/2010 05:43 PM, Jeremy Allison wrote:> On Thu, Jul 08, 2010 at 11:32:32AM +1000, Abe Lau wrote: > >> Hi, >> I was having problem with the tdbsam backend in which a particular user got >> listed twice with pdbedit. >> (http://www.mail-archive.com/samba at lists.samba.org/msg109110.html) >> >> Without much hope in fixing it, I am planning to re-generating passdb.tdb on >> my PDC by: >> (1)exporting tdbsam to smbpasswd backend >> (2)delete passdb.tdb >> (3)re-import smbpasswd to tdbsam backend >> > If you do this you lose a lot of the extra > data that tdbsam stores that smbpasswd does > not. > > Jeremy. >Does "tdbdump passdb.tbd" show the user listed twice? Maybe you can use tdbtool to edit a copy of the file. The man page for tdbbackup indicates it can check for corruption (but not fix it.)