Accidentally Deleted Admin Account on Mac: A Step-by-Step Guide to Recovery
Accidents happen, and sometimes, they can lead to the accidental deletion of an admin account on your Mac. Don't panic! This comprehensive guide will walk you through the process of recovering your admin account and getting your Mac back to normal.
Understanding the Mac Recovery Mode
Before we dive into the recovery process, it's essential to understand the Mac Recovery Mode. This mode allows you to troubleshoot your Mac without booting into the usual macOS environment. It's equipped with a variety of utilities to help you manage disk permissions, repair disk issues, and even restore your system from a Time Machine backup.
Accessing the Recovery Mode
- Restart your Mac and immediately press and hold Command (⌘) + R until you see the spinning globe icon.
- If your Mac has an Intel processor, you'll see the macOS Utilities window. If it has an Apple silicon chip, you'll need to select Disk Utility from the Utilities window that appears.
Using Terminal to Recover Your Admin Account
Now that you're in the Recovery Mode, let's use the Terminal app to create a new admin user and then use it to recover your accidentally deleted admin account.
![Delete Admin User on Mac Without Password [ Best Way] - Alvaro Trigo's Blog](https://alvarotrigo.com/blog/wp-content/uploads/2024/02/click-admin-account-delete-mac.jpg)
Creating a New Admin User
- In the macOS Utilities window, select Utilities from the menu bar and then select Terminal.
- In the Terminal window, type the following command and press Return:
fsutil usermgr createNewUser - Follow the on-screen prompts to create a new admin user. Make sure to note down the username and password you create.
Recovering Your Accidentally Deleted Admin Account
- Type the following command in the Terminal window and press Return:
sudo /usr/sbin/dscl . -read /Users/username(Replace 'username' with the username of your accidentally deleted admin account.) - If the account exists, you'll see its properties. If it doesn't, you'll need to create it manually using the
dsclcommand. Here's how:- Type the following command and press Return:
sudo /usr/sbin/dscl . -create /Users/username - Then, set the password for the account with the following command:
sudo /usr/sbin/dscl . -passwd /Users/username newpassword(Replace 'newpassword' with a new password for your admin account.)
- Type the following command and press Return:
Reverting to Your Original Admin Account
Now that you've recovered your accidentally deleted admin account, it's time to revert to it and delete the temporary admin user you created earlier.
Switching Back to Your Original Admin Account
- Restart your Mac and hold down the Option key during startup. This will bring up the Startup Manager.
- Select the drive containing your macOS installation and press Return.
- In the login window, select Other... from the Apple menu, then click on the + button to add your original admin user.
- Log in with your original admin user credentials.
Deleting the Temporary Admin User
- Open System Preferences and click on Users & Groups.
- Click on the Lock icon and enter your admin credentials.
- Select the temporary admin user you created earlier and click on the - button below the list of users.
- Confirm that you want to delete the user.
And there you have it! You've successfully recovered your accidentally deleted admin account on your Mac. If you found this guide helpful, please consider sharing it with others who might be in a similar situation. Until next time, happy Mac-ing!