Link your Mac local user account with Apple ID for password reset

If you have forgotten about the password for your Mac’s user account, it can be reset by another local user account which has administrator privileges. If not you have to go through the laborious OS X Recovery.

Another option is to link your OS X user account with an Apple ID. You can then reset your forgotten password by signing into your Apple ID account.