How to: Recover Cisco configuration and access when password is lost

When loosing your credentials on a Cisco router, you can recover it all if you have physical access to it. You have to connect with the console cable and do the following:

Turn off Device
Turn on Device
Press CTRL C or CTRL Break Until rommon 1> shows
Enter confreg

Select as below:
do you wish to change the configuration? y/n [n]: y
enable “diagnostic mode”? y/n [n]:
enable “use net in IP bcast address”? y/n [n]:
disable “load rom after netboot fails”? y/n [n]:
enable “use all zero broadcast”? y/n [n]:
enable “break/abort has effect”? y/n [n]:
enable “ignore system config info”? y/n [n]: y
change console baud rate? y/n [n]:
change the boot characteristics? y/n [n]:
Configuration Summary
(Virtual Configuration Register: 0x2142)
enabled are:
load rom after netboot fails
ignore system config info
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-
do you wish to change the configuration? y/n [n]: n
You must reset or power cycle for new config to take effect

Enter reset
Wait for 2 minutes, turn off and on the device
Would you like to enter the initial configuration dialog? [yes/no]: no

Press enter to start
You should see Router>
Enter ena
Enter copy start run

Enter conf t
Enter user admin privilege 15 password 4dm1n
Enter enable secret 4dm1n (or whatever)
If need by change the VTY passwords
Enter copy run start

Enter do sh ver to see the register
Configuration register is 0x2142
Now enter config-register 0x2102
Enter do sh ver to confirm the register has been updated
Enter copy run start
Restart Router

Make sure no shut on all interface

(17018)

Leave a Reply

Your email address will not be published. Required fields are marked *