Unlock a Mac stuck at the 'Master Password' login screen
Dec 12, '07 07:30:01AM
Contributed by: awkohr
This is a non-rebooting workaround for the situation where your login screen gets locked up because you mis-entered your login password three times while trying to log into an account on a Mac that has set a master password for FileVault (it does not matter if the account uses FileVault or not). The login box displays the error 'Type the master password to reset this user's password and to unlock FileVault. Master Password hint: ...', with no ability to log in as the correct user with the correct password, or to log in as another user or back out of the FileVault password.
Requirements:
- ssh enabled on the locked-up Mac.
- Administrator user name and password known for the locked-out computer.
- Both computers on the network.
Read on for the how-to...
Here's how to unlock the stuck Mac without a reboot:
- Determine the IP address of the locked out Macintosh. You can do this by clicking multiple times on the grey text just under "Mac OS X" in the login window.
- Launch the Terminal application on the other Mac.
- In that Terminal window, type ssh -l admin_name 1.2.3.4, where admin_name is the name of the admin user on the locked-up Mac, and 1.2.3.4 is the IP address you found above.
- Enter in the administrator's password when prompted, then press Enter.
- Type in ps -aux | grep loginwindow.app and press Return. The results will look something like this:
someuser 763 0.0 -0.2 98760 4632 ?? Ss 2:16PM 0:01.07 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
root 801 0.0 -0.2 337096 3628 ?? Ss 2:16PM 0:00.12 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow
aminuser 815 0.0 -0.0 18060 316 p2 R+ 2:17PM 0:00.00 grep loginwindow.app
- Locate the process ID (PID; the second column) for root's instance of loginwindow. There may be multiple entries due to multiple users being enabled, and someone else being logged in. In the example above, root's PID is 801.
- Type sudo kill PID#, where PID# is the number you just found, then press Return.
- Enter the administrator's password when prompted and press Return.
The login window should then disappear and reappear, and you should be able to log in as whichever user you want. In the Terminal window of the other computer, type in logout to end the ssh session. This has only been verified for Mac OS X 10.4, but it may also work under 10.3 and 10.5.
[robg adds: It seems much simpler to me to just restart the locked-up Mac, but perhaps there are multiple users logged in, and you'd rather not lose their work. I haven't tested this one.]
Comments (3)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20071129115342497