Forgot Your Account Password
For Lion/Mountain Lion
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
When the menubar appears select Terminal from the Utilities menu.
Enter resetpassword at the prompt and press RETURN. Follow
instructions in the dialog window that will appear.
Or see Reset a Mac OS X 10.7 Lion Password, OS X Mountain Lion- Reset a login password, and
OS X Lion- Apple ID can be used to reset your user account password.
For Snow Leopard and earlier with installer DVD
Mac OS X 10.6- If you forget your administrator password
For Snow Leopard and earlier without installer DVD
How to reset your Mac OS X password without an installer disc | MacYourself
How to Create a New User Account if You Cannot Access Your Admin Account
Reboot the computer. At the chime press and hold down the COMMAND-S keys to start into Single-user Mode.
You will boot to a black screen with scrolling white text, release the keys and wait for it finish.
Enter the following lines at the command prompt pressing RETURN after each:
mount -uw /
rm /var/db/.applesetupdone
reboot
After you reboot the computer you will be taken to the Setup Assistant. When you get to the point where you are asked to setup your new user account, create a new admin account. Be sure to name this user account something different than the admin user account that already exists on the system. When you finish the Setup Assistant, it will automatically log you into the new account.
You can transfer your files from the old account to the new one. See: Transferring files from one User Account to another. Once you have moved all your files into your new account, you can delete the old account using Accounts or Users & Groups preferences.