Good Morning All,
I am in the process of switching from OD to AD. My first task is to get newly imaged machines to start joining AD rather than OD. The way I was thinking about doing the domain join was with a script rather than using Caspers built in method. Currently in OD I have each lab on my campus set-up as a folder, and all office machines go into just 1 folder. When I move to AD, I could get that granular and separate out each lab, but I don't think I need to since nothing will really be managed in AD. All profiles will move to Casper Management so my thought was to do 2 folders, Offices and Labs. This brings me to a couple of questions.
First off I found this script referenced on the forums and thought it would be a good starting point.
#!/bin/sh
HOSTNAME=`scutil --get HostName`
U='your_service_account'
P='service_account_pword'
DOMAIN='your_domain'
OU='OU_for_the_macs'
echo $HOSTNAME
/usr/sbin/dsconfigad -f -a "$HOSTNAME" -u "$U" -p "$P" -ou "$OU" -domain "$DOMAIN"
I have been trying to test the script and keep getting an error though when I plug in all of the correct variables.
ERROR MESSAGE:" dsconfigad: Computer name must be less than 15 characters."
I checked, and our naming convention is 123456-om for Offices and 123456-lm for labs. The machines hostname that I am testing with is not 15 characters, so why am I getting this error?
The second question I have would be in regards to imaging office machine vs lab machines. I would like office machines to go to one OU based on the -om and lab machines to populate to another ou based on the -lm. Does anyone have any suggestion as to how I can do this?
Thanks for any suggestions.
Joe