Recover lost admin rights on OS X 10.10 and 10.11_allow user administer this computer
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
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:
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.
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.
Hi there,my name is Gee Are, blogger and analyst. Blogging is my Passion! I’m the founder and owner of the two blogs called pabst.socialmedia and miapple.me - Tech.Blog.My work experience as a blogger and analysist (Internet Intelligence, SEO and social media) is the basis of the services of pabst.socialmedia.Find more about me.
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.
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!!
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.
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. . ..
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. . ..
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!
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/
71 Comments
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.
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
Followed instructions carefully and am thrilled to have my comp all back up and running properly! Thank you so much!
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.
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!!
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.
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
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
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
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