← Back to Archives

Problems with Guest Accounts on Mac OS X

system

Note: this applies to Leopard (10.5), not Snow Leopard (10.6); SL apparently has its own serious guest account problems. (Thanks, Harlan)

Today, a friend wanted to use my laptop at a meeting. I thought, cool, good thing Mac OS X has a "guest account" mechanism where a friend can log into a guest account and when they log out, it will be completely cleaned from my system.

However, when I clicked "Allow guests to log into this computer", something went wrong and the Mac "spinning beach ball" spun indefinitely. Damn.

It turns out that something in the backend expects a guest account to already exist in some form. Because it's not there, something critical crashes ("user account migration somehow confuses the 'guest user' machinery, which totally trashes securityd which dies of sudden death and from then on nothing works on the computer." via izidor).

Solving this problem is straight-forward but a bit of a pain in the ass.

  1. First, print this out or bookmark this page so you can come back to it.
  2. Force-quite system preferences and then you'll have to hold down the power key on your computer until it shuts down (feel free to try a restart, it won't work... it gets stuck in some sort of loop).
  3. Restart.
  4. Log in as an administrator.
  5. Your system guest account must be disabled (it already is if you have the described symptoms above).
  6. In the Accounts pane of System Preferences, Create new standard account with name guest and short name guest. Important: the short name must be guest---Mac OS will suggest the short name guest1, but you must edit that into guest.
  7. Enable the system guest account in System Preferences (check the "Allow guests to log into this computer" switch). It will work now that guest name is taken. This action will create user account with short name guest1 with all the properties of guest (clean-up after logout etc.).
  8. Completely delete standard user guest, which you created in step 6 (check "delete home folder" to get rid of it all).
  9. Disable the system guest account (uncheck the switch).
  10. Right-click on system guest account icon and choose "Advanced" or whatever (there is only one menu item anyway) and change short name from guest1 to guest.
  11. Enable system guest account.
  12. Log into the guest account.
  13. Log off as guest and log in with an admin account.
  14. Disable guest account in System Preferences.
  15. Go back to System Preferences, open the advanced settings of Guest Account and now you can safely rename the path of the home dir from /Users/Guest1 to /Users/Guest.
  16. Now re-enable guest account.
  17. The next time, you log in as guest, a new guest dir will be created with the correct name Guest.