Blue Flower

Sometimes it does happen that you grab a Cisco switch and you don't know the password for the Global Configuration mode (from > prompt to # prompt, or in other words typing "enable") these situations you have no option but to recover the password for "enable" mode. This is the process to recover the password on a Cisco C2960-S switch:

1.- Enter into Recovery Mode

Turn on the switch and keep pressing the "Mode" button until you see how the switches breaks its sequence and starts into Recovery Mode

2.- What to do on the Recovery Mode

Once the switch lets you in into the Recovery Mode, your window on the console will looks like this:

 

Type the following commands, once after another

flash_init ;this command will initialize the flash

dir flash: ;if you get the error "invalid argument" that means you have not initialised the flash

 You should be able to see the contents of the flash file, like the IOS and the "config.text", which is the config configuration. We need to rename this file, therefore do as follows:

rename flash:config.text flash:config.text.old

boot ;this will boot the switch with a blank configuration

3.- Password Recovery or a Blank start

Once the switch has loaded, you can change the enable password by using these commands:

enable
rename flash:config.text.old flash:config.text
copy flash:config.text system:running-config
conf t
enable secret YourPasswordHere

All done! 

 

Recover a router

To change the configuration register of a router do as follows:

(config)#config-register 0x2102    ;normal operation
(config)#config-register 0x2142    ;during boot, the router will by pass the running-config

Set it to 0x2142 (if you can) to reset the password of the router

Just for your info, the configuration register is a 16-bit register, where the lowest 4 bits of the configuration register (bits 0,1,2 and 3) come from the boot field. An hexadecimal is used to set the value of the configuration register

https://ippacket.com.au/how-to-upgrade-cisco-2960-switch-ios/
https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/configure-ssh-cisco-ios/

Print Friendly, PDF & Email

Comments powered by CComment