Hey everyone! I messed up while running a script on my M1 Mac (running Big Sur). I was trying to change one admin account to a standard user, but I ended up converting all my admin accounts into standard users 😬. My Mac isn’t managed, and now I’m stuck without admin access. I tried some Terminal commands, but they all ask for admin credentials, which I obviously can’t provide anymore. Has anyone else dealt with this before? Any ideas on how I can fix this without wiping or resetting my Mac?
Accidentally converted all admin accounts to standard user accounts on MacsSolved
Tags
Replies (3)
Hey @schyler-scott! You can get your admin access back without any data loss. Follow these steps to reset the Setup Assistant and create a new admin account. Once done, you can use the new admin account to restore admin rights to your other accounts.
- Shut down your Mac.
- Hold down the power button along with Command + S to enter Recovery Mode.
- Once in, go to Options > Utilities > Terminal.
- In Terminal, type this command:
terminal command 11rm /var/db/.AppleSetupDone
Hi everyone! I tried these steps but got a “No such file or directory” error when running the command in Terminal. I’ve tried every fix I could find online, but I keep hitting this same error, and it’s getting really frustrating!
Hello @schyler-scott and @wilma ! @bram’s instructions are correct. If you’re seeing a “No such file or directory” error, it likely means your system partition isn’t properly mounted in Recovery Mode. To resolve this, follow the steps given below after entering Recovery Mode.
- Type the following in Terminal to list all volumes:
Terminal command 21diskutil list
- Find your main partition (probably something like “Macintosh HD”) and mount it using:
Terminal command 31diskutil mount /dev/diskXsY
(Replace X and Y with the right numbers from the diskutil list output, e.g., /dev/disk2s1)
- Once the partition is mounted, try deleting the setup file:
Terminal command 41rm /Volumes/Macintosh\ HD/var/db/.AppleSetupDone
If your system volume has a different name than “Macintosh HD,” substitute it in the command.
- After running this, restart your Mac using:
Terminal command 51reboot
After it restarts, you’ll see the Setup Assistant, which will allow you to create a new admin account. You can then promote your original accounts back to admin status.
That’s it! Should be all good to go. Let me know if you run into any trouble along the way!
Cheers,
Ben Clarke
Hexnode UEM
-
Expand