Reset a Mac Password
If you forget your mac password there is a quite easy way to reset it again.
- Reboot your computer and immediately press Command-S to start in single-user mode
 - Mount your harddisk: mount -uw /
 - Get a list of all short usernames on the computer: ls /Users
 - Reset user xxx’s password: passwd xxx
 
Note that this does not reset your keychain password, i.e., you will have to redo all passwords.
For more information, see here.