Created
June 11, 2014 19:10
-
-
Save jacobsalmela/cd89d7a60021b258227a to your computer and use it in GitHub Desktop.
(OS X) Enters a user's credentials into the GUI login window fields and logs them in (access to assistive devices needs to be enabled for osascript to work)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osascript -e <<EOF 'tell application "System Events" | |
tell process "SecurityAgent" | |
set value of text field 2 of window "Login" to "username" | |
set value of text field 1 of window "Login" to "password" | |
end tell | |
tell application "system events" to keystroke return | |
tell application "system events" to keystroke return | |
end tell' | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment