菜蜂 发表于 2018-7-20 08:40:35

Cisco路由器交换机密码恢复

  Cisco路由器的密码恢复http://blog.51cto.com/e/u261/themes/default/images/spacer.gif拓扑.jpg(4.81 KB)2011-12-19 22:07
  1. Router>enable
  Password:
  Password:
  Password:
  % Bad passwords
  Router>
  Router>show version

  Cisco IOS Software,3600 Software (C3640-JK9O3S-M), Version 12.4(16),>  Technical Support:http://www.cisco.com/techsupport
  Copyright (c) 1986-2007by Cisco Systems, Inc.
  Compiled Wed 20-Jun-0711:43 by prod_rel_team
  ROM: ROMMON EmulationMicrocode

  ROM: 3600 Software(C3640-JK9O3S-M), Version 12.4(16),>  Router uptime is 1minute

  System returned to ROMby unknown>  System image file is"tftp://255.255.255.255/unknown"
  This product containscryptographic features and is subject to United
  States and localcountry laws governing import, export, transfer and
  use. Delivery of Ciscocryptographic products does not imply
  third-party authorityto import, export, distribute or use encryption.
  Importers, exporters,distributors and users are responsible for
  compliance with U.S.and local country laws. By using this product you
  agree to comply withapplicable laws and regulations. If you are unable
  to comply with U.S. andlocal laws, return this product immediately.
  A summary of U.S. lawsgoverning Cisco cryptographic products may be found at:
  http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
  If you require furtherassistance please contact us by sending email to
  export@cisco.com.
  Cisco 3640 (R4700)processor (revision 0xFF) with 94208K/4096K bytes of memory.

  Processor board>  R4700 CPU at 100MHz,Implementation 33, Rev 1.2
  1 Ethernet interface
  4 Serial interfaces
  DRAM configuration is64 bits wide with parity enabled.
  125K bytes of NVRAM.
  8192K bytes ofprocessor board System flash (Read/Write)
  Configuration registeris 0x2142
  Router>
  2. 在路由重启时,按下ctrl+break键,进入rommon模式
  System Bootstrap, Version 12.2(7r) ,>
  Copyright (c) 2002 by cisco Systems, Inc.
  C2600 platform with 131072 Kbytes of main memory
  PC = 0xfff0ac3c, Vector = 0x500, SP = 0x8000438c
  monitor: command "boot" aborted due to user interrupt
  rommon 1 >
  3. 在rommon模式下,修改寄存值为0x2142
  rommon 1 > confreg 0x2142
  4. 重启路由器,使修改后的寄存值生效
  rommon 2 > reset
  5.进入路由器的手工配置模式
  Would you like to enter the initial configuration dialog? : no
  Router>enable
  Router#
  6. 将NVRAM中的startup-config文件copy至running-config中
  Router#copy startup-config running-config
  Destination filename ?
  988 bytes copied in 2.600 secs (380 bytes/sec)
  Router#
  7. 进入全局模式,修改用户模式进入特权模式的密码
  Router#configure terminal
  Router (config)#enable password cisco
  
  Router#show ip interface brief
  Router(config)#interface Ethernet0/0
  Router(configif)#noshutdown
  8 .将寄存值还原成0x2102
  Router (config)#config-register 0x2102
  9.保存配置文件
  Router#copy running-config startup-config
  注:2500系列路由器的寄存值修改命令为 o/r 0x2142 ,重启命令为 i 。
  --------------------------------------------------------------------------------------------------------------------------------------Cisco交换机的密码恢复
  1.重启交换机,按下交换机上的MODE键,进入boot模式(10-15s)。
  The system has been interrupted prior toinitializing the
  flash filesystem.
  The following commands will initialize
  the flash filesystem, and finish loading theoperating
  system software:
  flash_init
  load_helper
  boot
  switch:
  2.键入 flash_init命令,初始化 flash
  switch: flash_init
  3.输入 load_helper 命令,执行 dir flash
  switch: load_helper
  switch: dir flash:
  Directory of flash:/
  2
  -rwx
  109
  <date>
  info
  3
  -rwx
  3110758
  <date>
  c2950-i6q4l2-mz.121-22.EA6.bin
  4
  drwx
  4160
  <date>
  html
  373
  -rwx
  109
  <date>
  info.ver
  374
  -rwx
  335466
  <date>
  c2950-hdiag-mz.121-9.EA1
  376
  -rwx
  856
  <date>
  vlan.dat
  377
  -rwx
  5
  <date>
  private-config.text
  378
  -rwx
  309
  <date>
  env_vars
  379
  -rwx
  1106
  <date>
  config.text
  4.修改 flash 中的config.text文件
  switch: rename flash:config.text flash:config.old
  5.重启交换机
  switch: boot
  进入交换机的配置模式,进入交换机的特权模式
  6.恢复原配置文件
  Switch#rename flash:config.old flash:config.text
  7.调用原配置文件,恢复原交换机配置
  Switch#copy flash:config.text system:running-config
  8.进入全局模式修改用户模式进入特权模式的密码
  Switch#configure terminal
  Switch(config)#enable password cisco
  9.保存配置文件
  Switch#write memory
  注:2500系列路由器的寄存值修改命令为 o/r 0x2142 ,重启命令为 i
  http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_tech_note09186a00801746e6.shtml
  --------------------------------------------------------------------------------------------------------------------
页: [1]
查看完整版本: Cisco路由器交换机密码恢复