

Set computerFQHN to computerName & “.hq.” –We also want to verify the FQHN is proper before we bind –Set the computer name and local hostname on the computer incase it was just renamed in the previous stepĭo shell script “scutil –set ComputerName” & space & computerName with administrator privilegesĭo shell script “scutil –set LocalHostName” & space & computerName with administrator privileges Set computerName to text returned of ( display dialog “Set the computer name (ex: JDoe12345m)” default answer “”) –Set the computer name is proper before we bind Setuser_password to text returned ofuser_password_dialog Set user_name_dialog to display dialog “Enter a domain admin account name: ” default answer “” buttons default button “Next” with hidden answer
Os x shell script to create admin password#
–get a domain admin user name and password which will be used to bind The Script (save this as an Application in OS X, then you can double click it to start):


Os x shell script to create admin windows#
The steps involved are considerably more tedious than joining AD on a Windows machine. The Challenge: As part of our deployment process for Macs in an AD environment, technicians are expected to rename the computer using a combination of Preferences panes as well as command line.
