Breaking News

How to Reset Router Password without Losing Configuration

Forgot your Cisco router password?  Did you know you can change them without losing your configuration?



First, hook up the DB9 end of the standard light blue serial cable to your serial port.  The other end of the cable should plug into the port labeled “Console” on the back of the Cisco router.  If you do  not have a serial port, then you’ll need to go purchase a USB-to-serial adapter cable and install it on your computer.
Now that your hardware is connected, establish a serial connection with the router.

The settings you need are:

Baud: 9600
Data bits: 8
Parity: No
Stop bits: 1
Flow Control: None


All Cisco routers have a 16-bit software register thats written into NVRAM. By default,the configuration register is set to load the Cisco IOS from flash memory and to look for and load the startup-config file from NVRAM, and its vlue is 0x2102. You can change the configuration register settings to provide password recovery on your routers.

If there are passwords configured on startup configuration file, you should know the password to login into the router.If you don't know the password you can reset the password without losing the previous configuration.


So, you have to change the boot sequence (Configuration register value) to skip the step of loading startup configuration file from nvram to ram to login into the router without writing the passwords that you don't know. After that, copy the startup configuration file into the ram and change passwords.

Steps for resetting the passwords:

  • Change the value of configuration register to 0x2142 to skip the step of loading startup file into ram, when the router boots up, click CTRL+Break. After that you will login into rommmon mode to change the configuration register value and reboot the router.
 rommon 1 >confreg 0x2142
 You must reset or power cycle for new config to take effect 
 rommon 2 >reset        
           

  • copy the startup configuration file into the ram and change passwords.


Router#copy start run
Router(config)#enable secret xxxxx


  • Set the configuration register back to the default value


Router(config)#config-register 0x2102


  • Save the new configuration with a copy running-config startup-config and use reload to reload the router

                Router#copy run start
                Router#reload

It's important to remember to enable your interfaces after copying the configuration
from NVRAM to RAM.

No comments