If you accidentally uncheck the “Allow network users to login at login window” checkbox in the Accounts preference pane in the System Preferences on your Mac and then get a spinning ball of death and are forced to do ctrl-cmd-power to restart the machine, you might find that it is no longer possible to login.
This is luckily easy to solve if you know what to do. Start with entering >console as the username and press login. This will get you to the text based console login. If all you get is a black screen, press enter to get a login prompt.
Try to login with your username and password. Hopefully that works. If it does run the following command:
dseditgroup -o delete -T group com.apple.access_loginwindow
Now exit the console and when the login window appears you should be able to login again.
If you can’t login at the console login prompt, it might be because it’s a network user you are trying to login with. Try with a local user with admin privileges. If you by chance have disabled that user a few days earlier by setting the shell to /usr/bin/false that can be solved by booting the machine into single user mode.
Do that by pressing command-s at the chime during the startup procedure. You should then get a text display with text scrolling by and finally be presented with a prompt with admin privileges. Do this:
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . -read /Users/<username> UserShell
dscl . -change /Users/<username> UserShell <old value> /bin/bash
If you have forgot the password you can change that with
dscl . -passwd /Users/<username> <new password>
Then exit single user mode to continue booting the machine and re-try the >console step above.
Recent Comments