Recover Passwords on the Cisco Switch Catalyst 2960
Step 1: Reset the console password.
Have a classmate change the console and vty passwords on the switch. Save the changes to the startup-
config file and reload the switch.
Now, without knowing the passwords, try to gain access to the switch.
Step 2: Recover access to the switch
Make sure that a PC is connected to the console port and a HyperTerminal window is open. Turn the
switch off. Turn it back on while holding down the MODE button on the front of the switch at the same
time that the switch is powered on. Release the MODE button after the SYST LED stops blinking and
stays on.
The following output should be displayed:
The system has been interrupted prior to initializing the flash files
system. The following commands will initialize the flash files system,
and finish loading the operating system software:
flash_init
load_helper
boot
To initialize the file system and finish loading the operating system, enter the following commands:
switch:flash_init
switch:load_helper
switch:dir flash:
Note: Do not forget to type the colon (:) after flash in the command dir flash:.
Type rename flash:config.text flash:config.old to rename the configuration file. This file contains the
password definition.
Step 3: Restart the system.
Type the boot command to boot the system. Enter n when prompted to continue the configuration dialog,
and y when asked if you want to terminate auto-install.
To rename the configuration file with its original name, type the command rename flash:config.old
flash:config.text at the privileged EXEC mode prompt.
Copy the configuration file into memory:
Switch#copy flash:config.text system:running-config
Source filename [config.text]?[enter]
Destination filename [running-config][enter]
The configuration file is now reloaded. Change the old unknown passwords as follows:
ALSwitch#configure terminal
ALSwitch(config)#no enable secret
ALSwitch(config)#enable secret class
ALSwitch(config)#line console 0
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#exit
ALSwitch(config)#line vty 0 15
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#end
ALSwitch#copy running-config startup-config
Destination filename [startup-config]?[enter] Building configuration…
[OK]
ALSwitch#
