How to recover lost administrator account on MacBook?

I changed my administrator name the wrong way and now it has changed to standard. MacBook Air 2012 OS High Sierra 10.13.6 I have tried different suggestions from the discussions to try and get to the Setup Assistant but none of them has worked for me. Please advise.


[Re-Titled by Moderator]

Original Title: Lost Administrator account

MacBook Air 11″, macOS 10.13

Posted on Dec 4, 2025 11:17 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 4, 2025 7:09 PM

If you have another macOS admin user account on the laptop, then use the following Apple article to correct the mistake with your "broken" admin user account:

Change the name of your macOS user account and home folder - Apple Support



If you don't have another macOS admin user account, then you will need to trick macOS into running Setup Assistant again. This will involve using the command line. These particular instructions will only work on macOS up until about macOS 10.14 Mojave....different instructions are needed for macOS 10.15 to 13.x.....it is impossible to do this with macOS 14.x+.


You can do this by booting into Single User Mode by holding the Command + S keys just after powering on the computer & hearing the startup chime (hold it immediately after the chime...it may not work holding it sooner). Then at the command prompt enter the following commands making sure to press the "Return" key at the end of each line to execute each command:


fsck  -fy
mount  -uw  /
rm  -i  /var/db/.AppleSetupDone
reboot


If all these commands complete without any errors when you reboot the computer Setup Assistant should run where you can create a new admin user account. Once you create the new admin account follow the instructions in the link I provided earlier to fix your original user account. All of the instructions in that Apple article must be followed exactly.


Make sure to always have frequent and regular backups of your computer and all external media (including the cloud).


Edit: Corrected incorrect OS versions mentioned in my post here.

4 replies
Question marked as Top-ranking reply

Dec 4, 2025 7:09 PM in response to Blueflowerpot22

If you have another macOS admin user account on the laptop, then use the following Apple article to correct the mistake with your "broken" admin user account:

Change the name of your macOS user account and home folder - Apple Support



If you don't have another macOS admin user account, then you will need to trick macOS into running Setup Assistant again. This will involve using the command line. These particular instructions will only work on macOS up until about macOS 10.14 Mojave....different instructions are needed for macOS 10.15 to 13.x.....it is impossible to do this with macOS 14.x+.


You can do this by booting into Single User Mode by holding the Command + S keys just after powering on the computer & hearing the startup chime (hold it immediately after the chime...it may not work holding it sooner). Then at the command prompt enter the following commands making sure to press the "Return" key at the end of each line to execute each command:


fsck  -fy
mount  -uw  /
rm  -i  /var/db/.AppleSetupDone
reboot


If all these commands complete without any errors when you reboot the computer Setup Assistant should run where you can create a new admin user account. Once you create the new admin account follow the instructions in the link I provided earlier to fix your original user account. All of the instructions in that Apple article must be followed exactly.


Make sure to always have frequent and regular backups of your computer and all external media (including the cloud).


Edit: Corrected incorrect OS versions mentioned in my post here.

Dec 4, 2025 6:50 PM in response to Limnos

Limnos wrote:

Not that I have tried it but I thought it was impossible to not have at least one administrator status account on a Mac.

If a user attempts to change the short user name incorrectly, then it breaks their admin user account. Here is an Apple article which has instructions for changing the macOS user account name......the instructions must be followed exactly & every step is required (only one optional step).

Change the name of your macOS user account and home folder - Apple Support


How to recover lost administrator account on MacBook?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.