I keep getting logged out when I switch users

As you may know, troubleshooting is a process of elimination and often requires patience. There are a number of things I suggest you try to get to the bottom of this.

1. Bootup into Safe Mode

First of all let's boot up into Safe Mode. Not only can you test to see if the problem is replicated in Safe Mode, but the very act of booting into Safe Mode will run some checks, delete system cache files, verify your startup disk, and attempt to repair directory issues (if any are identified).

Follow these steps to boot your Mac into Safe Mode:

  1. Fully shut down your Mac
  2. Restart your Mac
  3. Immediately press the Shift key and keep it down
  4. Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
  5. Take a note of what happens (i.e. could you boot your Mac okay, is the issue still present, etc)
  6. To exit Safe Mode just restart your Mac as normal

Once you've booted into Safe Mode, let me know how you went. This will help determine if the issue is related to third party software etc.

2. Reset your PRAM/NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). It may be worth you also resetting this.

Your question doesn't specify what model of Mac you're using, but all Macs (except for Late-2016 MacBook Pro models) use the same process. I've included steps for both scenarios below:

  • For ALL models EXCEPT for Late-2016 MacBook Pros

    1. Shut down your machine. Yes, a full shut down, not just logging out.
    2. Press the power button and then press the commandoptionpr keys. You have to make sure you press these keys before the gray screen appears or it won’t work.
    3. Hold those keys down until your Mac reboots again and you here the startup chime.
    4. Let go of the keys and let your Mac reboot normally.

Note: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

  • For all Late-2016 MacBook Pro models (with and without Touch Bar) follow these steps:

    1. Shut down your machine. Yes, a full shut down, not just logging out.
    2. Press the power button and then immediately press the commandoptionpr keys.
    3. Keep these keys pressed down for at least 20 seconds!
    4. Let go of the keys and let your Mac reboot normally.

Note: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

3. Delete preferences

If starting in Safe Mode and resetting your PRAM/NVRAM does not resolve the issue, delete the com.apple.systempreferences.plist and com.apple.loginwindow.plist files.

To do this:

  1. While only logged into your main account and within Finder, hold the option key while clicking on the Go menu
  2. Select the Library option from the drop-down menu
  3. In the Library window that opens up, find and open the Preferences folder
  4. Right-click on com.apple.systempreferences.plist and select Move to Trash
  5. Right-click on com.apple.loginwindow.plist and select Move to Trash
  6. Restart the computer
  7. Empty the trash

Test to see whether this has made any difference to your problem.

4. Create a new user account

If doing all three things above do not resolve the issue, I suggest creating a new user account. However, do not do this until you know the problem isn't resolved.

  1. Create a new user account
  2. Reboot your Mac as normal
  3. Log into the new account and use it for a little while (maybe some web browsing)
  4. Now try using fast user switching to switch to another account
  5. Take note of what happens (was the new user logged out or not?)
  6. If the new user wasn't logged out, continue to step 7, otherwise stop here and report back
  7. Use the account you're now logged into for a while
  8. Now try fast user switching back to the new user account
  9. Take note of what happens (was the old user logged out when you switched back to the new user account?)
  10. Regardless of what happens at Step 9, now try using fast user switching to switch to another account
  11. Take note of what happens (was the new user logged out or not?)

After doing the above, report back on what happened at Step 6. If you progressed further, also report on what happened at Steps 9 and 11.

If you found the problem was not replicated in the above 11 steps, then use your computer normally (but do not delete the new user account you created). If the problem reappears, then start using the new user account instead for a while as your main account and see whether the problem returns.