Administrator (or other users) password can be forgotten and reset on All MacOS Versions: Mojave, High Sierra, Sierra, Capitan, Mavericks, Yosemite,… from Recover mode.
Step 1: Boot your mac into Recover Mode
Restart your Mac, Keep holding down the Command+R until get into the Recovery Mode.
Step 2: Open Terminal
Click Utilites on the top menu, then select Terminal, then Enter the following words: “resetpassword”
Reset Password screen then will come up.
It’s now easy to select the user you want to reset, Enter new password, then click on Reset button.
Go to the Apple Menu and click on Restart to boot your Mac at normal, and use the new password to see the positive effects.
If you get the job done on macOS Mojave, the above screen might be different. Whatever they are, just follow up the instruction from step by step to get it done.