If 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
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
- Open Terminal in macOS.
- Change the directory: Type cd /var/db and hit enter tab.
- Run the following command to remove file “.AppleSetupDone”: Type sudo rm -f ./.AppleSetUpdone and hit enter tab.
- 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”)
- 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)
- Log out of your Mac and log in in as your original account.
- 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
- Shut down your Mac.
- Reboot your Mac and press and hold “Command + R“.
- 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.
- On the next screen select Disk Utility and mount all internal discs, especially “Macintosh HD – Data“.
- Close Disk Utility and open Terminal via selecting Utilities and then Terminal.
- At the prompt (in my case [-bash-3.2#]) type cd /Volumes/”Macintosh HD”/var/db and hit enter tab.
- Run the following command to remove file “.AppleSetupDone”: Type rm -f ./.AppleSetUpdone and hit enter tab.
- Then reboot your Mac: Type reboot and hit enter tab.
- 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”)
- 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)
- Log out of your Mac and log in in as your original account.
- 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! 😉
64 Comments
Hello! Successfully recovered admin rights for my partner’s MacBook Air using MacOS Recovery Mode method. Very grateful for your clear instructions which even a novice could follow! Thank you so much.
You’re welcome! Which macOS is your MacBook running?
Hi Sue,
great to hear that! Many thanks for your feedback!
Best regards,
Gee Are
Thank you for this post. This is the only thing that worked for me. I lost my admin account after updating to Monterey (felt like a big mistake to update). Not a single command in multiple articles worked, kept on getting errors such as file not found. I followed the steps outlined by you via the recovery mode (terminal one did not work for me) and voila I got my admin account back. I am never going to update my software again. Thank you so much!!
You’re welcome!
I was so hopeful that this was my answer. Ever since I upgraded to Big Sur, I do not have administrator rights. And looking at my Users and Groups doesn’t indicate that anyone does. I have followed the steps for both suggestions listed. On the first one, as soon as I restarted, it just took me back to my own username/password screen. (I can log into that without issue; it just doesn’t consider me an administrator). On the second one, I was hopeful but I was stuck on the 2nd step…it didn’t even give me a place to “log in”. I did go ahead and follow the steps but again, when I typed reboot, it just took me back to my own username. I have talked to 3 people in apple support. Nothing is working. 🙁 I can’t even change the time on my own computer. I was told my computer is “vintage” so I have to make another trip to an Apple store for further help. (I just had my Macbook battery replaced too). I am just so frustrated!
Hi Rebecca,
many thanks for you’re detailed feedback!
Please, try this wirh your vintage Mac: https://miapple.me/how-to-recover-lost-admin-rights-on-os-x-10-11-el-capitan-and-10-10-yosemite/
Another Option:
– Make a complete Time Machine Backup of your Mac and a second one where you just copiy your personal files
– Reinstall your Mac
– Make a new time machine backup
– then make a recovery with the first ™ Backup
– if this does not work, use the second one and copy your personal files there
Hope one of these tipps helps!
Best regard,
Gee Are
Just worked for me on Monterey too. The key for me was to make sure to Mount the Macintosh HD – Data drive before typing in the Terminal commands. I had called Apple Support and they didn’t ask me to do that first and we couldn’t figure out why it wasn’t working. Thank you!
Hi Ross,
thank you very much for that feedback! Very helpful for all of us!
Best regards,
Gee Are
Hi,
I had the exact same issue after upgrading to Monterey. I was no longer able to change System Preferences or install new software because I would be asked for username and password. It SHOULD be the same password as you use to log into the computer, but alas, the computer doesn’t accept it. Kept giving me the shaking-because-you-have-the-wrong-password thang.
After a bunch of online research, I figured out that the issue is that my username was switched to be a “Standard” user, not an “Admin” user. So… effectively there was NO admin user on my account, thus no way to enter an admin username and password.
The solution is you need to trick the computer into running Setup Assistant again, so you can create a new user. That new user will automatically have admin rights. And then when you log in with that user, you can turn on admin rights for your original username.
I contacted Apple Support, and did a ton more research, and the steps everybody tells you to do are:
Re-start your computer in Recovery Mode, by holding down Command-R during boot-up.
Open Terminal
Type this command. Exactly, including spaces and quotes: rm “Volumes/Macintosh HD/var/db/.AppleSetupDone”
Then re-start your computer, and you’ll be taken into the Setup Assistant in which you can create a new user.
BUT: the problem for me was, it kept returning an error message in Terminal: “No such file or directory” And then I’d reboot, and no dice. Issue still there.
So…. more calls to Apple Support… and more research…. and through trial and error, this is what I figured out.
After going into Recovery Mode, I first went into Disk Utility. For some reason the volume listed as Macintosh HD – Data was showing as “unmounted”. So I simply hit the “Mount” button. And THEN I did the above steps, and it worked. Finally. Hallelujah.
It’s a major bug. If you’re having the same problem, and wanting to throw your computer out of the window, I get it. But hopefully this helps!
Apple, please fix in the next update! Thank you. Happy holidays.
Tried it on similar fashion same error No Such file Directory
Thank you so much for this great article. I’ve been struggling for two full days, after installing Monterey the admin account was gone. The horror! I’ve tried a lot of things and nothing worked, until I stumbled across your tutorial!
So thank you so much, you saved my day!!
Great job! Thank you this works fine on my Mac which just upgraded to Monterey.
I have been searching for all kinds of solutions they all told me to start the Singer-user-mode.
But this has been disabled after Mac OS 11.
This helped me a lot! Do you mind if translate this to Chinese and share it with the Chinese community?
Cause I don’t find any solutions in Chinese, I will refer to this page in the article.
Also apparently I post this comment on the other article you wrote, just ignore it 🙂
Again Thank you very much!
When I finished doing it, it gave me standard instead of admin. Any fixes?
Hi Aaron,
did you do it via Recovery Mode Method? If not, try this way.
Best regards,
Gee Are
Thank you for this post! Monterey stalled during installation and I was forced to use internet recovery mode. That took forever, but did properly install Monterey. But then when I logged in I discovered that my administrator account had been stripped of its privileges. Ugh! I went through a half-dozen articles that were poorly written, did not work or both. I appreciated how clear your instructions were, but more importantly that it worked!
Thanks again.
Hi Jack,
thank you very much for your feedback and the confirmation that fixing Mac has No Admin Account is working on macOS Monterey, too.
Best regards,
Gee Are
Hi Jack, I’m in a similar situation. Which option worked for you? Terminal or recovery?
hi i have macOs catalina. dont you have any way for me?
…macOS Catalina is the successor of macOS Mojave. This post is for Mojave or later. 😉
Cheers,
Gee Are