Remote GUI login via Apple Remote Desktop

Jul 13, '05 08:15:00AM

Contributed by: telegramsam

Using Apple Remote Desktop, send the following UNIX Command to as many machines as you like to log them in. I suggest sending the command as the user you are logging in as. Note that this will only work if the machine is currently at the login screen.

osascript -e 'tell application "System Events" to keystroke "LOGIN_NAME"'; \
osascript -e 'tell application "System Events" to keystroke tab'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke "PASSWORDHERE"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke return'
Replace LOGIN_NAME and PASSWORD with the proper values, of course...

[robg adds: I broke the above command by adding backslashes to split the lines; it should work when copied and pasted, but ... I haven't tested this one, lacking both Apple Remote Desktop and more than one machine here in the temporary Boston HQ of macosxhints...]

Comments (28)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2005062918513721