X

User accounts disappearing or becoming inactive

Some users have experienced an ongoing issue in which an account on the system will suddenly disappear. This is not a widespread problem, but users have been reporting it here and there for several months months.

CNET staff
4 min read

Some users have experienced an ongoing issue in which an account on the system will suddenly disappear. This is not a widespread problem, but users have been reporting it here and there for several months months.

Apple Discussions poster neojetlag writes:

"On my iMac with OS X 10.5.5 today a user account disappeared from the login screen as well from the system preferences; however, the folder on the hard disk is still there. When I try to create a new account it tells me that a folder with the name exists and if I would like to use it. After confirming [on this screen], again no account is there."

This problem does not result in any lost data, because the user's account folder is still on the drive. However, the user is no longer able to log in or otherwise authenticate using the account, and is not able to create new accounts with the same name. Users with only one account on their system have been left with a login window with no available accounts to use, and the options to shut down, sleep, or restart the computer, which has rendered their computers useless.

This problem appears to have been reported only on Intel-based Macs so far. However it is possible PowerPC Macs could also be affected. While it looks like some problem with the computer's directory there could be several factors contributing to this problem; but, there are several options for users who've been affected by this problem, including restoring from a backup, and using command line utilities to restore the account.

Potential Fixes Remove the account database preference file The reason users are not able to target the existing account folder for use with new accounts is the home folder settings for that account are still being kept in the account database preference file for that account. As such, users must remove this file and let the system recreate it upon creating the account again. To do this, users must first enable the "root" user account. This can be done by booting off the Leopard DVD and following the instructions provided by Apple in this support document. This will be required for users who's administrator account has been affected by this problem.

If users do not have a Leopard DVD handy, they can still enable the root account by first booting into Single-user mode. To do this, hold the command-S key combination down at bootup until the system drops the user to the command prompt (there are no graphics in single-user mode). Then type the following commands:

  1. mount -uw /
  2. passwd root (supply a password for the root account)
  3. restart

When the computer is rebooted, log in as "root" (providing the newly created password) and enter the following command at the terminal prompt:

  • rm /var/db/dslocal/nodes/Default/users/SHORT_USERNAME.plist

Be sure to change the "SHORT_USERNAME" to the login name of the affected user account. This is the name of the account's home folder as it appears in the Finder (ie: "jsmith" for user "John Smith"). When this file has been deleted, users should restart the computer. After this, when users recreate the lost account using System Preferences, they should be able to use the same username and old home folder directory without any errors. For users who only had one account on the system this will need to be done in the "root" account, but for other users this can be done in any administrator account.

NOTE: We recommend that users avoid running in root unless absolutely necessary. When logged in as root there are absolutely no restrictions to editing or accessing any file in the computer, so users should be very cautious about what they do in this mode, and be sure to enter all commands properly.

Create a new account and migrate data For users who might not wish to mess with the root account, another option is to just create a new account, with a new username, and then copy the old data from the previous user's home folder over to the new account. This will require users to set up personal information again (application settings, email accounts, and system settings), but it might be a cleaner way to get things running again.

Restore From Backup If users have a recent backup of the system, or have Time Machine running, another option would be to restore the system to the most recent working backup. With Time Machine users can boot off the Leopard DVD and then choose the "Restore System from Backup..." option in the "Utilities" menu to browse the Time Machine disk and restore from a backup instance where the user accounts were intact.

Resources

  • neojetlag
  • support document
  • More from Late-Breakers