思科交换机强制恢复出厂设置(清密码)

来源:互联网 发布:大数据修炼 编辑:程序博客网 时间:2024/04/28 05:15
1)拔下交换机电源,用手按住交换机“Mode” 按钮,插上电源,等待交换机进入控制台模式。其提示符为“switch:”
2)switch: flash_init    //初始化flash文件系统 
3)switch: dir flash:    //命令显示flash中所保存的配置文件的名称。
4)switch: rename  flash:config.text   flash:config.old  //命令把原来的配置文件改名为config.old。(NVRAM是从flash虚拟的,flash:config.text =startup-config)
5)switch: reset  //命令把原来的配置文件改名为config.old。重新启动交换机,这时交换机找不到其配置文件(所以配置文件中的特权密码也就无效),系统就会提示是否进入“配置对话(configuration dialog)” ,选择“N” 。
6)switch># enable     //进入特权执行模式。
7)switch# rename  flash:config.old  flash:config.text   //把配置文件名字修改回来
8)switch#copy flash:config.text running-config   //把配置文件从FLASH中装载到RAM中。
9)Switch# config terminal  //进入全局配置模式 
10)Switch(config)# no enable password  //删除使能密码
11)Switch(config)# no enable secret  //删除加密的密码
12)Switch(config)# end   //直接返回到特权模式   
13)Switch# show runnig-config //查看正在进行的配置文件,请注意查看密码
14)Switch# copy running-config startup-config    //备份配置文件到NVRAM
原创粉丝点击