Forgotten recovery mode password
Try the following steps:


Switch off your Mac (not just log out).
Boot into Recovery mode by pressing the power button while holding down the CommandR keys. 
Select Disk Utility and press Continue.
Choose Utilities > Terminal.
Type resetpassword (all one word, lowercase letters) and press Return
Select the drive containing your user account (this is usually your main drive)
Choose the account to change with Select the User Account
Enter a new password and re-enter it into the password fields
Enter a new password hint related to the password
Click Save. (Note: you may get a warning that the password has changed, but not the Keychain Password. Click OK.)
Shut down your Mac (Apple > Shut Down)
Restart your Mac