Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

You are unable to log in to the user account "xxxx" at this time. Logging in to the account failed because an error occurred - QUICK EASY FIX

YOU DO NOT HAVE TO RE-INSTALL MOUNTAIN LION -


If you find yourself locked out of your ML administrator account - and/or all other admin accounts and receive this message when entering the correct password: "You are unable to log in to the user account "xxxx" at this time. Logging in to the account failed because an error occurred" this is due to a misconfiguration in your server active directory set-up.


You need a new admin account - follow these directions to get yourself a new administrator level account on your mac with all your original files and settings intact - here we go:


STEP 1 BOOT INTO SINGLE USER MODE


Boot your affected Mac into Single User Mode by pressing Command + S at the chime


Note** if you are using rEFIt, highlight the icon which boots into the OSX installation you are currently locked out of and then press F2, nav down the menu options to Boot into single user mode and hit ENTER


STEP 2 MOUNT YOUR OS X INSTALLATION


Type: /sbin/mount -uw / at the prompt and hit enter.


STEP 3 TRICK OSX START UP INTO BELIEVING ITS BEING RUN FOR THE FIRST TIME


Type: rm /var/db/.applesetupdone


What this does is deletes a specific file OSX checks each time it runs to determine whether its running for the first time or if accounts have already been set up. By removing this file, when we reboot, OSX will assume this is a brand new set-up and will allow us to create new accounts.


STEB 4 REBOOT


Type: reboot


STEP 5 - SET UP A NEW ADMIN ACCOUNT --- BUT DO NOT USE THE SAME NAME AS ANY EXISTING ACCOUNT


If you use the name of an existing account, you will overwrite the files of that account. Just set up a new unique admin account and then log in. once you are logged back into your Mac with administrator access, you can correct the issues which locked you out in the first place.




If this fails or you prefer another method of gaining access - I recommend the open source ophcrack application - it works pretty well too and detailed instructions can be found at SourceForge.


Hope this helps some of you experiencing some of the same ML and ML Server issues I am run into. Reformatting a partition is a last ditch solution.

iMac, OS X Mountain Lion (10.8.2), Works for Administrator Lock-Outs

Posted on Sep 21, 2012 7:21 PM

Reply
21 replies

Jan 31, 2017 4:52 AM in response to macbookbro67

TThis is happening to me since I changed my user home folder ago an external hard drive, I started to have issues with keychain, and then I could not log in anymore. I had previously created a second account( located main drive), so I can log on it, but I still can't repair the account on secondary drive, because there is no repair permission features anymore on macosx Sierra. The only thing I can do, while I can't log with it, is to wait to get a bigger main SSD and restore my backup on it. The only thing is I can't work on things till then, unless I save projects on an external drive, to be able to get it back after restore. Sierra is just a big hassle.

Apr 8, 2014 7:15 AM in response to baltwo

I tried again. I had left a space after "db/" and ".applesetupdone"


I eliminated the space and changed the filename to ".AppleSetupDone" and it worked.


I was unable to use my original password but, with a new one, I was able to log in. I was not, however, able to change the Home Folder, which is what I was trying to do when things went wrong.


I have installed Mavericks on an external drive, which houses my Home Folder, and then do a clean install on this internal drive and use it as aan emergency startup drive.


Thanks for your help.

May 3, 2015 12:59 PM in response to macbookbro67

Hello. I tried this message to but the error transferred over to the new admin acct i created. I think the bug/error is on my time machine backup becaus i restored the files there ( so i coould have access to my files) and then i couldnt sign back in!!! I wont do that again (restore from time macjine) but how do i "correct the issue that caused the error in the first place" when i dont know what that was?!? Any help you could provide would be appreciated. Thank you.

Nov 3, 2015 10:26 PM in response to macbookbro67

"...once you are logged back into your Mac with administrator access, you can correct the issues which locked you out in the first place..." The question is how to correct the issues? I have three admin accounts in my mac. Two accounts have no problem to log in so I can still use any as an admin account, but my main admin account is blocked. It has iPhoto and Aperture albums which I like to retrieve. I used Time Machine to go bak but that still blocked me out of the main admin account. The photo albums in all I want. Do you have any other tricks up your sleeve? Thanks.

Dec 31, 2015 7:32 AM in response to macbookbro67

I had moved my home directory to an external hard drive. A few years later, I changed to name of the hard drive using 'get info.' This is when things got screwed up and I started getting the frustrating message that I cannot log in to my account (Admin). However, when I log in as a Guest, I can make changes using my admin ID. So the computer recognizes my admin privileges under the Guest account!


Solution: Revert the name of the hard drive back to the original name and everything worked as before. I guess I could have, instead, updated the file path but I was too frustrated to try anything new and adventurous.

You are unable to log in to the user account "xxxx" at this time. Logging in to the account failed because an error occurred - QUICK EASY FIX

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