Skip to main content

Fix Your Stuff

Right to Repair

Store

Introduction

If you forgot the password to your Mac or you need to create a new administrator account but you do not know the password of any administrator user account on the computer, or you just want to see the Setup Assistant again, this guide will show you how to trick your Mac into thinking it has never been set up before without wiping any of your data.

  1. Shut down your Mac
    • Shut down your Mac

    • Press and hold the Command + S keys immediately after pressing the power button to turn on your Mac.

    • It is best to start holding the keys before the screen turns on or you hear the startup chime. If you see the Apple logo, then you need to shut down and to do this step over. Except on a Mac with a T2 chip, the Apple logo will always appear the second the computer turns on.

    • You should see a black screen with white text.

  2. When the text stops, you should see a  line that says "localhost:/ root#" at the bottom. If you don't see "localhost:/ root#", press enter.
    • When the text stops, you should see a line that says "localhost:/ root#" at the bottom. If you don't see "localhost:/ root#", press enter.

    • Type in "mount -uw"

    • Some more text will appear on the screen. when you see the "localhost:/ root#"at the bottom, continue to the next step

  3. Type in, "rm /var/db/.AppleSetupDone" and press enter/ return
    • Type in, "rm /var/db/.AppleSetupDone" and press enter/ return

    • This is case sensitive since it is a file name.

    • There must be a space in between the rm and / otherwise you will get a "no such file or directory" error

    • This method WILL NOT work if FileVault is enabled on the startup disk.

  4. OPEN ALL THE TABS

    RAM Upgrade Kits for Mac

    Shop Kits

    Enough RAM
    For All The Tabs

    Shop Kits
  5. If you get a message that says "override r------- root/wheel for /var/db/.AppleSetupDone?", type in "y" and press enter/return.
    • If you get a message that says "override r------- root/wheel for /var/db/.AppleSetupDone?", type in "y" and press enter/return.

    • You may get an error that says, "rm: /var/db/.AppleSetupDone: read-only file system.

    • If you don't see a message that says "override r------- root/wheel for /var/db/.AppleSetupDone?", then continue to the next step.

  6. Type in "reboot" and press enter/return.
    • Type in "reboot" and press enter/return.

  7. Your Mac will now reboot to the Setup Assistant. you  can now set up your Mac. Your Mac will now reboot to the Setup Assistant. you  can now set up your Mac.
    • Your Mac will now reboot to the Setup Assistant. you can now set up your Mac.

  8. You have now created a new user account with full administrator access. And all the user accounts created prior to this remain untouched You have now created a new user account with full administrator access. And all the user accounts created prior to this remain untouched
    • You have now created a new user account with full administrator access. And all the user accounts created prior to this remain untouched

Conclusion

You have now successfully created a new administrator account on your Mac.

8 other people completed this guide.

Eli Carpenter

Member since: 12/16/2018

606 Reputation

2 Guides authored

2 Comments

What are the steps to overcome the error?

“You may get an error that says, rm: /var/db/.AppleSetupDone: read-only file system.”

dhinostroza - Reply

This error can be caused because FileVault is enabled or that there was some random error. Try running the same commands in Terminal in the macOS recovery partition and see if that works. This error may also occur on a Mac with a T2 chip. If FileVault is enabled, you will have to erase the hard drive/SSD and reinstall macOS if you forgot your password.

Eli Carpenter -

Add Comment

View Statistics:

Past 24 Hours: 8

Past 7 Days: 60

Past 30 Days: 306

All Time: 3,209