Neither password can be recovered, but you can reset or change them.
Changing or resetting an account password (Lion):
Scroll down to Resetting the original administrator account password. Try the procedure under reset your user password with your Apple ID.
If that does not work for whatever reason you can also use the following technique:
- Restart your Mac while holding down the ⌘ and R keys at the same time until you see the Lion Recovery screen.
- From the menu bar at the top, select Utilities > Terminal.
- In the Terminal window type resetpassword and press Enter. A window will open behind Terminal that looks like this
- Select your startup volume ("Macintosh HD" in the above screenshot), choose your user account from the dropdown selection, enter a new password, complete the password hint field, and click Save.
- You may then see a confirmation dialog explaining how this change affects Keychain Access and what to do about it. Remember it or write it down, then click OK.
- Quit Reset Password
- Quit Terminal
- Quit OS X Utilities and restart your Mac.
To fix your Keychain problems, go to your Utilities folder and open Keychain Access. Follow the steps here: Mac OS X: Keychain Access asks for keychain "login" after changing login password.
As it says, if you do not remember your original login or keychain password, your only alternative is to delete the Keychain. Not a big deal, you just have to remember or recreate all the passwords you used for websites that require them.