Home » , , » How to Force Log Out Another User Without Logging In On Mac OS X

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

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.

If you find yourself doing this often, a better solution may be to set up automatic log out for the user accounts on a Mac, so that after a period of inactivity, they automatically log themselves out in the intended manner of OS X, preserving applications, files, and save states. That approach is basically like using the  Apple menu > “Log Out Username” method, and is much softer than forcibly quitting a low level user process.

Source: http://osxdaily.com/2015/08/17/log-out-other-user-without-logging-in-mac-os-x/