Skip to content

Instantly share code, notes, and snippets.

@neilmartin83
Created June 3, 2015 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilmartin83/044c13bb1eed1f079e5e to your computer and use it in GitHub Desktop.
Save neilmartin83/044c13bb1eed1f079e5e to your computer and use it in GitHub Desktop.
#!/bin/bash
#Replace "username" and "password" with credentials of the user you wish to log in
osascript -e 'tell application "SecurityAgent" to activate'; \
osascript -e 'tell application "Bluetooth Setup Assistant" to quit'; \
osascript -e 'tell application "System Events" to keystroke "username"'; \
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 "password"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke return'
@neilmartin83
Copy link
Author

Used with ARD, mainly to log in a lab of machines simultaneously - eg for those annoying times you have to carry out manual tasks on lots of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment