If you forget a password in OS X there is an easy way to reset it.
Restart into Recovery mode by turning the Mac off, wait for the apple chime. Then hold CMD + R down together. The recovery tools screen appears.
Now click Utilities and then Terminal:
From the terminal enter the command resetpassword
A box will appear like below.
From there click the disk running OSX you wish to reset, select the user then enter the new password. Finally press save
Job done! This is my preffered mehtod of resetting a forgotten password. I’ve done this is in a Virtual Machine but the process works exactly the same on a physical Mac.