You can only reset password this way:
1.
Attach a terminal or PC with terminal emulation (for example, Hyper Terminal) to the console port of the switch.
Use the following terminal settings:
- Bits per second (baud): 9600
- Data bits: 8
- Parity: None
- Stop bits: 1
- Flow Control: Xon/Xoff
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. Release the Mode button when the
SYST LED blinks amber and then turns solid green. When you release the Mode button, the
SYST LED blinks green.
5. switch: flash_init
6. switch: load_helper
7. switch: dir flash:
8. switch: rename flash:config.text flash:config.old
Rename config.text to config.old. In that file the password is stored.
9. switch: boot
10. Enter "
n" at the prompt to abort the initial configuration dialog
11. Type en to enable
12. Switch#rename flash:config.old flash:config.text
13. Switch#copy flash:config.text system:running-config
14. Overwrite the current passwords:
conf term
enable secret <new pass>
enable password <new pass>
line vty 0 15
password <new pass>
login
line con 0
password <new pass>
15. write memory
16. copy run start