Reset a Cisco Switch with Unknown Password

Quick, reliable steps using the boot loader (switch: prompt).

Heads-up: This procedure removes the startup configuration (config.text). VLANs persist unless you also delete vlan.dat. If you want a full factory reset, delete both files before reset.

Physical Access

  1. Power off the switch.
  2. Press and hold the blue button on the left side (Mode/Reset).
  3. Power on the switch while holding the button until you see the switch: prompt on the console, then release.

You are now in the boot loader (ROMMON-like) environment.

List File Systems & Flash Contents

Show currently registered file systems:

switch: dir

List files in flash:

switch: dir flash:

Example output:

switch: dir flash:
Directory of flash:/

  258  -rwx  35        <date>               pnp-tech-time
  259  -rwx  45048     <date>               pnp-tech-discovery-summary
  263  drwx  2048      <date>               c1000-universalk9-mz.152-7.E6
  520  drwx  2048      <date>               dc_profile_dir
  257  drwx  2048      <date>               pnp-info
  775  -rwx  856       <date>               vlan.dat
 1025  drwx  2048      <date>               pnp-tech
  261  -rwx  4059      <date>               config.text
  774  -rwx  1917      <date>               private-config.text
  776  -rwx  9240      <date>               multiple-fs
    2  drwx  2048      <date>               lost+found

197554K bytes available (41422K bytes used)

Delete Startup Config (and Optional VLANs)

Remove the saved configuration so the switch boots fresh:

switch: delete flash:config.text
Are you sure you want to delete "flash:config.text" (y/n)?y
File "flash:config.text" deleted

Optional: also delete VLAN database if you want default VLANs:

switch: delete flash:vlan.dat
Are you sure you want to delete "flash:vlan.dat" (y/n)?y
File "flash:vlan.dat" deleted

Reboot

switch: reset
Are you sure you want to reset the system (y/n)?y
System resetting...

On boot, decline the initial configuration dialog if prompted. You can now set new passwords and reconfigure as needed.

Post-Reset Quick Setup (after boot)

enable
configure terminal
no ip domain-lookup
enable secret <NEW-SECURE-PASSWORD>
line console 0
 password <NEW-CONSOLE-PASS>
 login
line vty 0 15
 password <NEW-VTY-PASS>
 login
end
copy running-config startup-config