交换路由器的口令恢复过程
本文描述找回Enable Password或Enable Secret密码的方法。
这些密码被用于保护对特权执行和配置模式的访问。
enable password是可以恢复的,而
enable secret password 将被加密,
并且只能使用以下过程将其替换为新密码。
*************************************
*请确认终端使用以下设置 *
* >9600
波特率 *
* >无奇偶校验 *
* >8
个数据位 *
* >1
个停止位 *
* >无流控制 *
*************************************
注意:
此密码恢复流程对下列Cisco产品适用:

操作步骤:
Step 1:若有可能,请优先保存文件;并确认配置寄存器的设置:它通常是0x2102或0x102;
Step 2:使用电源开关,关闭路由器,然后打开开关。
重要信息:要在Cisco 6400上模拟第4步,请拔出并替换节点路由处理器 (NRP)或节点交换机处理器(NSP)卡。
重要信息:要使用NI-2在Cisco 6x00上模拟第4步,请拔出并替换NI-2卡。
Step 3:启动后60秒内,根据系统提示,按下终端键盘上的“Break”或“Ctrl-C”键,进入ROMMON模式。
Step 4:rommon 1>confreg 0x2142 <<<<在不装载配置的情况下从闪存处引导;
rommon 2>reset <<<<重启但是忽略所保存的配置;
Step 5: 在每个设置问题后键入 no 或按 Ctrl-C 跳过初始设置步骤。
Step 6: Router# copy startup-config running-config或configure
memory <<<<复制非易失性RAM (NVRAM)到内存;
Router# show running-config或write
terminal <<<<显示路由器的配置;
(在此配置中,您将看到所有接口的关闭命令,这意味着当前所有接口都处于关闭状态。
并且,您能够以加密和未加密的格式查看密码(enable password、enable secret、vty、控制台密码等)。
未加密密码可以重新使用,但已加密的密码必须更改为新密码。)
Step 7: hostname(config)#no enable secret
hostname(config)#enable secret XXXX
<<<<更改enable secret password;
hostname(config)# config-register 0x2102 <<<<键入.config-register
0x2102或者您在第2.步记录的值;
Step 8: hostname# copy running-config
startup-config 或write memory
<<<<保存所做的修改;
###########################################################################################
进入 ROM
Monitor (ROMmon) 提示符模式可做如下操作:
rommon 1 > set
rommon 2 > confreg
Configuration Summary :
=> load ROM after netboot fails
=> console baud: 9600
=> autoboot from: commands
specified in 'BOOT' environment variable
do you wish to change the
configuration? y/n : y
enable "diagnostic mode"?
y/n : n
enable "use net in IP bcast
address"? y/n : n
disable "load ROM after netboot
fails"? y/n : n
enable "use all zero
broadcast"? y/n : n
enable "break/abort has
effect"? y/n : n
enable "ignore system config
info"? y/n : y
change console baud rate? y/n : n
change the boot characteristics? y/n
: n
Configuration Summary :
=> load ROM after netboot fails
=> ignore system config info
=> console baud: 9600
=> autoboot from: commands
specified in 'BOOT' environment variable
do you wish to save this
configuration? y/n : y
You must reset or power cycle for new
configuration to take effect
rommon 3 > reset
Resetting .......
rommon 4 >
**********************************************************
* *
* Welcome to ROM Monitor for WS-X4014
System. *
* Copyright (c) 1999-2000, 2001 by
Cisco Systems, Inc. *
* All rights reserved. *
* *
**********************************************************
… …
Press RETURN to get started!
… …
Switch>
###########################################################################################
CatOS的密码恢复

Step 1:关电重启设备
Step 2:2002 Apr 08 16:08:13
%SYS-3-MOD_PORTINTFINSYNC:Port Interface in sync for Module 1
Enter password: <<<<快速按“Enter”
2002 Apr 08 16:08:15 %SYS-1-SYS_ENABLEPS: Power supply 1 enabled
2002 Apr 08 16:08:15 %SYS-1-SYS_ENABLEPS: Power supply 2 enabled
Console> enable <------回车
Enter password: <------也是直接按回车 <<<<需要在30秒内完成,失败重启;
Console> (enable) set password
Enter old password: <------按回车
Enter new password: <------按回车
Retype new password: <------按回车
Password changed.
Console> (enable) set enablepass
Enter old password: <------按回车
Enter new password: <------按回车
Retype new password: <------按回车
Password changed.
特别提醒:
本文档为自行翻译理解,能力有限不能保证绝对性。
如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
参考文档:
http://www.cisco.com/cisco/web/support/CN/109/1091/1091470_pswdrec_cat2948GL3.pdf <<<<主要参考;
http://www.cisco.com/cisco/web/support/CN/107/1079/1079275_pswdrec_cat4000_supiii_21229.pdf
http://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/12043-pswdrec-6000.html
<<<<[Password
Recovery Procedure for the Catalyst 1200, 1400, 2901, 2902, 2926T/F, 2926GS/L,
2948G, 2980G, 4000, 5000, 5500, 6000, 6500 Running CatOS]
http://network.51cto.com/art/200811/99135.htm
http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/6130-index.html ; <<<<[Cisco IOS 12.1 软件版本“Mainline”-所有设备的密码恢复(Password
Recovery Procedures)]