Reset user account password with Apple ID
There is a prerequisite for using this method
As shown in the red box above, this item must be checked, otherwise the password cannot be reset with the Apple ID. (If you don't remember to tick, you should at least remember that when you first start OS X or a new Mac with OS X Lion or later, you go to the OS X Setup Assistant, which requires you to enter the Apple ID.) After you enter the Apple ID, in the Create your account phase, select the Allow my Apple ID to reset this user's password option. )
Okay, here's how it's done:
If you enter an account password three times incorrectly in the login window, a message is displayed that says "If you forget your password, you can reset your password with an Apple ID." Click the icon with an arrow in the circle to bring up the Reset Password dialog box. Enter your Apple ID and password, and then click Reset Password to continue.
In the dialog box that informs you about the new keychain information displayed by the system, click OK.
Enter a new password, verify the password and Password prompt field, and then click Reset Password to continue.
Click Continue login to complete the login using the new password you just created.
Note: Changing the user account password will create a new keychain. The previous keychain still exists and can be accessed if you remember the previous password later.
Second, use the recovery recovery disk to reset the administrator password
1, Power down OPTION key, select Enter Recovery HD Recovery disk:
2, select "Utility"
3, into the "terminal"
4, in the terminal input code "ResetPassword", Pop-up Reset password window, reset password can be.