3

I have a remote MAC that is stuck on the login screen for the local user. The login screen is stuck right after the password was entered. I can login to the remote MAC with ssh and run commands. This MAC is hosting a database for other users so I would rather not restart it if possible.

Is there a command I can run that would restart the core service logind so that I do not have to restart the computer?

If the answer is no, can I restart the computer using sudo shutdown -r now remotely over ssh?

2 Answers 2

3

It seems like you could run killall loginwindow to restart the login window process which should stop the authentication attempt.

And yes, sudo shutdown -r now should force the remote Mac to reboot immediately.

4
  • killall loginwindow will log out any user already logged in
    – nohillside
    Aug 2, 2013 at 14:24
  • After running the killall command, how would I restart the process, or does that happen automatically?
    – Michael A.
    Aug 2, 2013 at 15:51
  • @MichaelA. I believe the process will restart automatically since it's one of the main processes. This is the case when you run killall on Dock, Finder, etc..
    – Mr Rabbit
    Aug 2, 2013 at 15:54
  • 1
    The command worked to kill the process but it did not release the console. I ended up restarting the computer. Restarting remotely also hung so I had to hold down the power button. I was able to shutdown the database program remotely so I was happy about that. Thanks for all your help!
    – Michael A.
    Aug 2, 2013 at 19:52
3

Log in as an admin user via SSH and run

ps aux | grep -i loginwindow

Look for the PID of the login process of the local user and then do

sudo kill -9 <PID of user's loginwindow process>

to terminate it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .