By Keith Mitnick on Saturday, 13 September 2014
Category: General

How to disable automatic login via the command line

This will remove the autoLoginUser key from the loginwindow preference:
 
defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser
 
The password file that holds the user's log-in password is called "kcpassword" and is located in the hidden /etc directory at the root of the hard drive. To remove it, you can run the following command:
 
rm /etc/kcpassword
 
You can run these commands via ARD or combine them into a script.
 
Leave Comments