Resetting password is easy, and there are two ways of doing this. The first requires the user to boot into a single user mode, and the second one is performed by booting into the recovery console. The method you pick is your choice, one way or the other both are same. Booting into a single user mode to reset password, is sort of recreating the admin account from scratch. When you perform the commands, it will then allow you to create a new admin account
To reset password via Single User Mode, you will need to reboot your OS X with the Command-S keys held at start-up.
This will then take you into a bash prompt which will be a black screen.
In the bash command prompt, type the three commands below followed by RETURN/ENTER key.
mount -uw /
Once done, and after you execute the shutdown -h command, your Mac OS X System will reboot. You will now be presented with options to create a new admin account, follow the steps on screen to create your new admin account. Once done, and once logged into the new admin account, go to System Preferences.
From System Preferences go to > Users & Groups, click the lock icon in the lower left corner to unlock features.
Then, click the Account for which you initially wanted to reset the password, and choose Reset Password to setup your new password.
Reset your OS X Password via Recovery Console
Startup your MAC OS X holding the Command + R Keys to boot into the recovery console. Choose Utilities -> Terminal from the menu bar on top.
The next window will open the Reset Password Utility. From, under “select a user of this volume to reset their password”, choose the user account and and type in the new password. Then click Save.
Once done, click the Apple icon on the top left, and choose Restart.