AFP548 Changing the world one server at a time.

icondaemon

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Scripting OD binding #369855
    icondaemon
    Participant

    A bit of sweat and a visit to Macenterprise.org (thanks, Lance Ogletree!) and I’ve figured it out.

    Here’s the perl code to create the server entry in Directory Access and create the entry in the Search Path window:

    $host_name =`scutil --get ComputerName`;
    
    chomp $host_name;
    
    `dsconfigldap -f -a OD_SERVER -n OD_GUI_NAME -c $host_name -u diradmin -p '<password>' -l root -q '<password>'`;
    
    sleep 10;
    
    `dscl /Search -append / CSPSearchPath /LDAPv3/OD_SERVER`;

    ~

    OD_SERVER is the OpenDirectory server FQDN.
    OD_GUI_NAME is a string for human use only.

    The sleep quantum is necessary to allow Directory Services to make the LDAP server entry. 10 seconds may be a bit too long in the scheme of things, but hey, it saves me from touching each machine to do a manual config!

    +- IconDaemon -+

Viewing 1 post (of 1 total)