Search My Techie Guy

Friday, November 12, 2010

Quick Step by Step Password Recovery for CISCO Routers without loosing current configuration

Are you in a situation where by you have forgotten the secret password to your CISCO router and yet don’t want to lose your configuration, or your IT Guy who holds all the passwords to the routers woke up one morning and choose not to show up for reasons best known to himself, yet business has to continue as usual. Well, here is the quickest and easiest step by step guide to get you up and running without losing your configuration.
1. Boot the router (sorry you have to do this, I hope you implemented some redundancy in your network)
2. Interrupt the boot sequence by pressing crtl+c
3. To ignore the contents of Non-Volatile RAM or ignore configuration, do this:
rommon 1 > confreg 0x2142
4. Reset your router by typing reset at the ROMMON prompt, i.e.
rommon 2 > reset
5. The router reloads and asks if you want to use setup mode, because no startup-config is used.
   Answer no, and press ENTER to go into user mode.
6. Enter the router privileged EXEC mode  
> enable
7. Now copy the start-up configuration into the running configuration 

# copy start run
8. Enter the configuration mode 

# config t
9. Set a new password "mynewpassword"

Router(config)#enable secret mynewpassword
10. Change the configuration register back to 0x2102 so that the router can boot from NVRAM on next boot.

Router(config)#config-register 0x2102
Router(config)#do wr
11. Now copy the running configuration (remember it has your new password :-) into the start-up configuration) 

# copy run start
12. No reboot your router by entering reload that the privileged EXEC mode 

# reload
13. The router will reboot and you should be able to login with your new password without loosing your original configuration. 
Find more information about the configuration register on these recommended sites:

Post a Comment