Wednesday, June 4, 2008

A unix script to unbind and bind a Macintosh Computer to a Server

*******************************
Must be run as root when using Apple Remote Desktop or sudo when using ssh
*******************************

To unbind a computer:


dsconfigldap -v -r oldserver.somewhere.lan
dscl /Search -delete / CSPSearchPath /LDAPv3/oldserver.somewhere.lan

To bind a compter:

dsconfigldap -v -a newserver.somewhere.lan
dscl /Search -create / SearchPolicy CSPSearchPath
dscl /Search -append / CSPSearchPath /LDAPv3/newserver.somewhere.lan

No comments: