The password on your MacBook is essential for logging in and managing your account settings. If you have administrative privileges, you are prompted to enter your password in order to install software and make other security-sensitive updates. Change your account password using the Users & Groups section of your MacBook's System Preferences panel.
Changing Your User Account Password
Click the Apple menu in the top-left corner of your MacBook's screen and select System Preferences.
Click the Users & Groups icon to open the Users & Groups prompt.
Select the Password tab, if necessary, and then click the Change Password button.
Enter your current password in the Old Password field, and then enter and confirm your new password in the New Password and Verify fields, respectively. For added security, enter a password hint as well. The password hint is optional, but can come in handy should you forget your password in the future.
Click the Change Password button when you're finished.
Display Your Password Hint
If you forget your password and have the password hint feature enabled, there's a trick to getting the Users & Groups prompt to display your hint. Click the Apple menu, select System Preferences and choose Users & Groups. Click the Lock icon in the bottom-left corner of the prompt and then press the Return button on your keyboard three times. Each time you press Return, your MacBook's screen shakes. After the third time, the hint displays beneath the Password field.
Make as many attempts as are necessary to correctly enter your password. There is no limit to how many times you can attempt to enter the correct account password. Once you've entered the password correctly, click the Change Password button to select a new one.
Retrieve Your Account Password Using Your Apple ID
Since OS X Mavericks, Apple links your Apple ID to your administrative user account. If you don't have the password hint feature enabled, use your Apple ID to recover your account password so that you can select a new one.
Visit the My Apple ID website and click the Reset Your Password link located beneath the Manage Your Apple ID button.
Enter your Apple ID in the provided field and click Next to enter a few security questions in order to recover your password.