How to Login to multiple machines using ARD and UNIX commands

Loginwindow is set to show a list of users.


ard_login1.png

Copy and paste into send UNIX command

snip between the lines

osascript -e 'tell application "System Events" to keystroke "other"';
osascript -e 'tell application "System Events" to keystroke return';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke "username"';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke tab';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke "password"';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke return'
osascript -e 'tell application "System Events" to keystroke return'


Loginwindow is set to show a field for entering username and password.


ard_login2.png

Copy and paste into send UNIX command

snip between the lines

osascript -e 'tell application "System Events" to keystroke "username"';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke tab';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke "password"';
osascript -e 'tell application "System Events" to delay 3.0';
osascript -e 'tell application "System Events" to keystroke return'
osascript -e 'tell application "System Events" to keystroke return'


Note: The delays may not be necassary, but they work for me, so I included them here.

You can also use Applew Remote Desktop and some of the above commands to install software that is not an Apple Package, use the copy items command from the Manage menu in ARD. Be sure to check the box for "After copying: Open items". Not all installers will work this way, especially those that you have to navigate to and click on the "Agree" button before you can continue. But I thought it was worth mentioning.

image

The installation dialog box should appear and ask if you want to continue;

To click a "Go" or "Continue" button on an installer dialog window send the UNIX command:

osascript -e 'tell application "System Events" to keystroke return'

If an authentication window appears with an admin user name in the username field you can send the "password" and click continue with this UNIX command:

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'




theprimaxgroup
2300 Montana Ave, Suite 102, Cincinnati, OH 45211
P.513.772.1223 F.513.772.0261 Toll-Free.888.856.7377

e-mail:MoreHelp@AppleHelp.org