思科交换机恢复密码或取消密码
亲测适用于:2960、2960G、3750
上电
一、断电开机按Mode
二、switch:flash_init 加载flash内容
三、switch:dir flash: 查看flash内容
四、switch: rename flash:config.text flash:config.text.old
将flash里的config.text重命名为config.text.old,该文件夹是交换机的配置文件。
五、switch:boot 重启设备
一、Switch>en 进入特权模式
二、Switch#rename flash:config.text.old flash:config.text 重命名配置文件
三、Switch#copy flash:config.text system:running-config 将配置文件加载进running-config进行运行
四、Switch#config t 进入配置模式
五、Switch(config)#no enable password 删除特权模式旧密码
六、Switch(config)#no enable secret 删除特权模式加密密码
七、Switch(config)#line console 0 进入console接口
八、Switch(config-line)#no password 删除密码
九、Switch(config)#exit 退出配置模式
十、Switch#copy run start 把当前配置的文件写回Flash
Q.E.D.