To restore a password you must go the System Settings which you will find under the Settings within the XMB Menu. Press X on the Restore Defaults Setting and this should theoretically reset your password to 0000 or 9999 as this completely resets your PSP but is a small price to pay when you are locked out.
I just do this on my PSP when i forgot the password. Go to System Settings under Settings in the Home Menu. Click Restore Default Settings. The default password should then be 0000 or 9999.
You will need to do a system factory default restore. This will wipe out the password and its saved connection for the wireless functions. Be sure you don't have a memory card in the system when you do this in case it accidentally erases the memory from that as well.
Simply go to "system settings," and click "restore default settings." This will not erase your memory card files, but it will restore all settings to the condition they were in when the PSP left the factory.
You need to go to System Settings and click on Restore Default Settings. The password will then be the original 0000, and you can then reset the password.
If you follow these instructions, it should reset your PSP's password to either 0000 or 9999: "Home Menu" --> "Settings" --> "System Settings" --> "Restore Default Settings".