Guide: How to Perform Password Recovery on Cisco Devices

Password recovery is a process in Cisco devices that helps administrators regain access to their devices in the event of a forgotten or lost password. When an administrator forgets the password, it can prevent them from accessing the device’s configuration and making necessary changes.

Password Recovery on Cisco Devices
How to do Password Recovery on Cisco Devices

To ensure seamless device management and operation, it’s essential to have a clear understanding of the password recovery process. This guide provides a step-by-step procedure for performing password recovery on a Cisco device.

Password Recovery Process

Let’s delve into what happens behind the scenes in the configuration register of a Cisco device. The configuration register is a crucial aspect of the device’s behavior at startup, determining how it loads the operating system and configuration. Understanding the role of the configuration register and its value is essential for performing password recovery and ensuring seamless device operation.

1. Configuration Register in Cisco Devices

The configuration register is a 16-bit value that determines how a Cisco device behaves when it starts up. It specifies the source from which the device should load its operating system, as well as other boot options. The default configuration register value for most Cisco devices is 0x2102, which means that the 6th bit is off. This setting directs the device to load the IOS image from flash memory and the startup configuration from NVRAM.

2. Password Recovery through Changing Configuration Register Value

In the event that an administrator forgets the login credentials for the device, they can change the configuration register value to 0x2142. This sets the 6th bit to on, which instructs the device to ignore the content of NVRAM and load a backup IOS image stored in ROM. By changing the configuration register value in this way, an administrator can perform a password recovery process to regain access to the device.

This process involves booting the device into ROM monitor mode, resetting the configuration, and setting new login credentials.

Password Recovery Demonstration

Let’s now take a closer look at the password recovery process through a demonstration.

  1. When attempting to enter privileged mode with an incorrect password, you will receive the following error message.
  2. To recover your password, it is necessary to connect to the device using a console cable.
  3. To do this in packet tracer, simply drag and drop a router and a PC onto the simulation workspace.
  4. From the connections section, select the console cable.
  5. Click on the router, then select the console option.
  6. Now click on the PC, then select RS 232.
  7. We have now successfully established a connection to the router using the console cable.
  8. To verify the connection, click on the PC, click on the desktop tab, and then click on the terminal.
  9. Click on OK.
  10. We have now established a console connection with the router.
  11. Let’s proceed with the password recovery process.
  12. In order to change the configuration register value, we need to enter into ROMMON mode. To do so, we need to reboot the router and interrupt the boot sequence.
  13. In real life, rebooting the router can be accomplished by simply turning off and on the power switch. In Packet Tracer, to reboot the router, click on the router, go to the Physical tab, and click the power switch to turn it off. Then, click the power switch again to restart the router.
  14. During the reboot process, click inside the terminal and press the ‘Ctrl + Break’ button on your keyboard.

    We have entered the ROMMON mode.
  15. To change the configuration register value, use the following command.
    confreg 0x2142
  16. We have successfully changed the configuration register value. To reload the router, enter the command ‘reset’ in ROMMON mode.
  17. Upon reloading the router, it will prompt you to use setup mode. By answering ‘No‘, you will enter the user mode.
  18. To enter privileged mode, type ‘enable‘ in the user mode.
  19. The router did not prompt for an enable password. Now go to the global config mode and configure the enable password as per your needs using the below command.
    Router#configure terminal
    Router#enable secret appuals

    Replace appuals with your desired password.

  20. Now, copy the running config to startup-config to make sure the password changes are applied to the startup-config stored in the NVRAM since we need to change the register configuration value to its original value. Use the following command to copy the config file.
    Router#copy running-config startup-config

  21. After copying the configuration, reload the router using the reload command.

    Click Enter on your keyboard to confirm the reload.

  22. During the boot sequence press the ‘Ctrl + Break’ button on your keyboard.
  23. Once in ROMMON mode, change the configuration register value to its original value of 0x2102 using the following command.
    confreg 0x2102

    And then enter the ‘reset’ command to load the router in normal operating mode.

  24. Once the router has been reloaded, use the newly set enable password to enter privileged mode.
    Now, we can enter privileged mode using the new password without any issues.
  25. To ensure that the configuration has not been affected during the process, validate the startup configuration using the below command.
    Router#show startup-config


Password recovery on a Cisco device is a straightforward process that can help administrators regain access to their devices in case of a forgotten or lost password.

The demonstration provided in this article takes you through a step-by-step procedure of how to perform password recovery on a Cisco device, including the process of entering into ROMMON mode, changing the configuration register value, resetting the configuration, and copying the running configuration to the startup configuration.

After following these steps, administrators can be confident that they will have access to their devices, and the configuration will remain intact. Overall, understanding the password recovery process and following best practices is essential for ensuring seamless device management and operation.


Kamil Anwar

Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.