1. Attach a PC with terminal emulation to the console port of the switch.
  2. Unplug the power cable.
  3. Hold down the mode button located on the left side of the front panel, while you reconnect the power cable to the switch.
  4. LED Behavior and Mode Button Release Action
    • 2960 series: Release the Mode button when the SYST LED blinks amber and then turns solid green.
    • 3750 series: Release the Mode button after approximately 15 seconds when the SYST LED turns solid green.
  5. When you release the Mode button, the SYST LED blinks green. The switch: prompt appears on the terminal.
  6. Continue with the following command line operations
Switch: flash_init
Switch: dir flash:
Switch: rename flash:config.text flash:config.old
Switch: boot

...

Continue with configuration dialog? [yes/no]: n
Switch> en
Switch# rename flash:config.old flash:config.text
Switch# copy flash:config.text system:running−config
Switch# conf t

Switch(config)# enable secret <new_secret_password>
or
Switch(config)# enable password <new_enable_password>

Switch(config)# line vty 0 15
Switch(config−line)# password <new_vty_password>
Switch(config−line)# login
Switch(config−line)# line con 0
Switch(config−line)# password <new_console_password>
Switch# wr