Let’s assume you’ve forgotten your OS X user account password and there is simply no way for you to enter your account in your OS X. Well, it happens to everyone at some point, especially if you have just updated your password and can only remember the old password, not the new one.
First, don’t panic. Secondly, check out this quick tip on how to reset your OS X user account password. It will require you go in to OS X Recovery mode. Once you have your password reset, make sure to have a backup of all your passwords somewhere else that is not in your Mac.
Recommended Reading: How To Encrypt A Folder With Password Protection In Mac
Enter OS X Recovery Mode
To boot into OS X Recovery, the first thing you need to do is to restart your Mac. While restarting, hold down CMD + R until the Apple logo appears. If you time it right, you will enter the recovery mode.
What you need to do next is to go to Utilities > Terminal to open a Terminal. In Terminal, type
resetpassword and press Enter.
You will now be presented with the Reset Password window. Next, select your OS X drive. From the drop-down under "Select the user account:", choose the user account that you want to reset password for.
Type in your new password, re-enter it and try not to forget it this time. You can also choose to write down a hint in the "Enter a new password hint for this user (optional)", just in case.
Once you’re done, click on Save. You will be prompted with this message saying that your user account password was reset but your keychain is not. Just click OK and close all windows.
Now click the Apple icon at the very top left and choose Restart. You can now enter your account with your new password.