To reset password for OSX 10.10 Yosemite, OSX 10.9 Mavericks and OSX 10.8 Mountain Lion including root and standard user accounts can be reset, this can be done booted from the Recovery Partition on OSX.
Boot into your Recovery Partition
Startup or reboot your apple computer:
1. hold down command + R at the startup chime.
When the machine boots, you will see the OS X Utilities screen.
2. Select ‘Terminal’ from your Utilities Menu Bar
3. Type command in: resetpassword
4. From the window that appears, select your boot volume and the appropriate user account
5. Type your new password and confirm the new password
6. Click Save – Close all open windows.
7. Select boot volume when presented with ‘choose startup disk’ and then reboot your machine