AFP548 Changing the world one server at a time.

Huhu

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Script to automatically bind and unbind from OD-Server #380653
    Huhu
    Participant

    Hi

    I’ve now found a script from which I think that it could solve my problem:

    http://hintsforums.macworld.com/showthread.php?t=92421 (scroll down)

    And on this Page it’s described how I can create a startup item:

    http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html

    I’ve customized the script for my needs (since I only need an automatic binding to the OD-Server I can wipe out all the AD-related stuff I think?!)

    The Name of the OD-Server is: hoempf and it can be found locally under hoempf.local

    #!/bin/sh

    computerid=’/usr/sbin/scutil –get LocalHostName’

    # Bind to LDAP
    dsconfigldap -u {diradmin} -p {4321qay.} -f -a {hoempf} -c $HOSTNAME -n {heompf}
    # dsconfigldap -v -s -f -a {hoempf} -n {hoempf} -u {diradmin} -p {4321qay.}-l {admin} -q {1234}

    #defaults write /Library/Preferences/DirectoryService/SearchNodeConfig “Search Node Custom Path Array” -array “/LDAPv3/odservername”
    #defaults write /Library/Preferences/DirectoryService/SearchNodeConfig “Search Policy” -int 3

    #plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist

    sudo killall DirectoryService

    # LDAP in search path
    #sudo dscl /Search -append / CSPSearchPath /LDAPv3/ODservername

    Could you please check this script and say if it can work like this? Again: I have no idea about scripting, so I would really appreciate any help I can get!

    Greez

Viewing 1 post (of 1 total)