[Samba] Samba3 + LDAP - troubles joining domain (have to do it twice)

Tomasz Chmielewski mangoo at interia.pl
Wed Nov 3 16:00:26 GMT 2004


Paul Gienger wrote:
> 
>> The first time I try to join a domain I get an error after about 10-12 
>> seconds, no matter value "ldap replication sleep" has.
> 
> 
> I have had this happen almost perfectly consistantly on my network.  To 
> fix it, I've added a sleep line in the smbldap tools scripts to make it 
> wait.  While this isn't foolproof, I get about a 75% success on the 
> first try, probably more if I'd increase the wait.
> 
> In smbldap_tools.pm, around line 380 I added the sleep line in this 
> snippet:
> 
>        $add->code && warn "failed to add entry: ", $add->error ;
>        # take down the session
>        $ldap_master->unbind;
>        sleep(5);
>  }

OK, thanks for the hint, it worked :)

In case someone was using smbldap-tool 0.85, this change is around line 
390, and looks like below (note there is no "$ldap_master->unbind;" and 
there is "return 1;") - I set it to 15, just in case:

        $add->code && warn "failed to add entry: ", $add->error ;
        # take down the session
        sleep(15);
        return 1;
}


Tomek



More information about the samba mailing list