Unix Command to Login From Apple Remote Desktop

Home  /  Tech Stuff  /  Unix Command to Login From Apple Remote Desktop

On August 6, 2011, Posted by , in Tech Stuff, tags , , , , , with No Comments

If you manage multiple Macs using Apple Remote Desktop and each computer has an administrator account with a consistent password, you can send this script to log into them all at once. Great for Mac computer labs.

osascript <<EOF
tell application "System Events"
keystroke "username"
keystroke tab
delay 0.5
keystroke "password"
delay 0.5
keystroke return
keystroke return
end tell
EOF

To use this, select the computers in Apple Remote Desktop then go to Manage > Send UNIX Command… and paste in the above commands. This must be run as root. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *