Can't join as DC on Samba4 Beta4/5

Andrew Bartlett abartlet at
Sun Jul 29 06:30:46 MDT 2012

On Sat, 2012-07-28 at 12:14 +1000, Andrew Bartlett wrote:
> On Sat, 2012-07-28 at 11:32 +1000, Andrew Bartlett wrote:
> > On Fri, 2012-07-27 at 07:21 -0700, Srinath Mantripragada wrote:
> > > Hi,
> > > 
> > > I'm still having this problem using the last version from git. Any help will be appreciated.
> > 
> > I do apologise for not getting back to you sooner.  This is in internal
> > error in the code, caused by a patch I added fairly recently trying to
> > cope with another replication issue.
> > 
> > This attached patch may not fix the issue (but it does change one
> > critical aspect, that is the DN we were looking for LostAndFound
> > incorrect), but it will give us much more detail on what is wrong.
> > 
> > HOWEVER:  The fact that this occurs during a DC join means that either
> > there is a serious issue with your domain (unlikely), or that I have the
> > fundamental logic here incorrect.  If we were to have succeed in moving
> > the object to LostAndFound, we may break your parent directory when we
> > replicate back. 
> > 
> > The errors you get from doing the migration will let me know more about
> > the situation, and hep me try and debug it further. 
> > 
> > DO NOT start samba after the join, instead send me back the error
> > messages and we can figure out what to do from here. 
> > 
> > I've put the patch in my drs-lost-and-found branch at
> > git://
> > 
> > The current patch I've attached to my mail, but I may update the branch
> > if I figure out anything more. 
> I've updated my branch with this corrected patch.

I've found the issue and fixed it in that branch.  However, I would be
very interested to know what ends up in the lostAndFound containers
after this replication.  Given that the source domain is Samba4?  Can
you check out that branch, compile, install on your new DC and do two
things for me:

Re-do the join, and show me the output (on the new DC) of

ldbsearch -H private/sam.ldb -s sub -b

Then, if you can, upgrade the original DC to current git master (or my
branch) and run:

samba-tool dbcheck -H private/sam.ldb --cross-ncs

And tell me what failures it finds (I've added checks for some of the
likely issues here). 


Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list