Error: Logging in to the account failed because an error occurred.

I get this message when I try logging in. I am running OS Big Sur. I had this problem with High Sierra so Big Sur is a fresh install and it was running fine for 2 days while I reinstalled everything on the computer. The last application I installed was Toast 19 Pro, which required reboot, then this happened.


I think the issue is I am running a RAID 5 parallel to the Mac Pro and mirror the home directory onto the RAID. I changed the home directory under users/advanced options and saw in other threads this has been a problem.


I need a way to log in and access user accounts to create a dummy account just so I can change those settings and undo the mirrored home directory on the RAID drive (I'll figure out a different setup later).


Can anyone tell me how to access terminal or somehow get to log on again?


I've tried Safe Mode (Shift) but it won't boot into safe - not sure why?

I've tried Recovery (Shift+R) - won't boot into recovery - again unsure why??

I've tried Console (Shift+S) - won't do it, but I've read Console is disabled from Mojave onward, is this true?


Any help much appreciated

Mac Pro, macOS 11.5

Posted on Aug 22, 2021 11:57 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 22, 2021 1:23 PM

I reinstalled Big Sur and no help.


I found these instructions helpful:


  1. Shut down your Mac.
  2. Reboot your Mac and press and hold “Command + R“.
  3. At the “macOS Recovery”-Screen select a user, click on “Next” and enter the user’s password. Note: If you do not know the password click on “Forgot all passwords” and sign in with your Apple ID. This step is needed if you secured your Mac with FileVault.
  4. On the next screen select Disk Utility and mount all internal discs, especially “Macintosh HD – Data“.
  5. Close Disk Utility and open Terminal via selecting Utilities and then Terminal.
  6. At the prompt (in my case [-bash-3.2#]) type cd /Volumes/”Macintosh HD”/var/db and hit enter tab.
  7. Run the following command to remove file “.AppleSetupDone”: Type rm -f ./.AppleSetUpdone and hit enter tab.
  8. Then reboot your Mac: Type reboot and hit enter tab.
  9. Your Mac reboots. Go through the Setup Process. Create a new account and take a DIFFERENTusername than your Standard user account (e.g. “Backup Admin”)
  10. After logging in, open System Preferences and select your Standard user account and check the box labeled “Allow user to administer this computer” (Note: if the box is grayed out, click the lock icon the lower left to enabled editing)
  11. Log out of your Mac and log in in as your original account.
  12. Either delete the Admin account you created in step 4 or, even better, leave it as a backup account.


Hope this is helpful to others.

Similar questions

2 replies
Question marked as Top-ranking reply

Aug 22, 2021 1:23 PM in response to Busy Mom and Dad

I reinstalled Big Sur and no help.


I found these instructions helpful:


  1. Shut down your Mac.
  2. Reboot your Mac and press and hold “Command + R“.
  3. At the “macOS Recovery”-Screen select a user, click on “Next” and enter the user’s password. Note: If you do not know the password click on “Forgot all passwords” and sign in with your Apple ID. This step is needed if you secured your Mac with FileVault.
  4. On the next screen select Disk Utility and mount all internal discs, especially “Macintosh HD – Data“.
  5. Close Disk Utility and open Terminal via selecting Utilities and then Terminal.
  6. At the prompt (in my case [-bash-3.2#]) type cd /Volumes/”Macintosh HD”/var/db and hit enter tab.
  7. Run the following command to remove file “.AppleSetupDone”: Type rm -f ./.AppleSetUpdone and hit enter tab.
  8. Then reboot your Mac: Type reboot and hit enter tab.
  9. Your Mac reboots. Go through the Setup Process. Create a new account and take a DIFFERENTusername than your Standard user account (e.g. “Backup Admin”)
  10. After logging in, open System Preferences and select your Standard user account and check the box labeled “Allow user to administer this computer” (Note: if the box is grayed out, click the lock icon the lower left to enabled editing)
  11. Log out of your Mac and log in in as your original account.
  12. Either delete the Admin account you created in step 4 or, even better, leave it as a backup account.


Hope this is helpful to others.

Aug 22, 2021 12:08 PM in response to Busy Mom and Dad

Update, am able to access Recovery Mode. Any suggestions on where to go from here?


Should I re-install Big Sur?


Or is there a command line that would allow me to create a dummy admin user that I can log into from login screen? I tried andyball_uk's command rm /var/db/.AppleSetupDone from a thread from years ago with Snow Leopard, but terminal says no such directory exists so I think things have changed from OS's.

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.

Error: Logging in to the account failed because an error occurred.

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