OK this should work (found at numerous web sites) tried on Lion.
Note this procedure will make the mac think it is being booted for the first time. You will need to enter in your registration information again. This procedure will create a new admin account, you will supply the information for the name of the account. Do not use the name from an existing account. Create a dummy account. Once the procedure is done you will log into this dummy account and change the password on the existing admin account.
Boot into single user mode:
- Hold comand + s down after you hear the chime.
You will see a black screen and a bunch or writing scroll past. Then you will get the single user prompt.
When you get text prompt enter in these terminal commands. Type return after each line
- mount -uw /
- rm /var/db/.AppleSetupDone
- shutdown -h now
Now reboot the machine, enter the registration and dummy account information. Ignore the system setup screen and then using System Preferences->Users & Groups change the password of the original admin account.
You can delete the dummy account and just use the original admin account once you know it is working.