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
Omg, thanks for the advice, but it didn’t worked for me. I have Macbook air early 2014. I installed macOS Big Sur version 11.6.5
I did all the steps. I tried all versions. Nothing helps. I can’t even fix the time zone. I have been stripped from my rights in my only cumputer. I do all my work here and it is frustrating. I regret have done the installation of this system. If you could help me please contact me.
Liz
The process worked but when I open the files in my old account nothing is there ?
Help
Thanks a lot for your great tutorial. Updated Macbook Air 2015 von High Sierra auf Big Sur. Via Recovery Mode i created as described a new admin user and all was working fine! Had a lot other similar but always got no such directoy. going into the directory in your guide helped to fix it. Crazy that is a bug from apple which has never been fixed properly.
Many thanks for your feedback!
This worked for me, many thanks. Lost my admin privileges when upgrading to BigSur, now back. Cheers
You’re welcome!
Thank you so much you really saved me from lots of headaches. I have 2 a 2014 MacBook Air i5 4g and I updated from Mojave to Big Sur 11.6.4.
The 2nd option through recovery worked for me after many trials , because I made a few errors when typing the commands .
One more pointer ; after typing “Reboot” , the computer reboots to original account , so I had to shut down completely before trying to login.
I shut down completely after the reboot and it gave me the option to set up a new admin account.
Hi Tika,
Thank you very much for your detailed feedback! This will help others for sure!
Best regards,
Gee Are
So. hope the following information works for others. I ran into this issue with an iMac is was setting up for my Grandson. The iMac in question is a 2013 model 21″ with High Sierra. I wanted to change the name of the Admin account-and thats how somehow the Admin account became a ‘standard’ account.
The key problem is that if you try to remove the setup file in single user mode you can’t. and if you try to remove it in recovery you can’t. mostly due to it not being there.(/var/db). You can discover where it is by revealing all the invisible files on your computer(shift+command+.) at the hard drive level you will find the folder ‘var’ but it is an alias-if you follow the alias you will see it is at /private/var/db. So if you reboot into recovery mode and follow the instructions above you should be able to remove the file. I additionally before trying to remove disbabled integrity
csrutil disable
and made sure the disk was mounted
mount -uw /dev/disk1s1
after doing a cd /private/var/db
I did an LS to see the list of files
then did the RM
rm -f ./.AppleSetUpdone <-note not using SUDO
then did an LS again to see that the file was gone
then reboot to get to setup
Hope this helps someone
Hi. im battling the same issue.
former employee left, i wanted to set up the macbook air m1 for the new employee, but ended up with no admin profile, which is preventing me from installing the OS (Big Sur 16.2.01 (16201)). i tried all steps in this thread with no result:
Type cd /var/db and hit enter tab. -> next line appears: -bash-3.2#
Run the following command to remove file “.AppleSetupDone”: Type sudo rm -f ./.AppleSetUpdone and hit enter tab. : sudo: command not found
so then i try
rm “Volumes/Macintosh HD/var/db/.AppleSetupDone” -> No such file or directory
rm “/Volumes/Macintosh HD/var/db/.AppleSetupDone” – No such file or directory
Disk is mounted (as per Ross Babbit comment)
when I try to install the OS, accept T&C, click next, select Macintosh HD as destination of instal and click next, I keep getting an error (no user for authorization – ensure that there is at least 1 admin profile). when computer restarts, the boot bar gets 1/3 way through, resets, does that a few times, then I end up on the Apple ID verification, when I verify with the Mac’s associated ID, I end up at the recovery screen and I’ve been stuck in this loop for a while now. Any suggestions?
Hey the MacOS Recovery mode method worked like a charm! Thank you so much for the help getting an Admin account back on my mac!
You’re welcome! Great! Thanks for your feedback!
Big Sur Macbook Pro M1. Tried removing .AppleSetupDone and .AppleDiagnosticsSetupDone (both singularly and together). After reboot, it appears like new setup if taking place. Selected the language, then on to Wifi settings. Once I select my Wifi and click next, the screen goes black, then loads the original log in screen. No new admin account created.
Not sure if this helps, when I’m in Terminal and enter: “cd /Volumes”, then “ls -l”, returns these volumes:
Data
Image Volume
Preboot
ScondaryOSX
macos Base System
Do you know why I can’t add a new account through this method?
The 2nd option worked for me today on my vintage (Late 2014 iMac 27″) Mac when my Big Sur install downgraded my account from administrator to standard.
It puzzles me that it didn’t work for REBECCA J CLOUD – our situations seem nearly identical. Since your tips and other’s experiences were a lifesaver for me (I was about do the “Another Option” full reinstall from your January 12, 2022 at 06:58 post), I’ll detail my experience – especially since I did a slight variant at step 6 of your second method.
I have a late 2014 iMac (5K, 27″). It all started last night when I ran the upgrade from the latest version of Mohave to the current version of Catalina. Afterwards, the computer only got halfway through booting – stayed with a black screen and white Apple logo, half-thermometer bar, overnight. I did the Mac Recovery mode, used Disk Utility to run Disk First Aid on the two HD partitions, and tried rebooting again. No joy. The only reinstall option offered in Mac Recovery was Big Sur, so I ran that. After a couple hours, all seemed well, but after logging into Big Sur I found my main admin account was now a standard account, and in fact, I had no admin accounts on my machine at all. ( I think I’d given admin privileges to my Plan B” account, too.)
After Googling around, and trying some tips that worked on older OS’s, I found this page. I tried the first method (“Terminal”) only to find out that the pertinent command (“sudo”) now requires a password. So, no joy there.
I then tried the second method (Apple Recovery Mode). At step six, I did get the prompt: [-bash-3.2#
Your “cd” command didn’t work for me (likely because I typed something wrong), but I’m reasonably fluent in Unix, so I poked around to confirm the file was there. Based a tip from another website, I started over, and at step six, in response to the prompt: [-bash-3.2# , I entered:
rm “/Volumes/Macintosh HD/var/db/.AppleSetupDone”
photographed the screen for reference, and hit the Return key on my keyboard.
(The capitalization I used for “AppleSetupDone” matches your screenshot above, not the text instructions – I don’t know if that matters, but it certainly seemed safer to use the capitalization I saw on the screen.)
That worked. I then quit the terminal, and followed the rest of your steps. Worked fine.
Thanks!!!!
My 2016 15” MBP crashed during updating to Monterey 12.5 and all my administrators reset to standard accounts once i finally got it installed. This version of the instructions worked for me. The trick was the / before Volumes in the rm… command line, no one else in this thread had it! Also, and this might be obvious to some (but not me), substitute the name of your SSD for the phrase ‘MacintoshHD’ (in my case ‘Richard’s MBP’).
My SSD was mounted in Disk Utility but (on about the 10th try) i un-mounted it and the mounted it again before running the above Terminal command. Nit sure if this made a difference or not to be honest.
Thanks all, time for a nice glass of red to celebrate!
Hi Richard,
many thanks for your feedback and the additional information for macOS Monterey!
And for the glas red! ?
All the best,
Gee Are
thank you Richard, after many attempts the slight changes to code, you suggest here, solved the issue for me; my macbook’s about same age as yours btw