Fixing Mac No Admin Account On macOS Mojave Or Later

macos-icon 225x225If your Mac has no admin account anymore or if your macOS account lost its administrator rights on macOS 10.14 Mojave, macOS 11 Big Sur or later, you can recover the macOS admin rights easily by running again Apple’s Setup Assistant tool to add a new admin account. For getting in the setup process, you have to remove the file “.AppleSetUpDone” via Terminal or macOS Recovery mode. Then, you can recover the admin rights of your original admin account via the new administrator account. After that, you can reboot into your recovered one and delete the interim admin account.

Note: The following fixes apply to macOS Mojave 10.14, macOS Big Sur 11 and later. For macOS High Sierra 10.13 and earlier, fixing Mac no admin account is solved via the “Command – S” (SUM = Single User Mode) route which is deactivate in later macOS versions: How To Recover Lost Admin Rights On macOS High Sierra and Sierra, Mac OS X El Capitan And Yosemite

Fixing Mac no admin account on macOS delete File .AppleSetUpDone

Fixing Mac no admin account on macOS delete File .AppleSetUpDone

The following fix “Mac no admin account” works if you lost admin account and admin rights

  • during upgrading, e.g. from OS X 10.13 High Sierra to macOS Mojave 10.14 or to macOS Big Sur 11
  • after restoring your Mac from backup, or
  • after making heavy modifications to the system

The above mentioned situations can result in destroying or downgrading your admin account to a standard user account with no admin rights. In consequence,  you cannot log in to your admin account or cannot use it for changing system settings.

Even though the Setup Assistant only runs once when you first install Mac OS X / macOS, it remains on your computer and is prevented from running by the presences of a hidden file called ‘.AppleSetupDone‘ in a system folder on your Mac. Therefore, to go through the Setup Assistant again you can create a fresh admin account, you simply need to remove this file:

Mac no admin account: How to recover admin rights by deleting .AppleSetupDone file via Terminal

  1. Open Terminal in macOS.
  2. Change the directory: Type cd /var/db and hit enter tab.
  3. Run the following command to remove file “.AppleSetupDone”: Type sudo rm -f ./.AppleSetUpdone and hit enter tab.
  4. Restart your Mac and go through the Setup Process.  Create a new account and take a DIFFERENT username than your Standard user account (e.g. “Backup Admin”)
  5. 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)
  6. Log out of your Mac and log in in as your original account.
  7. Either delete the Admin account you created in step 4 or, even better, leave it as a backup account.

Mac no admin account: How to recover admin rights by deleting .AppleSetupDone file via macOS Recovery Mode

  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 DIFFERENT username 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.

Lost access to admin account on macOS 10.14 Mojave or later, can easily restored by reactivating Apple’s Setup Assistant tool through deleting the file “.AppleSetupDone” via terminal or macOS recovery mode. After rebooting your Mac or MacBook you walk through the process to set up a fresh administrator account with full admin rights.

Stay tuned! 😉

10 thoughts on “Fixing Mac No Admin Account On macOS Mojave Or Later”

  1. Pingback: How To Recover Lost Admin Rights On macOS High Sierra and Sierra, Mac OS X El Capitan And Yosemite - miapple.me

  2. The instructions for doing this via Terminal don’t work, because sudo requires an admin account — and the lack of an admin account is the whole reason for going through this!

  3. Terminal doesn’t work because there are no admin users. When I enter recovery mode it says there are no admin users and only gives a restart option. Probably a good thing security-wise that this is difficult but what a pain! I will have to contact Apple support.

  4. I can’t get to the set up process, gone through the steps using recovery, put each line in Terminal and didn’t say anything each line (put it in wrong a few times and it said doesn’t recognise or something) put reboot but then it just brings me back to the login screen, no setup process?

  5. Hey there, I got most of the way through this process, but after trying to make the new account, the machine stops at the create-new-account screen; just sticks there with no resolution. I restart and the account is technically created but will not log in, and the recovery mode does not detect the account either.

    My use case was downgrading from Monterey, in case you were wondering.

Leave a Reply

Your email address will not be published. Required fields are marked *