If you lost your administrator rights on macOS 10.13 High Sierra, Ā macOS 10.12, Mac OS X 10.10 Yosemite or MacĀ OS X 10.11 El Capitan, you can recover the admin privileges easily by rebooting into Apple’s Setup Assistant tool.Ā This will run before any accounts have been loaded, and will run in ārootā mode, allowing you to create accounts on your Mac. Then, you can recover your admin rights via the new administrator account. After that, you can reboot into your recovered admin account and delete the interim administrator account.
Note (Updated February, 3, 2021): The following fix applies to macOS High Sierra 10.13 and earlier. For macOS Mojave 10.14, macOS Big Sur 11 and later, fixing Mac no admin account via the āCommand ā Sā (SUM = Single User Mode) route is not possible anymore. The updated fix therefore is found here:Ā Fixing Mac No Admin Account On macOS Mojave Or Later

Recover lost admin rights on OS X 10.10 and 10.11_create a computer account
Normally, when you set up Mac OS X / macOSĀ for the first time, your initial account will be an administrative one, allowing you to configure the system and install applications. Sometimes rare, errors that occur when upgrading, e.g. from OS x 10.10 Yosemite to OS X 10.11 El Capitan, or restoring from backup, or otherwise when making heavy modifications to the system, could result in your admin account being destroyed so you cannot log in to it or use it for changing system settings.
If it happens then one quick but well-known and convenient trick for recovering administrative status on a system trigger Appleās Setup Assistant tool. This will run before any accounts have been loaded, and will run in ārootā mode, allowing you to create accounts on your Mac.
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 have the Setup Assistant run again so you can create a fresh admin account, you simply need to remove this file:
- Reboot your Mac and hold ‘Command-S‘ at the boot chimes to load into Single User mode (Disabled inĀ macOS Mojave or later, orĀ when using aĀ firmware password).
- At the command prompt, run the following command to make the filesystem writable:Ā mount -uw /
- Run the following command to remove the hidden file:Ā rm /var/db/.AppleSetupDone
- When completed, enter ‘reboot‘ and the prompt to restart the system, and you will now see the Setup Assistant load when OS X starts up.
- Proceed through its various screens, and create your new account. You might consider using a different username than any previous accounts on the system, to ensure there are no conflicts with the present and faulty accounts.
- Now you can log into the new admin account, and better manage the prior ones on your system, including deleting and recreating them accordingly.

Recover lost admin rights on OS X 10.10 and 10.11_allow user administer this computer
Notes:
- You should be aware that this method can be used to get administrative access to your Mac OS X / macOS system. This means it is a potentialĀ security risk. Anyone can reset account passwords or get admin access in this way, and be able to accessĀ all files on your computer.
- For getting a higher security level, be sure that all sensitive material on your system is password-protected or even better, encrypted. Even if someone gains access to your account, without your keychain password or the password for the encrypted files, they will not be able to access them. Consider to enable Apple’s FileVault and encrypting any external drives you use with your Mac (including Time Machine backups), to secure access to your files.
- The next option is to set a firmware password for your Mac, which will prevent booting to alternative boot modes and external disks. To do this, reboot to the OS X installation drive (be it a DVD or the Recovery HD partition in OS X Lion or later), choose your language when prompted, and then choose the ‘Firmware Password‘Ā option in the Utilities menu. Enter your password in the appropriate fields, and then nobody will be able to reset PRAM, boot to Safe Mode, Single User mode, or to alternative boot drives unless they either disable the password or supply it when prompted.
Easily recover lost admin right on Mac OS X 10.10 Yosemite, Mac OS X 10.11 El Capitan, Ā macOS 10.12 Sierra, and macOS 10.13 High Sierra by reactivating Apple’sĀ Setup Assistant tool. Be aware that this option is also a security risk to your mac.
Stay tuned! š
If you lost your administrator rights on Mac OS X 10.10 Yosemite or OS X 10.11 El Capitan, you can recover the… http://t.co/eN0p5pA4jI.
hey Gee, mine doesn’t work at all, even after I’ve followed all the steps, I still can’t make a new account
Sometimes you need to repeat the procedure several times. Have you already done this?
I’ve done this and it didn’t work
I’m having the same issue with Yosemite, but your first step doesn’t work. In the end I’m not able to have the start-up disk writable.
Hi Dirk,
the first step should work: Shut down your Mac, start your Mac again and immediately press & hold (!) ‘Command + S’.
Cheers,
Gee Are
Hi Gee,
yesterday it didn’t work, today it does. What a good sleep and a cup of coffee can do! Thanks for your support!
Regards,Dirk
Hi Dirk,
you’re welcome!
Cheers,
Gee Are
Thanks!!! This was really helpful.
Hi Freddy,
you’re welcome! Thanks for your feedback!
Cheers,
Gee Are
any risks of losing content? and will my current data be transferred to this new account?
Hi Anna,
I cannot guarantee you anything. But so far in my experience, there’s no risk if you do not delete any account.
Regarding your current data: You use the new account solely to gain access to your ‘old’ account again. This means you do not need to transfer any data. Just follow my instructions carefully step-by-step!
Cheers,
Gee Are
this does not work for me at all. I tried twice Do I press return after I enter these commands? Sorry to ask – I did enter return but it has not helped. I am not clear if I enter reboot at the end or ‘reboot’
Thank you
Hi Stephanie,
yes, you should press ‘Enter’ after these commands. Enter ‘reboot’ at the end!
Cheers,
Gee Are
Hi Gee,
I was trying to follow these directions from the way they display on my phone. It didn’t work. But I wondered if the longer commands were actually truncated by my phone since some lines didn’t say ‘enter’ or ‘return’ at the end.
After several failed attempts, I finally opened this page on a computer screen and could see the commands and format of them display in full. Anyone viewing the helps on a phone is not going to see it correctly.
Anyone who is struggling with this needs to know that every line of command ends with (return key) and if you don’t see it displayed that way, you need to view it on a larger screen.
Then it works! Thanks for the help!
Hi Gee,
Once I boot up my mac, it just starts up, and holding command + S didn’t do anything. What should I do?
Thanks
Hi there,
By accident, I ticked in the box “Allow user to administer this computer”. Now I have 2 admin accounts but I really want to remove one of them. I did log out the one I want to remove, logged in the one I want to keep, open the golden lock, but the “minus” button is always grey so I cannot remove it. Please anyone tell me what should I do now? Many thanks
I have the same problem
Great – this post saved me hours of work. Your blog just made it to the top of my list for Mac Tips/help
Hi Gary,
Youāre welcome! Many thanks for your feedback!
Cheers
Gee Are
It’s working, great !! Thanks a million! š
After reboot the normal login screen appears – what do you suggest?
Hi Roger,
repeat it again exactly as described.
Unplug your Mac for some minutes.
Cheers,
Gee Are
Hello Gee
I followed the instructions, but it didn“t work. Started normally after reboot. Does it work with High Sierra?
I did notice that when I wite this: mount -uw it / shows up as this: mount/uw/
Hi campanita,
you need to write āmount -uw /ā. The spaces between are essential. Please, try it again.
Cheers,
Gee Are
I have done this exactly but i get response that disk is write locked.. What does that mean
Hi, so umm.. i have this problem and did exactly what you told me to do. but all it does is that after rebooting, it just comes up on a normal startup screen. plz help.
Power off then on while holding command+S
Then on the command line type these orders, paying attention to spaces and capitals as shown below
This will reset the mac to the first start point, you vreat an admin account, then change the other account privilege to admin. . ..
mount -uw / (return key)
cd /var/db (return key)
mv dslocal dslocal.old (return key)
mkdir -p dslocal/nodes (return key)
cp -Rp /System/Library/DirectoryServiceS/DeafaultLocalDB/Default dslocal/nodes/ (return key)
rm .AppleSetupDone (return key)
reboot (return key)
it will show device is write locked
THREE FREAKING HOURS!, two blood pressure checks, one BP pill, 1.5mg Xanax, 150-200 MacBook help forums and pages……… AND THIS POST FIXED IT!!!! OhhhRah!
cp -Rp /System/Library/DirectoryServiceS/DefaultLocalDB/Default dslocal/nodes/ (return key)
Mind that a that is not supposed to be there
Power off then on while holding command+S
Then on the command line type these orders, paying attention to spaces and capitals as shown below
This will reset the mac to the first start point, you vreat an admin account, then change the other account privilege to admin. . ..
mount -uw / (return key)
cd /var/db (return key)
mv dslocal dslocal.old (return key)
mkdir -p dslocal/nodes (return key)
cp -Rp /System/Library/DirectoryServiceS/DeafaultLocalDB/Default dslocal/nodes/ (return key)
rm .AppleSetupDone (return key)
reboot (return key)
works perfectly fine.. Many Thanks
I just want to say It is incredibly annoying when I don’t actually use Facebook, but to in order to see the information I have to go the the process of recovering a password word so I can like this article only to find that it didn’t work. Probably an error on my end, I know, but it is still very frustrating.
It actually worked very well for me. Just make sure and put in spaces where his are. You have to pay attention to the spaces or it will not work.
I am up and running again!
Thanks Big Guy!!
Hi Gil
After I input this command into my computer, my computer wouldn’t reboot
Did you get your mac to reboot again?
I have the same problem now after trying Salam’s instructions on January 21st 2018.
Please help me.
Followed instructions carefully and am thrilled to have my comp all back up and running properly! Thank you so much!
It didnāt worked for me on a 2015 mbp
The both command mount -uw/ and /sbin/mount -uw/ is illegal commands
So I cannot do any of the commands below
This really saved my bacon, thanks! I skimmed these instructions on how to change an account’s username: https://support.apple.com/en-us/HT201548
I missed that you need to create a separate administrator account, and tried to do it from the account I was updating. When the computer restarted, the username and folder hadn’t changed, but the account was downgraded and I no longer had admin privileges.
hello I tried to change the user name on my admin account and i have lost admin privileges to my laptop I have researched to fix the problem and someone said you cannot fix if you have filevault enabled which i do, is there anything i can do? thanks! š
any solution ?
“rebooting into Appleās Setup Assistant tool. ” How?
came across this thread…finally…worked like a charm! Thanks so much! Your my hero!
Youāre welcome! š Thanks for your feedback!
How do you know when you are at the command prompt to enter the codes?
Hi there!
Will all my data and docs still be on my pc after I reboot it?
Thanks,
Amy
It should, you just create a new admin account. Do not delete any other account!
During the new account creation process, I am prompted to “Please enter the password used to unlock your Mac’s boot volume.” I have no idea what this means, and none of my passwords work.
Thank you,
Had the same glitch where renaming the user got rid of the admin privileges. This method did not work for me. Had success booting into single-user mode and deleting the user setup and it only took a few minutes.
Will this work even if my Firevault is turned on?? I tried 3x but no effects after reboot
I put myself in trouble with my wife’s iMac. Hers is a second hand one. Next to my admin account (Charlie V, my English nickname) I installed originally her account also with admin privileges. Last autumn, she accidentily deleted some software. That was for me the sign to change her into a standard user. Now, almost 9 months later, I need to install new software but I’m not allowed. And who’s the idiot now? ME! Seems I completely forgot my own admin password. I’ve been trying different combinations for over a week. I have tried all keyboard combinations. I could not solve it. Same with firmware password. Apparently the original owner must have added a firmware password? There is no possibility to access myself! Apple doesn’t wanna help me, because I have no official invoice. My iMac was not stolen! Can anybody help me?
what are the exact steps please. i somehow unchecked admin box and don’t have access anymore as a use, only standard user…
Pingback: Fixing Mac No Admin Account On macOS Mojave Or Later - miapple.me
Worked perfectly for my old High Sierra iMac and saved many hours of work – THANK YOU š
Youāre welcome!š
hi sir, my Mac would not accept my admin password or I have lost my privileges to have access on it. I followed the instruction but mine is not working. is there any alternative ways to restore my admin account even if my filevault is on. thank you
Hi Arjay,
on which macOS is your Mac running? If it is Mojave or later, try this link.
When I finish the .AppleSetupDone step, it says no such file or directory. Any advice?
Hi Brooke,
on which macOS is your Mac running? For Mojave or later try this fix: https://miapple.me/fixing-mac-no-admin-account-macos-mojave-later/
Best regards,
Gee Are
2021 here, this solution still works. Thank you.
Hi Laci,
thanks for your feedback. Indeed, old content, but still valid. š
Cheers,
Gee Are
I have completed all the instructions and managed to creat a new admin, but when I reboot and the machine starts up with the new admin name, the old admin account does not show nor is accessible. I have not deleted anything, but I am at my wits end trying to access the data and files from my original admin account.
Any suggestions?
Thanks
Great job! Thank you this works fine on my Mac which just upgraded to Montery.
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.
Again Thank you very much!
Hi! I think my Mac hid/deleted my users due to it running out of space.Tried to do this process. It gave me message this it was illegal command so I stopped and rebooted.
Now my computer is stuck on loading bar.
I contacted Apple Support and they suggested waiting it out and not restarting as it could damage the drive.
I have all of my work and files I canāt afford to lose on there. What can I do?
Hi,
what kind of macOS have you installed and how long is it rebooting? How does the screen look like?
Hi! Thanks for the reply. Iām running High Sierra 10.13.6.
Trying the process again. When I do the first command there is not many lines of code or anything much happening after. Just same ālocalhost:/ root#ā
Iām not sure if I should continue. Or keep entering the same command. My computer turned on to the login screen no problem before trying the commands. I think I messed it up more.
When I did reboot it powered back on to the Apple logo and loading bar. Once the bar was full it stayed there. I had it sitting all day trying to see if it wld eventually get back on to the login screen but it did not.
I eventually turned off and unplugged for a few hrs. Thank you for any help you can give me.
Hi Gee!
So Iāve gone through the process again and when I entered the rm /var/db/.AppleSetupDone it says there is no such file. Does that mean it worked the last time? Why would it not turn all the way on now?
Going into recovery mode to see if users still show on disc image. Have not tried to reboot and see if it starts up all the way yet. But I will be checking next. Fingers crossed.
Hoping this helps. Thank you!
Hi Gee!
So Iāve gone through the process again and when I entered the ārm /var/db/.AppleSetupDoneā it says there is no such file in the directory. Does that mean that removing it worked the last time? Why would it not turn all the way on now?
Went into recovery mode to see if users still show on disc image and everything is still there. When doing reset password command in terminal as Apple support instructed still doesnāt show users. So creating a new user account as you said seems the next step but I just canāt get to that point.
Rebooted and it only took a min or less for the loading bar to fill up but still seems stuck here. I donāt want to keep force turning it off and on and mess it up more. Iāve scheduled an appointment with Apple Support today but I would rather fix it before then.
Hi !
Itās not working for my Mac OS High Sierra, Iāve tried couple of times. I want to ask if my Administrator right could be resolved if I reinstall the Mac OS High sierra again ?
Yes, it should be resolved. However, you should make a backup before reinstalling.