fairyguo 发表于 2018-7-14 07:32:58

恢复Cisco接入交换机密码

  今天下午刚好有一台Cisco 2960交换机出现故障,立即更换一台备用交换机上去,但备用交换机是从另一分支机构转移回来,密码已经忘了。正好用到恢复密码的过程,也一并分享出来。
  1、 设置WINDOWS超级终端,名称自定义。建议用SecureCRT:
  波特率(每秒位数):9600
  数据位:8
  奇偶校验:无
  停止位:1
  数据流控制:硬件或无
  2、连接交换机电源的同时按住交换机前面板上的mode(模式)键,直到交换机上1X端口指示灯不再亮(大约15~20秒)。将出现以下信息:
  The system has been interrupted prior to initializing the flash file system. The following commands will initialize the flash file system, and finish loading the operating system software:
  flash_init
  load_helper
  boot
  switch>
  3、在switch>提示符下键入flash_init,进行初始化;
  4、switch>load_helper
  5、switch>dir flash:
  显示如下信息:
  Directory of flash:
  2 -rwx 843947 Mar 01 1993 00:02:18 C2900XL-h-mz-112.8-SA
  4 drwx 3776 Mar 01 1993 01:23:24 html
  66 -rwx 130 Jan 01 1970 00:01:19 env_vars
  68 -rwx 1296 Mar 01 1993 06:55:51 config.text
  1728000 bytes total (456704 bytes free)
  6、switch>rename flash:config.text flash:config.old
  
  7、switch>boot
  把配置文件更名后,在switch>下键入boot引导设备,在系统开始进行设置的时候,按N键,设置完成后,出现如下信息:
  Continue with the configuration dialog? :
  键入n
  8、出现switch>提示符后,键入en进入配置模式
  9、重新命名配置文件:
  switch> rename flash:config.old flash:config.text
  10、拷贝配置文件到内存中
  Switch# copy flash:config.text system:running-config
  Destination filename ? (press Return)
  按回车键,将配置文件重新装入。
  11、改变口令
  switch#config terminal
  switch(config)#enable password Cisco
  switch(config)#enable secret cisco123
  12、将当前配置写入配置文件
  switch(config)#copy run starup
  经过以上步骤操作后,交换机的密码已经被修改,但配置信息不变。
页: [1]
查看完整版本: 恢复Cisco接入交换机密码