Restarting Setup Assistant to create Admin user under Catalina

Last modified: Oct 13, 2023 9:00 AM
23 27495 Last modified Oct 13, 2023 9:00 AM

Note for Sonoma users

According to Apple, this method does not work on Sonoma. You have to Erase all Content and Settings.


For macOS Catalina through Ventura

There are several tutorials on how to delete .AppleSetupDone so that the Mac thinks it is new and runs the Setup Assistant to create a new Admin user if you have lost that capability.

However, those tutorials don't work under Catalina or later. I have tested this on Catalina, Big Sur, and Monterey.


Single-User Mode

You must boot up into Recovery and use Terminal. Other solutions still suggest booting into Single-User Mode and remove the file from System volume.

Apple has removed all the articles on Single-User mode, so suffice it to say Single-User mode allowed you to boot up as root into a Terminal-like console. This doesn't seem possible anymore and must be done from Terminal in Recovery.


Important point to follow there is you need to use Disk Utility to mount the drives. The - Data volume is the the one needed. If your Mac is encrypted, then you will need the decryption password which is commonly your admin password for the one account you no longer have admin capability. It should still decrypt the drive, even if it isn't admin. But, someone will have to verify that for me. If that doesn't work, none of this will. Time to Erase and reinstall.


Mounting the Startup Volume

In Disk Utility, select the Data volume from the list on the left and click the Mount button. If encrypted, it will ask for your password. Use the password from your old user as it should work.

Once it mounts, quit Disk Utility.


Removing .AppleSetupDone

From the Utilities menu, select Terminal.

You do not need to enter any of the commands provided in the various tutorials.

You need to be careful when entering commands in the command line. If you put a space where there should not be one, you could delete important parts of the OS.


At the prompt, enter:

rm -i /Volumes/Macintosh\ HD\ -\ Data/private/var/db/.AppleSetupDone

I have added the Interactive option (-i) so that it asks you to confirm deleting the file. This is your chance to confirm you have typed the command correctly, and it is going to delete the correct file.

Don't forget to escape the spaces with "\ " as shown in the above command.


Alternatively, you can enclose the entire path in double quotes, like this:

rm -i "/Volumes/Macintosh HD - Data/private/var/db/.AppleSetupDone"

With double quotes, you don't need to escape the spaces.


If you get any errors, like:

bash: <some characters>: command not found. 

You have a space in the line prior to <some characters> and it is trying to run the remainder as a command. You might see this several times if you put a lot of spaces in the wrong places. Did you escape the spaces in the path?


When entering the path in either method, you can type the first few characters and hit the tab key. It should expand that part of the path. If it stops in the middle, like Macintosh\ HD it is waiting for you to clarify which one. In that case, add, \ , and hit tab. It will then know which one you wanted.


If you have renamed your startup drive, just use that name with a " - Data" suffix or whatever it was named as found in Disk Utility when you mounted the Volume.


Restart

Select Restart from the Apple menu. It should boot up as if it just came out of the box.


Complete the Setup Assistant

The Setup Assistant will walk you through setting up the Mac.

Create a new user when prompted, but you do not need to setup iCloud or anything else for that user.


Repair old Admin user account

Log into the new Admin user.

If you have FileVault enabled, you will have to first decrypt the drive using the old admin user password. It will log into that account. From the Apple menu, choose Log Out <your name>…

You should then be able to log into the newly created user account.

  • Open Users & Groups System Preferences.
  • Click on the Padlock and Authenticate using your new admin user credentials.
  • Select the old user from the list.
  • Check the box labeled, "allow user to administer this computer."


Log out of the new user and log into your old user.

You can dispose of the new user account once you confirm you can elevate your privileges when necessary from the old user account. For instance, open Users & Groups and try to unlock the Padlock.


Why did I lose my Admin status?

This is most often caused by trying to rename or move your home folder while logged into the account you are changing. The very first step says to log into another admin capable account to make the changes. Failing to do so will cause you to lose your admin status when you change the short user name or home folder name.


Comments

Oct 12, 2021 9:13 PM

Great tip! It is still applicable for macOS Big Sur (and likely future macOS versions), which is fantastic.


One thing that I noticed is that the Apple Support article for Single User Mode and Verbose Mode appears to be deleted. Posting the steps it had would be helpful for new users.

Oct 12, 2021 9:13 PM

Oct 13, 2021 4:46 AM

I don't think it is possible to boot into Single-User mode on some Macs (or maybe OS related). I also don't have any way to get what was in that article. I removed the link and added some explanation.

Oct 13, 2021 4:46 AM

Dec 14, 2021 9:16 AM

I updated some of the wording and noted that I have confirmed that it works in Catalina through Monterey.

Dec 14, 2021 9:16 AM

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