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 the “enable password” or “enable secret” for my 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. Keep in mind that your Router will be offline during this process because it needs to be restarted.
Steps to Recover Password/Secret of Cisco Router
- 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 the screenshot below.
- After interrupting the boot sequence, you will see the “rommon 1 >” prompt. Type “?” and press Enter to view the list of available commands in this prompt. The one we’re using today is “confreg“.
- The key is to 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“.
- Change the “confreg” value to “0x2142“.
- Now, reset the Cisco router, and it will restart while bypassing the startup-config.
- You will now see the “Router>” prompt, indicating that you have entered the configuration with no settings.
- Use the “en” command to access the enable or privilege mode.
- 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.
- 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.
- Reset the “Config-Register” value to its original setting, which is “0x2102“. Save the configuration using “write mem” and then restart the router.
That’s it! After rebooting the router, it will operate according to the configuration in the startup-configuration file, which you adjusted during this recovery procedure by removing or updating the passwords.
In this blog post, we’ve learned how to recover a Cisco router password/secret. As mentioned earlier, this process is applicable to any Cisco router. However, the screenshots I’ve provided are from a Cisco Router 4331 ISR. I hope this post will assist you in recovering the password for your Cisco router.