The key to recovering a lost password is to set the configuration register bit 6 (0x2142) so that the startup configuration (usually in NVRAM) is ignored. This allows you to log in without using a password and to display the startup configuration password.