Force Logout User OS X

How to Force A User Account to Log Out on a Mac Without Having to Log Into it First

On Macs with multiple user accounts, you might have more than one user account logged in at the same time. This can happen when one user is logged in and another user opens an new session. There’s really nothing wrong with this, aside from it reducing available resources, but sometimes you may want to log out the previous  user account(s). The typical way to log out another user in OS X is to switch to that account, log out from the  Apple menu, and then log back in to the account you want to use. It’s a bit of a hassle though! Another option is to force the other user account to log out, without having to log back into it.

Just like force quitting apps elsewhere in OS X, we can use this method to log the target user out. However, this will cause any open applications on their account to quit and exit without any saving or caching, which could result in unintended data loss. If you’re comfortable with this, continue reading. If you’re not completely happy with the idea, just carry on logging back into the previous user account and log it out manually – after saving their files of course.

How to Force A User Account to Log Out on a Mac Without Having to Log Into it First

This process will log out the target user account in Mac OS X without having to log yourself out and log into their account.

This  works on all versions of OS X.

  1. Launch Activity Monitor. The quick way to do this is by typing Activity into Spotlight and launching Activity Monitor directly from the results.
  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”
  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.
  6. Enter the admin password if requested, otherwise just choose “Quit” and continue to exit out of Activity Monitor.

Warning Quit Confirmation

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

With this method, there is no visual cue like a profile picture to assist identification, so be sure you’re picking the right account. As mentioned earlier, this will force quit all applications and processes on the target account, which could result in unintended data loss. This makes the task generally best reserved for advanced users, although it’s available to all user accounts, assuming you have an admin password to override the target account.

If you’re wondering, you can log out any user account this way, whether it’s a guest account, a hidden account, or even your own. Of course if you kill the ‘loginwindow’ process of your own account you are effectively logging yourself out which is rarely desirable.

If you find yourself doing this often, a better solution may be to set up automatic log out for all user accounts so that they log themselves out after a set period of inactivity, preserving applications, files, and save states. This can be configured from the General tab in Security & Privacy in System Preferences.