Cisco tips: Recover password for Cisco 2960

Cisco tips: Recover password for Cisco 2960

Step 1:

Connect your PC or terminal into the switch console port with the blue console cable.

Step 2: 

Power off the switch first, then press and hold the mode button while you power on the switch again. Hold it for about 15 seconds until the SYS led is solid green, and then release it.

The switch should then give you this prompt:

switch:

Step 3:

To initialize the flash file system, run the command:

switch: flash_init
Initializing Flash...
flashfs[0]: 5 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 8059904
flashfs[0]: Bytes available: 24454144
flashfs[0]: flashfs fsck took 10 seconds.
...done Initializing Flash.

The switch will now print a bunch of messages about the flash memory, hopefully one of them will be ‘done initializing flash’ as above shown


Step 4:

You can now list the contents of your flash by running

switch: dir flash:
Directory of flash: /
2 -rwx 12300 config.text
4 -rwx 1906 private-config.text
5 -rwx 676 vlan.dat
6 -rwx 8040418 c2960-lanbasek9-mz.122-50.SE3.bin
7 -rwx 2072 multiple-fs

There should be a file named ‘config.text’, as you can rename this file as follows:switch: rename flash:config.text flash: oldconfig.backup

Step 5:

To further boot the switch run the boot command as:
switch: boot

This will start the boot you are used to. When the switch is booted up, you will realize that the configuration is gone. But you are enabled on the switch now.

Step 5B:

After reboot switch will come and prompt asking initial configurations.  
No  - for initial config

Continue with the configuration dialog? [yes/no]:
N


Step 6:

Switch> enable

To recover the old configuration:


Switch# rename flash: oldconfig.backup flash:config.text

And now to replace the running configuration with the backup

Switch# copy flash: config.text running-config
Destination filename [running-config]?

Press enter, and you will have your old switch configuration back and you are enabled.
Just remember to change your password now !























Comments