Hello all,
I work for a company that has about 1.5k OS X machines and we are integrated into an Active Directory enviroment as we also have 1.5k Windows machines. Currently the two are playing nicely with each other for the most part, but it's often that an OS X machine will drop it's binding and I have to go to the machine (or remote desktop) and unbind/rebind it.
I am a linux user at home, so I am familiar with the bash shell, but not as familiar with OS X startup as I would like to be, which is holding me back in what I am trying to do. I am looking to run two terminal commands as soon as the computer starts up (before the user logs in) that will unbind the computer from AD and then bind the computer to AD.
Here are the two commands that I can currently use, the first is to unbind and the second is to bind:
Code:
dsconfigad -r -u username -p password
and
Code:
dsconfigad -f -u user -p password -ou "CN=Computers,DC=fpsma,DC=net" -forest fpsma.net -domain fpsma.net -a `hostname -s`
Does anyone have any ideas on how I can get these two commands to run at the startup of the machine?
Your help is greatly appreciated.
- Elo