Created
June 20, 2014 07:30
-
-
Save prashanthrajagopal/36f7e0631a3450e4d571 to your computer and use it in GitHub Desktop.
Applescript to enable Auto Login in OSX
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
set username to do shell script "whoami" | |
set uid to do shell script "id | cut -d' ' -f1 | cut -d'=' -f2 | cut -d'(' -f1" | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser " & username with administrator privileges | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserUID " & uid with administrator privileges | |
display dialog "User " & username & " is now the default Auto Login." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment