公司的cisco 2950交换机忘记密码了,在网上找了几个方法试了一下,以下的方法可行,所以记下来做参考。

1, 打开超级终端(默认设置) 如下图,用反转线接入到CONSOLE口,按Mode 键(长按)后给2950加电,

clip_p_w_picpath001

2,进入switch模式,并输入flash_init

3,把flash:config.text改名为flash:config.old,并用boot命令重启交换机

clip_p_w_picpath003

4,当问是否进行配置时,选NO,并进入特权模式,些时已不需密码

clip_p_w_picpath005

5,恢复原来的配置文件,并更改密码或取消密码

Switch# rename flash:config.old flash:confit.text

Switch#copy flash:config.text run

Switch13#show run 查看配置

Switch13#config t

Switch13(config)#enable secret cisco 把secret的密码设为cisco

Switch13(config)#no enable secret

Switch13(config)#enable password cisco01

Switch13(config)#no enable password

注意:secret 密码优先于enable password密码,前者设置后,后者不生效.