Protecting your Mac with a password is practical common sense, but what happens when you forget your password? Every article you read tells you never to write your password downб as it poses too much of a security risk, so there's no safety net. Furthermore, what if you want to make sure that there's nothing shady on your kid's computer, but you get blocked by a password? There's no need to fret, Apple has already thought of this, so they've created a simple workaround to bypass the problem. Here's how to do it.
Resetting your Mac password
No matter what Apple device you use (Mac, MacBook, etc.), they all have the same password resetting tool. In order to reach it, the first thing you need to do is reboot your computer and keep the Command and R buttons on your keyboard pressed until the Apple logo appears on your screen. If done correctly, you should now see a small loading bar and, after a short while, you should be taken into a new screen called Recovery Mode.
Now, you will need to open the Terminal (you can do so by clicking on the Utilities button in the top menu bar and then selecting Terminal), type resetpassword, then press the Enter key and close the Terminal window. You should now see the Password Resetting Utility window, where all you need to do is select your user account (or the one you want to reset the password for), type in the new keyword and press Save. (In case you no longer want to have a password, just leave the corresponding field blank.) Once that's done, simply restart your Mac and log-in to your account using the password you've just changed.
Setting up a firmware password
As you've noticed, resetting the user account password is incredibly easy, can be done very fast and doesn't require any technical skills or knowledge about the owner of the Mac. So what happens when you work with sensitive files or simply don't want anyone snooping around? How do you protect yourself from people who maliciously use this technique? Some would advise you to encrypt your files, and that works in some cases, however it can't ensure that the people breaking into your Mac won't simply wreck havoc by deleting all your files (even the encrypted ones). A better solution is to set up a firmware password which cannot be bypassed so easily. Here's how to do it:
Once again, go to the Recovery Mode by restarting the computer and keeping the Command and R keys pressed until the loading screen with the Apple logo shows up. Now go to the same Utilities menu, but this time click on the Firmware Password Utility button. In the new window that opens, turn ON the Firmware Password from the respective menu, then type in the password you want and retype it in the Verify box. All that's left to do now is press the Set Password button, quit the Firmware Password Utility, then restart the device, and your new password should be operational. Additionally, you can also use the Find my Mac menu from iCloud to remotely set a firmware password in case your computer is missing or was stolen.
Unlike a regular user account password, a firmware password is much more difficult to bypass, so make sure you don't forget it. In case you do, you will need to take your Mac and some proof of ownership to the closest Apple store and ask the people who work there to unlock it for you.