1. Connect the switch console port with SECURECRT (or putty or Xshell)
2. Unplug the switch from power
3. Install the "Mode" button on the front panel of the switch and reseat the power to the switch
4. Observe the SYS light on the front panel of the switch until the SYS lamp is in the solid state (not flashing) and see the following screen appear
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8F/42/wKioL1jZFnqBHU01AAAyuMttWUM071.png-wh_500x0-wm_ 3-wmp_4-s_917564404.png "title=" 1.png "alt=" Wkiol1jzfnqbhu01aaayumttwum071.png-wh_50 "/>
You can release the "Mode" button
5. In the switch: Prompt that appears, enter the following:
switch:flash_init//Initialize Flash files
Switch:dir Flash://view files in Flash directory
switch:rename flash:config.text flash:oldconfig.text//rename config.test under Flash directory to Oldconfig.tex T
switch:boot//Manually start the switch
Since the configuration file will be loaded from Config.text in the Flash directory when the switch is started, the switch will bypass the configuration file because it cannot find the default profile after renaming its configuration file.
6. After the switch restarts
Reboot the switch into the mode
switch>
switch>en
Enter en into privileged mode and change the previously renamed configuration file back to
switch#rename flash:oldconfig.text flash:config.text
To copy a configuration file to a running file
switch#copy flash:config.text system:running-config
Then go to configuration mode, enter the new password
switch#conf t
Switch (config) #enable password XXXXXX//reset enable password
Switch (config) #line con 0//Enter console port
Switch (config-line) #password XXXXXX//Reset Console port password
7. Save the configuration
This article is from the "Dying Young Network Space" blog, so be sure to keep this source http://eric1026.blog.51cto.com/4754515/1910919
Cisco 2960 Password Recovery