macOS Sierra 10.12
Shutdown the Mac.
Start the computer, then press and hold down command and R keys to start into recovery partition.
When you see the Apple logo and the progress bar, release the keys.
You have to press hard the Trackpad to register the click.
Select the “Language”, if not already.
Click the arrow button at the bottom.
Wait until OS X Utilities window shows up.
Move the mouse pointer to the menubar at the very top of the screen, click "Utilities” and then select "Terminal"
from the dropdown.
Terminal window will appear.
Type in resetpassword and press enter on the keyboard.
Reset Password window will open showing all users.
Quit Terminal.
To reset password:
Select a user to reset the password for.
Click the “Next” button at the bottom.
Enter a new password, enter it again to verify, enter a hint and write down the password entered.
Click the “Next” button at the bottom.
Password reset confirmation message will appear.
Click the “Restart” button at the bottom.
Log in.
When Keychain dialog box appears, select “Create New Keychain”.
Section: Create New Keychain https://support.apple.com/en-us/HT202860