Forum Replies Created
-
AuthorPosts
-
April 14, 2011 at 11:42 am in reply to: Script to automatically bind and unbind from OD-Server #380653
Huhu
ParticipantHi
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:
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/ODservernameCould 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
-
AuthorPosts