Cisco 交换机密码重置步骤

1.PC机有break键的方法

1.1中断设备启动 ctrl+break键

步骤:关闭设备,重启:

Self decompressing the p_w_picpath :  启动设备时按ctrl+Break

##########################

monitor: command "boot" aborted due to user interrupt

1.2更改配置寄存器的值为0x2142 (两个寄存器值:0x2102 (正常)0x2142(不读取保存的配置))

步骤:rommon 1 > confreg 0x2142    配置配置寄存器的值为0x2142

 1.3重启设备

步骤: rommon 2 > reset     重启设备

1.4 查看保存的配置文件中enable密码

步骤:Continue with configuration dialog? [yes/no]: n 不再加载startup-config

Router#show startup-config                    查看以前的密码

Router#copy startup-config running-config        将以前的配置加载到内存

1.5重设enable密码

步骤:Router#config t进入全局配置模式

Router(config)#enable password cisco          将密码重置

1.6保存配置

步骤:Router#copy running-config startup-config  将更改完密码的配置保存

Destination filename [startup-config]?

Building configuration...

[OK]

1.7更改配置寄存器的值为0x2102

步骤:Router#Router#show version  查看配置寄存器的值

Configuration register is 0x2142

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#conf  t

       Router(config)#config-register 0x2102   重新配置寄存器值

 

附:寄存器值意义

  0x2102: 运行过程中中断键被屏蔽,设备会查看NVRAM中配置的内容以确定启动次序,如果启动失败会采用缺省的ROM软件进行启动。

  0x2142:恢复密码时候使用。忽略NVRAM配置信息而进入初始配置对话模式中去。

 

2.PC机没有break键的方法

2.1 中断设备启动Ctrl+C (5秒)

步骤:Self decompressing the p_w_picpath :  启动设备时按ctrl+C

##########################

monitor: command "boot" aborted due to user interrupt

rommon 1 > 【interrupt】

2.2 进去ROMmon 模式开始使用命令配置如下

  步骤:rommon 1 > confreg

             下面选择Y或者N 单词不好 我就按选择的顺序告诉Y 或者N了 见谅下

 顺序如下:1.Y 2.N 3.N 4.N 5.N 6.N 7.Y 8.N 9.N 10.N

wKiom1XJR8DToEhaAAGCy3dY9Aw290.jpg

wKioL1XJScGBBwO_AAOYFAVXZM0346.jpg

 

 

2.3更改配置寄存器的值为0x2142

步骤:rommon1 > confreg 0x2142

 

2.4重启设备

步骤:rommon1 > reset

2.5查看更改的寄存器的值对不对

步骤:rommon1 > show version

里面有一句话;Configuration register is 0x2142 如果有值就对了

2.6 查看原来的配置并且保存

步骤:Router #show startup-config 查看以前的配置

Router#config t进入全局配置模式

Router(config)#show configure memory 保存以前的配置

2.7重设enable密码

步骤:Router(config)#no enable password  删除原有密码

Router(config)#enable password cisco 配置新密码

2.8更改配置寄存器的值为0x2102并且保存

步骤:Router(config)#config-register 0x2102

      Router(config)#exit

Router#write 保存