Otherwise, select Continue Log In to use the same password that you used to reset your Mac login, or select Create New Keychain to set a new password. Neither of the two latter options will access your previous keychain and you will lose all of your saved passwords until you remember the old Mac login. From the Mac login or boot screen, enter any wrong password three times to summon the “Password Hint” box and a message saying “If you forgot your password you can reset it using your Apple ID” click on that arrow icon to start the Apple ID based reset.
When you change the password, you'll see a prompt letting you know a new login keychain - what MacOS uses to store your passwords will be created, but your old keychain will remain saved on your Mac.
Forgot Your Account Password
For Lion, Mountain Lion, or Mavericks
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
When the menubar appears select Terminal from the Utilities menu.
Enter resetpassword at the prompt and press RETURN. Follow
instructions in the dialog window that will appear.
How To Reset Password On A Macbook Air 2
Or see:
OS X Mountain Lion- Reset a login password,
OS X Mavericks- Solve password problems,
OS X Lion- Apple ID can be used to reset your user account password.
For Snow Leopard and earlier with installer DVD
Locked Out Of Macbook Air
Mac OS X 10.6- If you forget your administrator password,
OS X- Changing or resetting an account password (Snow Leopard and earlier).