Nazaudy, a spark in your curious mind

Password Recovery for a Cisco switch 2960

This document shows you how to perform a Password Recovery for a Cisco switch 2960 so you can get the switch up and running again. 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 

2.- What to do on the Recovery Mode

3.- Password Recovery or a Blank start

Reset the privilege EXEC mode password on a Cisco router

 

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

Mode button use in Password Recovery for a Cisco switch 2960

 

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:

 flash_init boot

Type the following commands, once after another:

flash_init

dir flash:

The "flash_init" command will initialize the flash

If when entering "dir flash:" you get the error "invalid argument" that means you have not initialised the flash

In order to successfully do a Password Recovery for a Cisco switch 2960, 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

The "boot" command.... guess what? it will boot the switch, lol, starting from scratch with a blank configuration because the current you have just renamed it and it won't be found upon reboot

 

3.- Password Recovery or a Blank start

To continue with the Password Recovery for a Cisco switch 2960, and once the switch has loaded, you can change the enable password by using these commands, where in the last line you specify your own beloved password:

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

And that's it, all done! I hope this document of Password Recovery for a Cisco switch 2960 help you!

London, 28 December 2019

 

Reset the privilege EXEC mode password on a Cisco router

A tip that I'm adding on this article about Password Recovery for a Cisco switch 2960: 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

Donate to support Nazaudy

References

 

 

Comments powered by CComment