[Samba] Replication fails

Tobias Haas tobiashaas at faveve.uni-stuttgart.de
Sun May 19 19:16:19 MDT 2013

I'm using samba 4.0.3 (host samba01) and samba 4.0.5 (samba02) as DCs. samba01 already existed and I used samba-tool domain join to join samba02 to domain samba.x.y.z. This worked quiet well, but now replication fails:

/usr/local/samba/bin/samba-tool drs showrepl
        Default-First-Site-Name\SAMBA01 via RPC
                DSA object GUID: 2eeb19c5-6844-4363-8b73-afa2b9a75001
                Last attempt @ Mon May 20 03:00:41 2013 CEST failed, result 2 (WERR_BADFILE)
                623 consecutive failure(s).
                Last success @ Fri May 17 23:45:19 2013 CEST
Connection --
        Connection name: 76dc04cb-85e3-4d81-9b53-465166fd2f78
        Enabled        : TRUE
        Server DNS name : samba01.samba.x.y.z
        Server DN name  : CN=NTDS Settings,CN=SAMBA01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=samba,DC=x,DC=y,DC=z
                TransportType: RPC
                options: 0x00000001
Warning: No NC replicated for Connection!

Trying samba-tool drs replicate breaks at:
/usr/local/samba/bin/samba-tool drs replicate samba02 samba01 'DC=samba,DC=x,DC=y,DC=z' -d 5
     drsuapi_DsReplicaSync: struct drsuapi_DsReplicaSync
        out: struct drsuapi_DsReplicaSync
            result                   : WERR_BADFILE
ERROR(<class 'samba.drs_utils.drsException'>): DsReplicaSync failed - drsException: DsReplicaSync failed (2, 'WERR_BADFILE')
  File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/drs.py", line 334, in run
    drs_utils.sendDsReplicaSync(self.drsuapi, self.drsuapi_handle, source_dsa_guid, NC, req_options)
  File "/usr/local/samba/lib/python2.7/site-packages/samba/drs_utils.py", line 83, in sendDsReplicaSync
    raise drsException("DsReplicaSync failed %s" % estr)

I supposed, that there must be something wrong with the DsReplicaSync()-method, but I can't find anything about it in the python-files or in http://www.samba.org/~jelmer/samba4-python/nameIndex.html. 

Any suggestions what could be wrong or where can I find some information on the DsReplicaSync()-method used in /usr/local/samba/lib/python2.7/site-packages/samba/drs_utils.py, line 81?

Best regards,

More information about the samba mailing list