Dec 12, '07 07:30:01AM • Contributed by: awkohr
Requirements:
- ssh enabled on the locked-up Mac.
- Administrator user name and password known for the locked-out computer.
- Both computers on the network.
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.
[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.]
