We routinely need to change our administrative passwords on multiple computers as part of our security policy. Since we already have remote access to many of our Mac OS X computers through Apple Remote Desktop (ARD), changing that administrator password is quick and simple.
First, a short shell script:
# Change an account's password
/usr/bin/dscl . passwd /Users/$ACCOUNT $PASSWORD
if [ $? = 0 ] ; then
echo "Password reset."
echo "Password not reset."
In ARD, click the Send UNIX Command button and paste the script into the top field. Choose to run this command as a specific user and specify root.
From the Template drop down menu in the upper right corner select Save as Template… and save these settings with a descriptive name such as Spin ladmin password.
To use and reuse this template, select the workstations with the old account password and click the Send UNIX Command button in ARD’s toolbar. Choose the Spin ladmin password template from the Template drop down menu. Adjust the account name and password accordingly in the script and then click the Send button.
ARD can spin dozens or hundreds of account passwords in just a few seconds without having to know the original.