You are on page 1of 2

Tuesday, July 2, 2019 5:12 PM

Password Recovery IOS Cisco 2960


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:

New Section 1 Page 1


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

New Section 1 Page 2

You might also like