Home Forums OS X Server and Client Discussion Open Directory OD Binding not working properly

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #381255
    Confusion
    Participant

    Hi Guys i am trying to run a script that will remove machines from the old OD server and then join it onto the new OD.
    I have the machine in a test group with a welcome message for the old OD

    The script runs fine with no errors at all. However when i log out it is still showing the old OD welcome message and not the new one. Everything appears to have joined without an issue. There are no error messages on the new OD connection and the light is green.

    This is the code i wrote

    [code]
    #!/bin/sh
    #This script binds a machine to the OD

    #Unbind from existing OD
    /usr/sbin/dsconfigldap -r itsdms062.cs.adelaide.edu.au
    sleep 5

    #Join machine onto new OD master
    /usr/sbin/dsconfigldap -v -f -a 10.32.16.172 -n 10.32.16.172 -u diradmin -p password -l pcadmin -q password
    dscl /Search -create / SearchPolicy CSPSearchPath
    dscl /Search -append / CSPSearchPath /LDAPv3/10.32.16.172
    dscl /Search -append / CSPSearchPath “/Active Directory/All Domains”

    sleep 10
    dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
    dscl /Search/Contacts -append / CSPSearchPath /LDAPv3/10.32.16.172
    dscl /Search/Contacts -append / CSPSearchPath “/Active Directory/All Domains”
    [/code]

    I am guessing there is a record that is not updating. Any tips?

    #381267
    Confusion
    Participant

    i was able to work this out after looking in the Directory Utilitys search order i realised that the old entry was still listed in there.
    I added the follwing two lines which remove its entry in the search order

    dscl /Search -delete / CSPSearchPath /LDAPv3/itsdms062.cs.adelaide.edu.au
    dscl /Search/Contacts -delete / CSPSearchPath /itsdms062.cs.adelaide.edu.au

    The script now looks like this

    [code]#!/bin/sh
    #This script binds a machine to the OD

    #Unbind from existing OD
    /usr/sbin/dsconfigldap -r itsdms062.cs.adelaide.edu.au
    dscl /Search -delete / CSPSearchPath /LDAPv3/itsdms062.cs.adelaide.edu.au
    dscl /Search/Contacts -delete / CSPSearchPath /itsdms062.cs.adelaide.edu.au
    sleep 5

    #Join machine onto new OD master
    /usr/sbin/dsconfigldap -v -f -a 10.32.16.172 -n 10.32.16.172 -u diradmin -p password -l pcadmin -q password
    dscl /Search -create / SearchPolicy CSPSearchPath
    dscl /Search -append / CSPSearchPath /LDAPv3/10.32.16.172
    dscl /Search -append / CSPSearchPath “/Active Directory/All Domains”

    sleep 10
    dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
    dscl /Search/Contacts -append / CSPSearchPath /LDAPv3/10.32.16.172
    dscl /Search/Contacts -append / CSPSearchPath “/Active Directory/All Domains”
    [/code]

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed