2960c

I found myself in need of having to wipe & reconfigure a device I no longer had credentials to. In this case, we have to reset the password via the password recovery procedure. Procedures for other devices can be found here.

Prerequisites

  • Cisco Catalyst 2960
  • Machine w/ Putty (or any console application of your choice i.e. TeraTerm, HyperTerminal, etc.)
  • Cisco Console Cable RJ45-to-DB9
  • DB9-to-USB Adapter

Procedure

Password Recovery Procedure

  1. Connect to the switch with the console cable/adapter and establish a serial connection via Putty.
  2. Unplug the AC adapter from the switch.
  3. Press and hold the Mode button on the front of the switch.
  4. Re-insert the AC adapter to the switch. Do not let go of the Mode button.
    • At this point the SYST LED should start blinking amber. Keep holding the Mode button.
    • After ~15-30 seconds, the SYST LED will start blinking rapidly, and the console status light will turn solid amber. Keep holding the Mode button.
    • After ~15 more seconds, the SYST LED will turn off. The console status light be remain on.
  5. Once the above LED process has completed, let go of the Mode button.
  6. Refer back to the console. You will see a switch: prompt.
    2016-04-26 11_50_01-COM4 - PuTTY
  7. Initialize the flash sequence.
    flash_init
  8. Show the contents of flash.
    dir flash:
    You should see a prompt similar to mine.
    2016-04-26 11_55_10-COM4 - PuTTY
  9. Rename config.text to config.old (or something other than the former).
    rename flash:config.text flash:config.old
  10. Boot the system back up.
    boot
  11. Exit the initial configuration dialog. It will prompt [yes/no]: after the system boots.
    n
  12. Enter enable mode.
    en
  13. Rename the configuration file back to its original name.
    rename flash:config.old flash:config.text
    Press Enter to confirm.
  14. Copy the configuration into memory.
    copy flash:config.text system:running-config
    Press Enter to confirm.

 

Factory Restore Defaults

This process assumes you’re running Cisco IOS (not CatOS). You may need console access with applicable enable & EXEC passwords in order to proceed. Refer to the beginning of this procedure if you have not done so.

To restore to factory default, you need to delete the startup configuration and the vlan.dat file.

  1. Erase the startup config and reload the switch.
    erase startup-config
    Press Enter to confirm.
    reload
    Do not save the system configuration if it prompts for yes or no. Press Enter to confirm reload.
  2. Delete the vlan configuration.
    delete flash:vlan.dat
    Press Enter twice to confirm.
    reload
    Press Enter to confirm.
  3. After the switch reloads, confirm the VLAN’s have been reset to default configuration.
    show vlan

Configure new passwords before configuring any additional switch settings. Remember to document them somewhere!

en
conf t
enable secret %secret%
enable password %password%
line vty 0 15
password %vtyPassword%
exit
line con 0
password %conPassword%
end
write mem

You now have a completely factory restored switch with default settings and documented passwords. Thanks for reading.