Create a new Mac Administrator account using Single User Mode

Andy

Administrator
Joined
7 Jan 2019
Messages
160
Reaction score
6
Points
18
If you ever need to recreate admin account on your Mac, this is the quickest and safest way to do it without breaking your Mac:
  1. Boot into Single User Mode by pressing ⌘ + S before you hear the Apple chime.
  2. Mount the drive by typing /sbin/mount –uw / then enter.
  3. Remove the Apple Setup Done file by typing rm -v /var/db/.AppleSetupDone then enter.
  4. Reboot by typing reboot then enter.
  5. Complete the setup process, creating a new admin account.
This will force macOS to redo the initial first account creation, and doing so will not affect the current user profiles (they will remain intact) – so, if you prefer to make them as admin later, you can do that as well by logging in using the newly created admin account, then go to System Preferences, then Users & Groups, select the existing user, and tick “Allow user to administer this computer.

I tested on macOS 10.14 Mojave and it worked:

ark:db andy$ pwd
/var/db
ark:db andy$ ls -al .AppleSetupDone
-r-------- 1 root wheel 0 Apr 4 2017 .AppleSetupDone
ark:db andy$ uname -a
Darwin ark.local 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
ark:db andy$

If you have any questions or comments, please feel free to post down below. Cheers!
 

alexjphillipson

New member
Joined
12 Nov 2019
Messages
1
Reaction score
0
Points
1
This does not work for me.

Every time I do this, I complete the account creation and after I fill out the page where it asks for my full name, the account name, password, and password hint, it tells me it can not create an account with the name I gave it. Then it just freezes and I have to hard reboot the mac. Also this has happened on 3 different computers, 3 different models.

What should I do?
 

Andy

Administrator
Joined
7 Jan 2019
Messages
160
Reaction score
6
Points
18
This does not work for me.

Every time I do this, I complete the account creation and after I fill out the page where it asks for my full name, the account name, password, and password hint, it tells me it can not create an account with the name I gave it. Then it just freezes and I have to hard reboot the mac. Also this has happened on 3 different computers, 3 different models.

What should I do?
Hi Alex,

Did you try to create using the name that previously known by the system? If so, please try creating a different name (totally unique).

Cheers
Andy
 
Top