OSX Noob - Alternative to WSNAME, and a join domain script?
I'm new to OSX imaging/scripting, and have about 100 iMACs to create an image for and deploy. I'm having enough of a hard time tring to understand DMG/PKG file deployments, as it doesn't seem that there is any easy tutorial out there to follow. One of the 2 big requirements we need is an auto-naming tool such as WSNAME (or a way for it to prompt us prior to joining our domain). We are also looking for a join domain script where I can just fill in our OU and server info.
Any help is appreciated!
Community Chosen Answer
here is one of the scripts we use to join domain as a post install task with the k2000
### You must edit these for your specific CLASSROOM
# 1) fully qualified DNS name of Active Directory Domain.
# 2) username of a privileged network user.
# 3) password of a privileged network user.
# 4) Distinguished name of container for the computer
# 5) 'enable' or 'disable' automatic multi-domain authentication
### End of configuration
# Get the local computer's name.
computerid=`/usr/sbin/scutil --get LocalHostName`
# Activate the AD plugin, just to be sure
defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist
# Bind to AD
dsconfigad -f -a $computerid -domain $domain -u "$udn" -p "$password" -ou "$ou"
dsconfigad -alldomains $alldomains
# Add the AD node to the search path
if [ "$alldomains" = "enable" ]; then
csp="/Active Directory/All Domains"
dscl /Search -append / CSPSearchPath "$csp"
dscl /Search -create / SearchPolicy dsAttrTypeStandard:CSPSearchPath
dscl /Search/Contacts -append / CSPSearchPath "$csp"
dscl /Search/Contacts -create / SearchPolicy dsAttrTypeStandard:CSPSearchPath
# Restart Directory Service