Cisco Router Password recovery

There can be certain situation where we may loose access to a Cisco CSR router and due to that we would not be able to login to the device. In such situations we can do password recovery of Cisco router to regain access to the device, by password recovery we will not loose any configuration of the device.

Note: Password recovery need reboot of the device.

Step 1> Get console access of the device. For this example we have used CSR1000v router.

Step 2> Power cycle the device.

Step 3> Once the device power on we will get below window. During this window press escape to stop the normal OS boot.

Change boot sequence Cisco router password recovery

Once the boot is stopped press c to get into the GRUB mode. We will get below option after c is pressed.

Grub mode for router

Now we need to change the register value to ignore the original running config. Enter confreg and type Y for the 3 questions.

reset the boot registery

Press Escape to go back to previous window and hit enter to boot the router with blank configuration.

boot with the image

Once the router boot it will have no previous configuration in it.

router booted without config

Step 4> Copy the original configuration to startup configuration by running command copy startup-config running-config

load the old running config

Step 5> Now go to configuration mode and create new username and password and enable password. Using this username and password we can login to the router. If we need to update any other configuration we can do that as well.

create username and password

Step 6> Change the config register to 0x2102 using command config-register 0x2102 so that router will not ignore the running config upon boot.

Change register value

Step 7 > Now copy the running config back to start-up config using below command, this will override the existing running config with new username and password.

save running config to startup config

Step 8> Reload the router using reload command.

Reload the device.

By following above 8 steps we have successfully performed password recovery of Cisco router.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.