本文档介绍如何恢复思科路由器启用口令和启用加密口令。这些口令可对特权执行和配置模式的访问权限进行保护。启用口令可以恢复,但是启用加密口令经过了加密,必须使用新口令进行替换。请使用本文档介绍的过程替换 enable secret 口令。
本文档中的信息根据思科12000系列路由器。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
请执行以下步骤以恢复口令:
将终端或带终端仿真功能的 PC 连接到路由器的控制台端口。
使用以下终端设置:
9600 波特率
无奇偶校验
8 个数据位
1 个停止位
无流控制
如果可以访问路由器,请在提示符处键入 show version,并且记录配置寄存器设置。查看 show version 命令的输出
注意: 配置寄存器通常设置为 0x2102 或 0x102。如果(由于丢失登录口令或 TACACS 口令)无法再访问路由器,则完全可以假设配置寄存器已设置为 0x2102。
使用电源开关关闭路由器,然后重新打开。
重要说明:
要在 Cisco 6400 上模拟此步骤,请将节点路由处理器 (NRP) 或节点交换机处理器 (NSP) 卡拔出,然后再插入。
要在带有 NI-2 的 Cisco 6x00 上模拟此步骤,请将 NI-2 卡拔出,然后再插入。
在启动后的 60 秒内按下终端键盘上的 Break 键,使路由器进入 ROMMON 模式。
如果中断顺序不起作用,请参阅口令恢复过程中的标准break键序列组合,获取其他键组合。
在 rommon 1> 提示符处键入 confreg 0x2142,以便从闪存启动。
此步骤将会跳过存储口令的启动配置。
在 rommon 2> 提示符处键入 reset。
路由器将会重新启动,但是会忽略保存的配置。
在每个设置问题后键入 no 或按 Ctrl-C,跳过初始设置过程。
在 Router> 提示符处键入 enable。
您将进入启用模式,此时应看到 Router# 提示符。
键入 configure memory 或 copy startup-config running-config,将非易失性 RAM (NVRAM) 复制到内存中。
重要信息:请勿键入 copy running-config startup-config 或 write。这些命令将会擦除您的启动配置。
键入 show running-config。
show running-config 命令将会显示路由器的配置。在此配置中,在所有接口下将会出现 shutdown 命令,显示当前关闭的所有接口。此外,口令(启用口令、启用加密、vty、控制台口令)可能是加密格式,也可能是未加密格式。您可重复使用未加密的口令,您必须将加密的口令更改为新口令。
键入 configure terminal。
此时将会显示 hostname(config)# 提示符。
键入 enable secret
hostname(config)#enable secret cisco
在所用的每个接口上发出 no shutdown 命令。
如果发出 show ip interface brief 命令,则要使用的每个接口都应显示 up up。
键入 config-register
hostname(config)#config-register 0x2102
按 Ctrl-z 或 end,离开配置模式。
此时将会显示 hostname# 提示符。
键入 write memory 或 copy running-config startup-config,以提交更改。
本部分提供了一个口令恢复过程的示例。此示例是使用 Cisco 2600 系列路由器创建的。即使您使用的不是 Cisco 2600 系列路由器,以下输出也可为您的产品体验提供示例。
Router>enablePassword:Password:Password:% Bad secretsRouter>show versionCisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-IS-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Tue 07-Dec-99 02:21 by phanguyeImage text-base: 0x80008088, data-base: 0x80C524F8ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Router uptime is 3 minutesSystem returned to ROM by abort at PC 0x802D0B60System image file is "flash:c2600-is-mz.120-7.T"cisco 2611 (MPC860) processor (revision 0x202) with 26624K/6144K bytes of memory.Processor board ID JAB031202NK (3878188963)M860 processor: part number 0, mask 49Bridging software.X.25 software, Version 3.0.0.Basic Rate ISDN software, Version 1.1.2 Ethernet/IEEE 802.3 interface(s)2 Serial(sync/async) network interface(s)1 ISDN Basic Rate interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash partition 1 (Read/Write)8192K bytes of processor board System flash partition 2 (Read/Write)Configuration register is 0x2102Router>!--- The router was just powercycled, and during bootup a !--- break sequence was sent to the router.!*** System received an abort due to Break Key ***signal= 0x3, code= 0x500, context= 0x813ac158PC = 0x802d0b60, Vector = 0x500, SP = 0x80006030rommon 1 > confreg 0x2142You must reset or power cycle for new config to take effectrommon 2 > resetSystem Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Copyright (c) 1999 by cisco Systems, Inc.TAC:Home:SW:IOS:Specials for infoC2600 platform with 32768 Kbytes of main memoryprogram load complete, entry point: 0x80008000, size: 0x6fdb4cSelf decompressing the image : ######################################################################################################################################################################################################################################################## [OK] Restricted Rights LegendUse, duplication, or disclosure by the Government issubject to restrictions as set forth in subparagraph(c) of the Commercial Computer Software - RestrictedRights clause at FAR sec. 52.227-19 and subparagraph(c) (1) (ii) of the Rights in Technical Data and ComputerSoftware clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706Cisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-IS-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Tue 07-Dec-99 02:21 by phanguyeImage text-base: 0x80008088, data-base: 0x80C524F8cisco 2611 (MPC860) processor (revision 0x202) with 26624K/6144K bytes of memory.Processor board ID JAB031202NK (3878188963)M860 processor: part number 0, mask 49Bridging software.X.25 software, Version 3.0.0.Basic Rate ISDN software, Version 1.1.2 Ethernet/IEEE 802.3 interface(s)2 Serial(sync/async) network interface(s)1 ISDN Basic Rate interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash partition 1 (Read/Write)8192K bytes of processor board System flash partition 2 (Read/Write) --- System Configuration Dialog ---Would you like to enter the initial configuration dialog? [yes/no]: nPress RETURN to get started!00:00:19: %LINK-3-UPDOWN: Interface BRI0/0, changed state to up00:00:19: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up00:00:19: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up00:00:19: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down00:00:19: %LINK-3-UPDOWN: Interface Serial0/1, changed state to down00:00:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0/0, changed state to down00:00:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to upRouter>00:00:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up00:00:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down00:00:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down00:00:50: %SYS-5-RESTART: System restarted --Cisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-IS-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Tue 07-Dec-99 02:21 by phanguye00:00:50: %LINK-5-CHANGED: Interface BRI0/0, changed state to administratively down00:00:52: %LINK-5-CHANGED: Interface Ethernet0/0, changed state to administratively down00:00:52: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down00:00:52: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to administratively down00:00:52: %LINK-5-CHANGED: Interface Serial0/1, changed state to administratively down00:00:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down00:00:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to downRouter>Router>enableRouter#copy startup-config running-configDestination filename [running-config]?1324 bytes copied in 2.35 secs (662 bytes/sec)Router#00:01:24: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0/0:1, changed state to down00:01:24: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0/0:2, changed state to downRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#enable secret < password >Router(config)#^Z00:01:54: %SYS-5-CONFIG_I: Configured from console by consoleRouter#show ip interface briefInterface IP-Address OK? Method Status ProtocolEthernet0/0 10.200.40.37 YES TFTP administratively down downSerial0/0 unassigned YES TFTP administratively down downBRI0/0 193.251.121.157 YES unset administratively down downBRI0/0:1 unassigned YES unset administratively down downBRI0/0:2 unassigned YES unset administratively down downEthernet0/1 unassigned YES TFTP administratively down downSerial0/1 unassigned YES TFTP administratively down downLoopback0 193.251.121.157 YES TFTP up upRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface Ethernet0/0Router(config-if)#no shutdownRouter(config-if)#00:02:14: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up00:02:15: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to upRouter(config-if)#interface BRI0/0Router(config-if)#no shutdownRouter(config-if)#00:02:26: %LINK-3-UPDOWN: Interface BRI0/0:1, changed state to down00:02:26: %LINK-3-UPDOWN: Interface BRI0/0:2, changed state to down00:02:26: %LINK-3-UPDOWN: Interface BRI0/0, changed state to up00:02:115964116991: %ISDN-6-LAYER2UP: Layer 2 for Interface BR0/0, TEI 68 changed to upRouter(config-if)#^ZRouter#00:02:35: %SYS-5-CONFIG_I: Configured from console by consoleRouter#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]Router#show versionCisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-IS-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Tue 07-Dec-99 02:21 by phanguyeImage text-base: 0x80008088, data-base: 0x80C524F8ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Router uptime is 3 minutesSystem returned to ROM by abort at PC 0x802D0B60System image file is "flash:c2600-is-mz.120-7.T"cisco 2611 (MPC860) processor (revision 0x202) with 26624K/6144K bytes of memory.Processor board ID JAB031202NK (3878188963)M860 processor: part number 0, mask 49Bridging software.X.25 software, Version 3.0.0.Basic Rate ISDN software, Version 1.1.2 Ethernet/IEEE 802.3 interface(s)2 Serial(sync/async) network interface(s)1 ISDN Basic Rate interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash partition 1 (Read/Write)8192K bytes of processor board System flash partition 2 (Read/Write)Configuration register is 0x2142Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#config-register 0x2102Router(config)#^Z00:03:20: %SYS-5-CONFIG_I: Configured from console by consoleRouter#show versionCisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-IS-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)Copyright (c) 1986-1999 by cisco Systems, Inc.Compiled Tue 07-Dec-99 02:21 by phanguyeImage text-base: 0x80008088, data-base: 0x80C524F8ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Router uptime is 3 minutesSystem returned to ROM by abort at PC 0x802D0B60System image file is "flash:c2600-is-mz.120-7.T"cisco 2611 (MPC860) processor (revision 0x202) with 26624K/6144K bytes of memory.Processor board ID JAB031202NK (3878188963)M860 processor: part number 0, mask 49Bridging software.X.25 software, Version 3.0.0.Basic Rate ISDN software, Version 1.1.2 Ethernet/IEEE 802.3 interface(s)2 Serial(sync/async) network interface(s)1 ISDN Basic Rate interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash partition 1 (Read/Write)8192K bytes of processor board System flash partition 2 (Read/Write)Configuration register is 0x2142 (will be 0x2102 at next reload)Router#
Copyright ©2017-2021 武汉市朗联科技有限公司 鄂ICP备案号17020357