Home  >  Article  >  What to do if you forget your MacBook power-on password

What to do if you forget your MacBook power-on password

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-07-10 17:13:4611830browse

What to do if you forget your MacBook power-on password_How to solve if you forget your MacBook power-on password Many MacBook users have encountered the embarrassing situation of forgetting their power-on password, so how should we solve this problem? The editor below will explain to you Two methods are introduced.

What to do if you forget your MacBook power-on password

Let’s take a look at the first solution first:

Turn on the computer and hold down the Command S key during startup to enter Single User Mode, and enter the following code under #root, please pay attention to spaces and case sensitivity:

fsck -y
mount –uaw /
rm /var/db/.AppleSetupDone

After the device restarts, you can see the welcome interface during reinstallation, but the data is not lost. At this time, we need to re-create a new administrator account just like the first installation.

Related recommendations: "FAQ"

Open System Preferences - Users and Groups in the new administrator account, open the bottom lock, and enter Password, we can enter the password of the new administrator account. Then we will see at least two accounts, namely the new administrator account and the original account. Click on the original account and change the password.

The next step is the second method, provided we still remember the username:

1. If you know the short username, you can enter it in the first method Enter sh /etc/rc in the code area, then press the Enter key, enter the passwd short user name, and enter the new password twice. Finally, type reboot and press Enter to let the machine restart.

2. If you know the short user name, you can also enter cd /var/db/netinfo and press Enter. Then enter /usr/bin/nicl -raw local.nidb -create /users/short username password and press Enter. This will set the user password to blank. After entering reboot and pressing the Enter key, the machine will restart. Just enter a blank password.

The above is the detailed content of What to do if you forget your MacBook power-on password. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn