Can’t remember your Mac’s password? Don’t worry. With the default settings, you can simply try logging into your Mac. Fail enough times and you’ll be able to reset your password with your Apple ID. But this won’t always work.
If you haven’t enabled FileVault disk encryption, there’s an easy password-reset tool you can access. If you have enabled FileVault, you’ve got two potential options: your Apple ID can work if you have one, or you can use the passcode you were shown after starting the encryption process. If none of that works, you’re files are gone, and you’ll simply have to reinstall macOS.
First Things First: Try Signing In As Another User
If you have more than one user account on your Mac, try signing in with a different user account. If you gave that other user account permission to decrypt your Mac with its password, you’ll be able to sign in and access a desktop. And if the account is an administrator account, you can then change the password for your primary account.
Just head to System Preferences > Users & Groups, click the account for which you’d like to change the password, and then click the “Reset Password” button.
If you don’t have another user account you can use, then what methods you choose to regain access to your Mac depend on whether you do or do not have FileVault enabled.
What To Do If You Do Not Have FileVault Enabled
If you do not have FileVault enabled, you can reset your password using your Apple ID or macOS Recovery tool.
Reset Your Password Using Your Apple ID
This trick only works if you’ve associated your Mac account with an Apple ID, and don’t have FileVault enabled. This is the default option. If you enabled FileVault, you’ll need to try one of the other options we discuss later in this article.
If you’ve forgotten your password, just try entering the wrong password three times at the sign-in screen. After three wrong answers, you’ll see a “If you forgot your password, you can reset it using your Apple ID” message.
Click the button and enter your Apple ID details to reset your password.
Create a new password, and provide a new hint.
That’s it! Note that you’ll likely lose access to your Keychain, because that still uses your old password.
Reset the Password From macOS Recovery
If you haven’t enabled FileVault encryption, there’s another easy way to reset any user account’s password. You just need to restart your Mac and hold Command+R while it’s booting. This boots your Mac into a special recovery mode, also known as macOS Recovery. From macOS Recovery, you can access a hidden a password reset tool and use it to change any user account’s password on the Mac.
To launch the tool, open the Terminal by clicking Utilities > Terminal in the menu bar.
At the Terminal prompt, type
resetpassword, and then hit Enter. The password reset tool launches, allowing you to change the password of any non-encrypted account.
Wasn’t that easy? Almost too easy, which is why you should enable FileVault encryption if you haven’t already.
Note: In the unlikely event that you’ve enabled a UEFI firmware password on your Mac, you won’t be able to gain access to macOS Recovery unless you remember that password. You can’t remove that UEFI firmware password without visiting an Apple Store—at least in theory. This helps prevent thieves from just erasing the UEFI password of a MacBook after they steal it.
What To Do If You Do Have FileVault Enabled
If you do have FileVault enabled, you can try resetting your password using your Apple ID or your FileVault recovery key. If those don’t work, you may be forced to reinstall macOS.
Reset The Password Using Apple ID or Recovery Key
If you have FileVault disk encryption enabled and tied to an Apple ID, this all works a little differently: you won’t see a prompt like the one above, no matter how many times you get the password wrong.
If you use an Apple ID with your account, however, you will see a prompt after one minute. This will be text at the bottom of the screen, and it will tell you to hold down your power button in order to turn your Mac off. Turn your Mac back on after doing this, and your Mac will boot into Recovery Mode, directly opening the password recovery tool.
If you have an Apple ID tied to your account, you will be asked for your credentials, and you can reset them if you need to.
If you don’t have an Apple ID tied to your account, you do not need to restart your Mac to use this tool. Instead, you can enter your Recovery Key directly into the password prompt of the login screen. This—aside from the password—is the only thing that can decrypt the files stored on your Mac and give you access to them.
Assuming you have this recovery key, you can type the recovery key into the password field on the login screen. This decrypts your Mac’s storage and signs you in. Once you’re signed in, you can change the password from the usual “Users & Groups” tool in the “System Settings” window.
If you’ve set up FileVault encryption and you can’t gain access to your account—for example, if you chose to store the recovery key locally and misplaced it—you’ll no longer have access to any files on your Mac. You hopefully have backup copies of these files elsewhere, as the originals are encrypted and without your password or recovery key, you simply cannot access them.http://howtogeek.com.xemphimonlines.com/186860/how-to-reinstall-os-x-on-your-mac-wipe-your-drive-and-create-usb-installation-media/[/reltaed]
While you will lose your files if you misplace your encryption credentials, your Mac won’t become useless. You can reinstall macOS and start from scratch—losing access to the files currently on your Mac, but regaining the ability to actually sign in and use it.
To do this, reboot your Mac and hold Command+R as it’s booting up. This takes you to a special macOS Recovery mode. Click the “Reinstall macOS” option here, and then go through the installation process to reinstall macOS.
If you can’t remember your Apple ID password, Apple’s website offers an Apple ID password reset tool that might be able to help.