- User ID
- 1
- Joined
- 7 Jan 2019
- Messages
- 1,305
- Reaction score
- 87
- Points
- 48
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:
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!
- Boot into Single User Mode by pressing ⌘ + S before you hear the Apple chime.
- Mount the drive by typing /sbin/mount –uw / then enter.
- Remove the Apple Setup Done file by typing rm -v /var/db/.AppleSetupDone then enter.
- Reboot by typing reboot then enter.
- Complete the setup process, creating a new admin account.
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!