vaheeD khoshnouD

linux, mikrotik, macosx

5 Steps of Password Recovery for Cisco 2960 Switch

Written by vaheeD on February 6, 2013
5 Steps of Password Recovery for Cisco 2960 Switch
1 vote, 5.00 avg. rating (93% score)


Step 1:

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 2:

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 3:

You can now list the contents of your flash by running

switch: dir flash:
Directory of flash: /
2 -rwx 12300 <date> config.text
4 -rwx 1906 <date> private-config.text
5 -rwx 676 <date> vlan.dat
6 -rwx 8040418 <date> c2960-lanbasek9-mz.122-50.SE3.bin
7 -rwx 2072 <date> 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 4:

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 5:

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 !

5 Steps of Password Recovery for Cisco 2960 Switch
1 vote, 5.00 avg. rating (93% score)

Posted Under: Cisco

About vaheeD

Leave a Reply

Your email address will not be published. Required fields are marked *

Protected by WP Anti Spam