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.
- 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
Password Recovery Procedure
- Connect to the switch with the console cable/adapter and establish a serial connection via Putty.
- Unplug the AC adapter from the switch.
- Press and hold the Mode button on the front of the switch.
- 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.
- Once the above LED process has completed, let go of the Mode button.
- Refer back to the console. You will see a switch: prompt.
- Initialize the flash sequence.
- Show the contents of flash.
dir flash:You should see a prompt similar to mine.
- Rename config.text to config.old (or something other than the former).
rename flash:config.text flash:config.old
- Boot the system back up.
- Exit the initial configuration dialog. It will prompt [yes/no]: after the system boots.
- Enter enable mode.
- Rename the configuration file back to its original name.
rename flash:config.old flash:config.textPress Enter to confirm.
- Copy the configuration into memory.
copy flash:config.text system:running-configPress 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.
- Erase the startup config and reload the switch.
erase startup-configPress Enter to confirm.
Do not save the system configuration if it prompts for yes or no. Press Enter to confirm reload.
- Delete the vlan configuration.
delete flash:vlan.datPress Enter twice to confirm.
reloadPress Enter to confirm.
- After the switch reloads, confirm the VLAN’s have been reset to default configuration.
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.