Friday, August 28, 2015

How to Log Out Another User Without Logging In On Mac OS X

For Macs who have multiple user accounts on a single computer, sometimes you may log in to multiple user accounts concurrently. This leaves the prior user account logged in while another user account session opens. There’s really nothing wrong with that, aside from reducing available resources, but sometimes you may wish to log out the other user account. The typical action to log out another user account in OS X is to switch to that account, log out from the  Apple menu, and then returning to the desired account with another login. Kind of a hassle, right? Another option is to force the other user account to log out, without having to log back into it on the Mac.

Notice we said force the other account the log out, because how this actually works is to force quit the login process of the target user. Just like force quitting elsewhere, using this to forcibly log the target user out will cause any open application on their account to quit and exit without any saving or caching, which could result in unintended data loss since none of the open files, applications, or data would be saved. If you’re comfortable with that, continue to learn how to log out another user account without having to log into that user account first. If you’re not comfortable with that, just log back into that user account and log it out manually after saving files.

How to Force Log Out User Accounts on a Mac Without Logging Into Them


This will log out any target user account in Mac OS X without having to log back into it, it works the same in all versions of OS X.
  1. Launch Activity Monitor from Spotlight (Command+Spacebar) or through /Applications/Utilities/
  2. From the “View” menu choose “All Processes”
  3. Use the search box in the upper right corner of Activity Monitor to search for “loginwindow” – be sure to use exact syntax
  4. Select the ‘loginwindow’ process belonging to the user account you wish to log out

  5 . Click the (X) Quit Process button and verify that you want to quit the loginwindow process for that    
       user, acknowledging that it will log out the related user account
  6.   Enter the admin password if requested, otherwise just choose “Force Quit” and continue, exit out of 
       Activity Monitor when finished

By force quitting the target loginwindow process you are instantly logging out that target user and killing all of their applications and processes.

Because you’re targeting the user account name with this method, there is no visual cue like a profile picture to assist identification, so be sure you’re picking the proper user account to target for the forced log out procedure. As mentioned before, it will force quit all applications and processes on the target logged in user account, which could result in unintended data loss on that user account. This makes the task generally best reserved for advanced Mac users, though it’s clearly accessible to all user accounts, assuming you have an admin password to override whoever the other logged in user account is.

If you’re wondering, you can log out any user account this way by targeting it’s accompanying “loginwindow” process ID and quitting it, whether it’s any other user account on the Mac that is logged in, a guest user account, a hidden account, or even yourself. Of course if you kill the ‘loginwindow’ process of your own user account you are effectively logging yourself out in a forcible manner, which is rarely desirable.

No comments:

Post a Comment