Recover Password/Secret of a Cisco Router

If you forget the password for your Cisco Router, it’s easy to recover it. I recently encountered a situation where I couldn’t recall enable password or enable secret of a Cisco Router.

To resolve this, you will have to enter into the recovery mode and follow the password recovery procedure provided in this blog post, which successfully helped me retrieve the password.

The steps given in this blog post are from Cisco Router 4331 ISR, however, you can use the same steps on other Cisco router models as well. Please note that the Router will be offline during this process because it needs to be restarted.

Steps to Recover Password/Secret of a Cisco Router

  1. Connect to the Cisco router using putty.
  1. Restart the Cisco Router and interrupt the boot sequence by using the Break option in putty. You can find this option under Special Command > Break as shown in below screenshot.
Using Putty to send Special Break command to router
  1. After interrupting the boot sequence, you will see rommon 1 > prompt. Type ? And press Enter to view the list of available commands in this prompt. We will be using confreg command.
rommon 1 prompt
  1. Skip the startup-config file, which holds all the passwords. To do this, type confreg on the console and press Enter. You’ll notice that the current configuration register value is 0x2102. We need to change it to 0x2142.
type confreg and enter
  1. Change the confreg value to 0x2142.
Change the confreg value to 0x2142
  1. Now, reset the Cisco router, and it will restart while bypassing the startup-config.
reset the Cisco router
reset the Cisco router
  1. You will now see the Router> prompt, indicating that you have entered the configuration with no settings.
Router> prompt
  1. Use the en command to access the enable or privilege mode.
type en command on the router
  1. To preserve the configuration in your startup-config, Copy startup-config to running-config. You will notice that the router name, which was saved in your startup-config, has been applied. Command: copy startup-config running-config.
copy startup-config running-config
  1. Enter the Conf t mode to update the router passwords. Once you are done, change the config-register value back to 0x2102. Be sure to save all the changes before rebooting the router. You can use the write mem command to save the startup-config to running-config.
  1. Resetting the Config-Register value to its original setting, which is 0x2102. Save the configuration using write mem and then restart the router.
change the config-register value back to 0x2102

That’s it! After rebooting the router, it will operate according to the configuration in the startup-configuration file.

Leave a Comment