If you are needing to reset your password on your Apple Macbook or iMac with OS X El Capitan / OS Sierra, then here is how to do it (there are only 5 steps):
1. Boot to the recovery partition on your original drive by holding down Command-R during the startup process. When you see the start up screen, you can let go of the keys. (if you do not have a command button on keyboard ‘ please kindly use the ‘ALT’ key with ‘R’).
You would need to use a wired keyboard – a standard USB PC wired keyboard will work.
(Note: If you see a login window or your own desktop and icons, it’s possible that you didn’t hold Command-R early enough. Restart and try again.)
2. When the machine boots, you will see the OS X Utilities screen. Click on ‘Utilities’ in the Apple menu (at the very top of screen – please refer to red circle on picture below) and select Terminal.
3. At the Terminal prompt, type ‘resetpassword’ (no quotes) then hit enter.
4. This will launch the reset utility, which allows you to select a drive, a user, then a new password and password hint for your admin user.
5. After saving, go to the Apple Menu and click Restart.