If you can’t remember the login password for your MacBook, you can Reset the forgotten password and regain access to all your files and data.
The Reset process removes the current password, which is stored on the MacBook and provides the option to set a New Password, which allows you to regain access to your device.
Reset Login Password on Mac
The steps to Reset the Login Password on a MacBook vary, depending on the type of User Account (Admin or Local) and whether the forgotten password is linked to your Apple ID.
If the password is linked to Apple ID, macOS automatically provides the option to Reset Password, if it finds you trying to guess the password multiple times.
If the forgotten password is for a non-admin account, you can Reset the password by logging into your Admin Account and Reset the Admin Account password by using Recovery mode.
1. Reset Password Using Admin Account
If you have access to Admin Account, you can follow the steps below to Reset the Login Password for your User Account.
1. Click on Apple Logo in the top-menu bar and select System Settings in the drop-down menu,

2. From the next screen, go to Users & Groups > select your User Account in the left-pane and click on Reset Password button in the right-pane.

3. On the next screen, enter your New Password, Verify New password, enter Password hint and click on Change Password button

Now, you can Logout of your Admin Account and Login to the User Account using the New Password.
2. Reset Admin Password On Mac Using Recovery Mode
If you have forgotten the Admin password, you can login to any other User Account on your Mac and follow the steps below to Reset the Admin Password on your Mac.
1. Shut Down the Computer (if it is switched on).
2. Press the Power button to Restart Mac and immediately press COMMAND + R keys as soon as you hear the boot chime sound.
3. Once the Mac starts in Recovery mode, click on Utilities tab in the top-menu bar and click on Terminal in the drop-down menu.

4. On the Terminal screen, type resetpassword and press the Return Key.

4. On Password Reset screen, select the Admin Account that requires a Password Reset and click on Next.
5. On the next screen, type New Password, Confirm the New Password, set up a password hint (recommended) and click on Save.
After this, you can reboot the computer and you will be able to login using the New Password.
3. Reset Password on Mac Using Apple ID
This method of recovering lost password works only if your Apple ID is linked to the User Account. Also, this option does not work if FileVault protection is enabled on your device.
1. Start your Mac and try to login by entering any random Password multiple times, until you see a message reading “If you forgot your password, you can reset it using your Apple ID”.
2. Click on the Arrow button and follow the onscreen prompts to Reset Password on Mac.