What to do if you forget your Mac password? [Detailed explanation]

For the sake of security, everyone usually sets a password for their personal computers so that others cannot peek. Recently, some friends have reported that they have forgotten the power-on password of their Mac computers. If they reinstall the system or restore the computer to factory settings, the original data on the computer will be lost. What other solutions are there? Now I will share with you the specific solution.

The specific method is as follows:

1. First restart the computer and immediately press the command+S key combination.

2. The command character will pop up, enter fsck -y and press Enter.

3. After the above command is executed, enter mount -uaw / and press Enter.

4. Then enter rm /var/db/.AppleSetupDone and press Enter.

5. Then enter reboot and press Enter to restart the computer.

6. After restarting the computer, you will enter the environment configuration interface just like when you first bought it. Don’t worry, this is a new account, and the original account information will not disappear.

7. After completing the configuration according to the prompts, enter the system and click "System Preferences".

8. Click "Users and Groups" in settings.

9. You can see the new and original accounts in the user and group interface. Click the lock icon in the lower left corner to unlock it.

10. Enter the currently created account name and password in the window, and click "Unlock".

11. Then select the account that you forgot the password before and click "Reset Password".

12. After entering the new password, click "Change Password".

The above editor’s pictures and texts explain in detail the solution to the problem of forgetting the Mac password. Restart the computer, select the original account, and enter the new password to log in.