krypted.com

Tiny Deathstars of Foulness

There are a number of instances when you cannot remove a replica from Open Directory using Server Admin. This can be due to a variety of reasons, but if you cannot remove the replica from Server Admin then try doing so using slapconfig. For example, if the replica has an IP of 10.10.10.10 then the command would be:
slapconfig -removereplica 10.10.10.10

May 17th, 2009

Posted In: Mac OS X Server

Tags: , , ,

  • Edge is awesome!

  • Seems like it should be this now (in 10.6.8 at least)

    slapconfig -removereplica 10.10.10.10 diradmin

  • Adi

    This doesn’t work. The replica is still there. This is what i get :

    pdc:~ admin$ sudo slapconfig -removereplica 10.70.3.81
    Password:
    2015-05-01 18:32:45 +0000 slapconfig -removereplica
    2015-05-01 18:32:45 +0000 command: /usr/bin/kdestroy –credential=ldap/10.10.3.81@OD.DOMAIN.NET

    Any idea why the replica is not destroyed ?

    Thank you !

    • Justin

      same issue here

    • John Skinner

      Use ellipsegyyv’s answer from here https://discussions.apple.com/thread/2726884?tstart=0

      Just add the DomainAdminName at the end of the command :
      sudo slapconfig -removereplica 172.16.0.11 DomainAdminName

      • Adi

        Under 10.12.6 and Server 5.3.1, this doesn’t work :

        2017-09-05 19:34:36 +0000 slapconfig -removereplica
        2017-09-05 19:34:36 +0000 command: /usr/bin/kdestroy –credential=ldap/10.00.00.10@OD.XXXXX.NET

        Nothing happens. Replica still shows up and the server is still trying to connect to it 🙁

  • Jon Gardner

    On the OD master:

    # dscl /LDAPv3/127.0.0.1 read /Config/ldapreplicas

    Search the output for the IP address(es) and FQDN of the replica you’re trying to delete. Here, it’s “odreplica.fqdn.com” and has two IP addresses:

    GUID
    8964E35A-A08B-462A-9F37-E14E45AF3D3C
    IPaddresses

    192.168.1.2
    192.168.1.3

    ReplicaName
    odreplica.fqdn.com
    Replicas

    GUID
    67B97821-7A55-4A73-9EA7-DC5DFA4264B4
    ReplicaName
    odmaster.fqdn.com

    Then issue the slapconfig command using the –guid parameter:

    # sudo slapconfig -removereplica –guid 8964E35A-A08B-462A-9F37-E14E45AF3D3C 192.168.1.2

    If that doesn’t work, then configure another computer with the same FQDN as the missing replica, adjust the DNS parameters accordingly, and make that computer a replica. Its replica entry will replace the old one, and then you should be able to remove the replica in the normal fashion.