The 4000 series password recovery using at least software release 9.17(4) or later (flash/netboot) or cisco IOS release 10.0 or later ( ROM ). With that said .
step 1 - power cycle the router
step 2 - Use the Break key sequence within 60 sec of powering on . The ROM monitor(>) prompt will appear
step 3 - Enter the command, e/s 2000002 ( Record the output resulting from this command . This is the software conf reg value.
step 4 - Enter q ( quit ) to return to the ROM monitor.
step 5 - Enter the o/r 0x42 command . This will cuase the router to ignore the contents of the NVRAM .
step 6 - Enter i ( initialize ) at the ROM monitor (>) prompt . ( The router will reboot )
step 7 - Answer no to all of the setup questions .
step 8 - Enter the enable EXEC command at the router > prompt .
step 9 - Enter the show startup-config or sh conf priviledge EXEC command to see if your password is clear text .
step 10- If your password is clear text, proceed to step 14 or if your password is encrypted , continue to to step 11
step 11- Enter the configure memory priviledge command
step 12- Enter the conf t priviledge EXEC command
step 13- If you lost the enable password ,use the enable password global configuration to configure a new password asn press ^Z to exit . If you lost the login password , configure the console line using the login and password line configuration commands.
step 14-The enable password , locate the enable-password global conf command entry in the configuration and record the password .
step 15-Use the copy running-conf or write memory priviledge EXEC command to write the configuration into running memory . Caution that you have a backup of your conf file . The router is now fully functional. and you can use your recovered passwords .
*** RESTORE THE SOFTWARE CONF REG TO ITS ORIGINAL VALUE ASAP.***
step 16- Enter your conf term priviledge EXEC command enter the config-register global conf command . You must enter ( 0x2102 ) exit this command save to the IOS and reload . ( You can do a show ver and at the bottom of the values you should see that the next time you reload the register will change .