How do I fix a corrupted admin account? I get an error when I attempt to log in.

There was a shut down due to a power failure. When the mac started again, it did not show my Home folder, which is on an external drive. The desktop was not correct and everything looks sort of generic, rather than reflecting my preferences.


I use the Advanced Options in the user accounts to reset my home folder, although it seemed to show the correct location for it. When I changed it, the locations was shown as externaldisc1 rather than externaldisk, which I thought was the correct name (not the real names). I used disk utility to check name of the external disk and it should the volume as externadisk1, so I went ahead and made the change.


Now I cannot login. I get an message that says Cannot log in at this time because an error occurred.


I have two drives that I can use as a startup. The internal drive is running 10.9. This is the one that has the problem. I can still login if I startup from the external drive, which is running 10.8, as can be seen below, and is the disk on which the Home Folder is located.

iMac (24-inch Early 2009), OS X Mountain Lion (10.8.4)

Posted on Apr 6, 2014 4:32 PM

Reply
15 replies

Apr 7, 2014 8:04 AM in response to SilverSkyRat

Yes, that is what I thought, too. I have no idea what the orignal problem is. The only advantage that this may have over a clean install, is that I may not have to reinstall all my applications. I have original disks for some, but I would have to secure updates for most of those. Some applications were downloaded from the internet, so I would have to find those again.


I could restore the applications folder from the Time Machine backup, but there may be things, on which some applications are dependent, that are in the system library and those would not be restored.


So, I think that I will try the new admin account fix first. Since I have reset the admin password for te current account, do you think that I could use the original password for the new admin account?

Apr 6, 2014 8:17 PM in response to kingfisher500

Hi kf, follow these steps (if a step does not succeed, do not perform the next step, but reply back with the error information, if any):


  1. Restart, hold down option key when you hear the chime
  2. Select "Recovery HD"
  3. Select "Disk Utility"
  4. In the left pane at the top, select the physical drive (above Maci tosh HD). Check that, at the bottom of the right pane, S.M.A.R.T. status is "Veriified"
  5. In the left pane at the top, select "Macintosh HD" and make sure that the "First Aid" button is selected at the top of the right pane
  6. Click the "Verify Disk" button - if there are ANY errors at all, when the verify has finished, click the "Repair Disk" button. Repeat this until "Verify Disk" shows no errors, but stop after a third attempt.
  7. Click the "Verify Permissions" button - if there are ANY errors at all, when the verify has finished, click the "Repair Permissions" button. Repeat this until "Verify Permissions" shows no errors, but stop after a third attempt.
  8. Restart normally and test. Reply back with results, good or bad.

Apr 7, 2014 6:02 AM in response to SilverSkyRat

I followed your instructions.

S.M.A.R.T. status is "Verified"

Verify Disk reports "Volume appears to be OK"

Verify Permissions reported numerous errors where the group or user differed e.g. "should be 0; user is 501"

Repaired Permissions.

Verify Permissions reported no errors.

Attempted normal restart.

Login error: "You are unable to log in to the user account "name" at this time. Loggin in to the account failed because an error occurred."


macbookbro67, in response to an identical error under Mountain Lion, recommended on 9/26/12 booting into single user mode and after removing the file that OS X checks to determine whether it is running for the first time, reboot and set up a new admin account to log into.


I will provide the link for that post in my next message.


I would like to know what you think of that as a possible solution or what you think I should do next.

Apr 7, 2014 6:58 AM in response to kingfisher500

Well, if it were me, I'd try a couple of other things first:


- Force a reset of the admin password

  1. As before, boot into Recovery HD
  2. From the menu, choose Utilities, Terminal
  3. Type "resetpassword" (without the quotes) and hit enter
  4. Select the Macintosh HD volume
  5. Select your account from the list and give it a new password, click Save
  6. Restart normally and test


- Reset your Home directory permissions

  1. Do steps 1-5 above, choosing yet another password
  2. Also click "Reset"
  3. Restart normally and test


I Believe in trying things that to from the least potential harm to the greatest 🙂 if these don't work, please reply back.


My next choice would be to do a restore from time machine from a point before you had this trouble (you do have backups?) and, in the absence of advice from more experienced community members, you could try the linked article, bearing in mind that a full erase and reinstall might be needed.

Apr 7, 2014 7:37 AM in response to SilverSkyRat

I Forced an admin password resetd.


I tried a normal boot and got the same error message: "You are unable to log in to the user account "name" at this time. Loggin in to the account failed because an error occurred."


I then forced an admin password reset and a Home Directory reset, tried a normal boot, and got the same error message.


I also tried to log in as "Guest" and encountered no problem.

Apr 7, 2014 9:08 AM in response to SilverSkyRat

The instructions for creating a new admn account did not work. They were written for Mountain Lion and the file that is to be removed must have a different name in Mavericks.


When I entered the command rm /var/db/ .applesetupdone I got a message saying that there was no such file or directory.


So now, I will try to find out if anyone knows how to do that in Mavericks and, if that does not work, it will be clean install time.


Restoring applications may not be the trouble I feared as I have almost all them installed on the external hard drive as well as on the internal (the one that will be erased).

Apr 7, 2014 11:25 AM in response to SilverSkyRat

I managed to create a nrw admin account after all.


Instead of typing rm /var/db/ .applesetupdone, I typed rm /var/db/.AppleSetupDone


I think that the problem was not the lack of caps, but the fact that I had a space between db/ and .applesetupdone.


Whatever it was, it worked and I was able to create a new admin account. I could not, however, use the original password, and when I was all finished, I still could not change the location of my Home directory. So I have decided to upgrade the external drive to Mavericks, make sure that everything can run from there and, if so, then do a clean install of Mavericks on the internal and use that for an emergency backup drive.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I fix a corrupted admin account? I get an error when I attempt to log in.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.