Suppose you forget your OS X user account password, especially if you have just updated your new password and you only remember your old password. Don't panic, here's a little trick to teach you how to reset your OS X user account password and need your OS X recovery mode, so let's take a look at the tips below.
Booting to OS X recovery, the first thing you need to do is reboot your Mac. When restarting, press and hold CMD + R until the Apple flag appears. Then you can go into recovery mode.
The next thing you need to do is go to the public utilities > Terminal to open a terminal. At the terminal, enter ResetPassword and press ENTER.
You will see the Reset Password window. Next, select your OS X driver. From the bottom down ": Select User Account", select the user account you want to reset the password.
Enter your new password, re-enter it, and don't forget it. You can also choose to write the next prompt "Enter a new password to prompt the user (optional)" For a rainy time.
Once you have finished, click Save. You will be prompted for the message that your user account password is reset, click OK, and close all windows.
Now click the top left corner of the Apple icon and select Reboot. Now, you can enter your account number and your new password.