With prior versions of OS X, Apple included a “Reset Password” Utility that you could use to reset forgotten passwords for accounts on the system. But in the recovery options Lion, this is missing from the “Utilities” menu where it used to be. While the program is no longer available through the Utilities menu, it is included on the recovery system and can be used, but you will have to open it by alternative means. Open Terminal from the Utilities menu. Type:
And press enter. The Reset Utility will now open up, but do not close the Terminal window or the program will be killed as well. Select your hard drive and then user and type in your new password and hint. Quit everything and restart.
Update: Applies to Mountain Lion (10.8) as well.