IOS 密码恢复
2500 及以前
将一台终端或装有超级终端软件的PC 接到设备的console 口上
在启动的60 秒内按下中断键,使设备进入rommon 状态.
>o/r 0x2142 #修改寄存值,使之路由器启动不加载配置文件
>i #重启
重启后,就进去了没有运行配置文件的系统,可以使用Show startup‐config 查看密码,
如果密码被加密了,则需要复制startup‐config 文件到Running‐config 文件中,先删除原有密
码,然后设置新密码,再保存配置文件。
把寄存值改回去:(router‐config)#config‐register 0x2102
重启路由器即可~
3600 以其以后的路由器:
开机30 秒内按住Ctrl+break 使之进入Rommon 模式
修改寄存值:>confreg 0x2142
重启路由器:>reset
路由器运行后查看配置文档或删除密码,同上!
交换机密码恢复:
用Console 线把PC 和交换机相连,打开终端
断电,重启交换机
接上电源后,按住Mode 键,待终端出现Switch:的提示即可放下
在switch:flash_init #使之初始化
Cat flash:config.text #查看flash 下的config.text 配置文件,可以看到密码(加密的继
续下一步)

Rename flash:config.text flash:t24.text #重命名启动文件
重启交换机boot 命令,copy flash:t24.text running‐config
删除密码:no enable password/secret
保存配置文件

 

 

启动PIX,ctrl+breack,进入到monitor>模式下,执行下面的操作:
monitor> interface 0
0: i8255X @ PCI(bus:0 dev:13 irq:10)
1: i8255X @ PCI(bus:0 dev:14 irq:7 )

Using 0: i82559 @ PCI(bus:0 dev:13 irq:10), MAC: 0050.54ff.82b9
monitor> address 192.168.18.111
address 192.168.18.111
monitor> server 192.168.18.254
server 192.168.18.111
monitor> file np63.bin
file np63.bin
monitor> gateway 192.168.18.254
gateway 192.168.18.254
monitor> ping 192.168.18.254
Sending 5, 100‐byte 0xf8d3 ICMP Echoes to 192.168.18.254, timeout is 4 seconds:
!!!!!
Success rate is 100 percent (5/5)
monitor> tftp
tftp np63.bin@192.168.18.254 via 192.168.18.254...................................
Received 92160 bytes
Cisco Secure PIX Firewall password tool (3.0) #0: Tue Aug 22 23:22:19 PDT 2000
Flash=i28F640J5 @ 0x300
BIOS Flash=AT29C257 @ 0xd8000
Do you wish to erase the passwords? [yn] y
Passwords have been erased.
Rebooting....重新启动后就可以了!

ASA 密码恢复
普通的恢复类似IOS 路由器:
进入CONSOLE 的物理连接,重启设备
You can press the Esc (Escape) key after "Use BREAK or ESC to interrupt boot" is
shown. This will take you into ROMMON mode, as follows:
rommon #0>
rommon #0> confreg
Current Configuration Register: 0x00000011
Configuration Summary: boot TFTP p_w_picpath, boot default p_w_picpath from Flash on netboot
failure
Do you wish to change this configuration? y/n [n]: y
disable system configuration? y/n [n]: y
红色部分是需要键入的命令
设备接着执行,将提示:
Current Configuration Register: 0x00000040
Configuration Summary: boot ROMMON ignore system configuration
Update Config Register (0x40) in NVRAM...
这里将0X11 启动模式转变到0X40 模式——类似IOS 的0X2102 到0X2142
rommon #1> boot
重新启动,将进入以下模式:
ciscoasa>
ciscoasa> enable
Password:<cr>
ciscoasa#
现在
ciscoasa# copy startup-config running-config 完成密码重设
Chicago# config terminal
Chicago(config)# passwd cisco123
Chicago(config)# enable password cisco123
改回启动方式
Chicago(config)# config-register 0x11