思科2960恢复密码

上电

一、断电开机按Mode

二、switch:flash_init

三、switch:dir flash:

四、switch: rename flash:config.text flash:backconfig.text

五、switch:boot

重启运行

一、Switch#rename flash:backconfig.text flash:config.text

二、Switch#copy flash:config.text system:running-config

三、Switch(config)#no enable password 

步骤

Using driver version 1 for media type 1
Base ethernet MAC Address: 04:0b:0d:4b08:00
Xmodem file system is available.
The password-recovery mechanism is enabled.

The system has been interrupted prior to initializing the
flash filesystem.  The following commands will initialize
the flash filesystem, and finish loading the operating 
system software:

    flash_init
    boot


switch: flash_init
Initializing Flash...
mifs[2]: 10 files, 1 directories
mifs[2]: Total bytes     :    1806336
mifs[2]: Bytes used      :     612352
mifs[2]: Bytes available :    1193984
mifs[2]: mifs fsck took 2 seconds.
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes     :    3870720
mifs[3]: Bytes used      :       1024
mifs[3]: Bytes available :    3869696
mifs[3]: mifs fsck took 1 seconds.
mifs[4]: 5 files, 1 directories
mifs[4]: Total bytes     :     258048
mifs[4]: Bytes used      :       9216
mifs[4]: Bytes available :     248832
mifs[4]: mifs fsck took 0 seconds.
mifs[5]: 5 files, 1 directories
mifs[5]: Total bytes     :     258048
mifs[5]: Bytes used      :       9216
mifs[5]: Bytes available :     248832
mifs[5]: mifs fsck took 1 seconds.
 -- MORE --
mifs[6]: 566 files, 19 directories
mifs[6]: Total bytes     :   57931776
mifs[6]: Bytes used      :   15291392
mifs[6]: Bytes available :   42640384
mifs[6]: mifs fsck took 30 seconds.
...done Initializing Flash.

switch: dir flash:
Directory of flash:/

    2  -rwx  796       <date>               vlan.dat
    3  -rwx  1919      <date>               private-config.text
    4  -rwx  2797      <date>               config.text
    5  -rwx  5144      <date>               multiple-fs
    6  drwx  512       <date>               c2960s-universalk9-mz.122-55.SE7

42640384 bytes available (15291392 bytes used)

switch: rename flash:config.text flash:backconfig.text

switch: dir flash:
Directory of flash:/    

2  -rwx  796       <date>               vlan.dat    

3  -rwx  1919      <date>               private-config.text    

4  -rwx  2797      <date>               backconfig.text    

5  -rwx  5144      <date>               multiple-fs    

6  drwx  512       <date>               c2960s-universalk9-mz.122-55.SE7 42640384 bytes available (15291392 bytes used)

switch: boot
Loading "flash:/c2960s-universalk9-mz.122-55.SE7/c2960s-universalk9-mz.122-55.SE7.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:/c2960s-universalk9-mz.122-55.SE7/c2960s-universalk9-mz.122-55.SE7.bin" uncompressed and installed, entry point: 0x3000
executing...

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706

Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 12.2(55)SE7, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Mon 28-Jan-13 10:28 by prod_rel_team
Image text-base: 0x00003000, data-base: 0x01B00000

Initializing flashfs...
Using driver version 1 for media type 1
mifs[3]: 10 files, 1 directories
mifs[3]: Total bytes     : 1806336   
mifs[3]: Bytes used      : 612352    
mifs[3]: Bytes available : 1193984   
mifs[3]: mifs fsck took 0 seconds.
mifs[3]: Initialization complete.

mifs[4]: 0 files, 1 directories
mifs[4]: Total bytes     : 3870720   
mifs[4]: Bytes used      : 1024      
mifs[4]: Bytes available : 3869696   
mifs[4]: mifs fsck took 0 seconds.
mifs[4]: Initialization complete.

mifs[5]: 5 files, 1 directories
mifs[5]: Total bytes     : 258048    
mifs[5]: Bytes used      : 9216      
mifs[5]: Bytes available : 248832    
mifs[5]: mifs fsck took 0 seconds.
mifs[5]: Initialization complete.

mifs[6]: 5 files, 1 directories
mifs[6]: Total bytes     : 258048    
mifs[6]: Bytes used      : 9216      
mifs[6]: Bytes available : 248832    
mifs[6]: mifs fsck took 0 seconds.
mifs[6]: Initialization complete.

mifs[7]: 566 files, 19 directories
mifs[7]: Total bytes     : 57931776  
mifs[7]: Bytes used      : 15291392  
mifs[7]: Bytes available : 42640384  
mifs[7]: mifs fsck took 0 seconds.
mifs[7]: Initialization complete.

...done Initializing flashfs.

POST: MA BIST : BeginYeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G FC 1   MBIST Unload Activity 

***ERR: S88G FC 1   MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G DP Sg1 MBIST Unload Activity 

***ERR: S88G DP Sg1 MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G DP Xg1 MBIST Unload Activity 

***ERR: S88G DP Xg1 MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G NI 1   MBIST Unload Activity 

***ERR: S88G NI 1   MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G FC 0   MBIST Unload Activity 

***ERR: S88G FC 0   MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G DP Sg0 MBIST Unload Activity 

***ERR: S88G DP Sg0 MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G DP Xg0 MBIST Unload Activity 

***ERR: S88G DP Xg0 MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G NI 0   MBIST Unload Activity 

***ERR: S88G NI 0   MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
***ERR: S88G UPB    MBIST Unload Activity 

***ERR: S88G UPB    MBIST failed 
Yeti2S88gMdioWr: Unknown status for write operation
POST: MA BIST : End, Status Passed

POST: TCAM BIST : Begin
POST: TCAM BIST : End, Status Passed

extracting front_end/front_end_ucode_info (86 bytes)
Waiting for Stack Master Election...
POST: Thermal, Fan Tests : Begin
POST: Thermal, Fan Tests : End, Status Passed

POST: PortASIC Stack Port Loopback Tests : Begin
POST: PortASIC Stack Port Loopback Tests : End, Status Passed

POST: PortASIC Port Loopback Tests : Begin
POST: PortASIC Port Loopback Tests : End, Status Passed

POST: EMAC Loopback Tests : Begin
POST: EMAC Loopback Tests : End, Status Passed

Election Complete
Switch 1 booting as Master
Waiting for Port download...Complete


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to 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 with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C2960S-48TS-L (PowerPC) processor (revision K0) with 131072K bytes of memory.
Processor board ID FOC1739Y15K
Last reset from power-on
1 Virtual Ethernet interface
1 FastEthernet interface
52 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address       : 04:0B:0D:0B:08:00
Motherboard assembly number     : 73-11909-09
Power supply part number        : 341-0327-04
Motherboard serial number       : FO0730F
Power supply serial number      : LIT1720WG
Model revision number           : K0
Motherboard revision number     : A0
Model number                    : WS-C2960S-48TS-L
Daughterboard assembly number   : 73-1100-04
Daughterboard serial number     : FOC080VA
System serial number            : FO0015K
Top Assembly Part Number        : 800-00000-06
Top Assembly Revision Number    : A0
Version ID                      : V06
CLEI Code Number                : C00ARF
Daughterboard revision number   : A0
Hardware Board Revision Number  : 0x01
Switch Ports Model              SW Version            SW Image                 
------ ----- -----              ----------            ----------               
*    1 52    WS-C2960S-48TS-L   12.2(55)SE7           C2960S-UNIVERSALK9-M     
Press RETURN to get started!
*Mar  1 00:00:12.284: Read env variable - LICENSE_BOOT_LEVEL = 
*Mar  1 00:00:12.881: %IOS_LICENSE_IMAGE_APPLICATION-6-LICENSE_LEVEL: Module name = c2960s_lanbase Next reboot level = lanbase and License = lanbase
*Mar  1 00:02:03.349: %STACKMGR-4-SWITCH_ADDED: Switch 1 has been ADDED to the stack
*Mar  1 00:02:04.649: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
*Mar  1 00:02:05.661: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
*Mar  1 00:02:58.908


         --- System Configuration Dialog ---

Enable secret warning
----------------------------------
In order to access the device manager, an enable secret is required
If you enter the initial configuration dialog, you will be prompted for the enable secret
If you choose not to enter the intial configuration dialog, or if you exit setup without setting the enable secret,
please set an enable secret using the following CLI in configuration mode-
enable secret 0 <cleartext password>
----------------------------------
Would you like to enter the initial con: %STACKMGR-5-SWITCH_READY: Switch 1 is READY
*Mar  1 00:02:58.913: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 1 Switch 1 has changed to state DOWN
*Mar  1 00:02:58.913: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 2 Switch 1 has changed to state DOWN
*Mar  1 00:02:59.395: %STACKMGR-5-MASTER_READY: Master figuration dialog? [yes/no]: 

Would you like to enter the initial configuration dialog? [yes/no]: Switch 1 is READY
*Mar  1 00:02:59.400: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 12.2(55)SE7, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Mon 28-Jan-13 10:28 by prod_rel_team
*Mar  1 00:02:59.856: %USB_CONSOLE-6-MEDIA_RJ45: Console media-type is RJ45.
*Mar  1 00:03:01.193: %LINK-3-UPDOWN: Interface FastEthernet0, changed state to down
*Mar  1 00:03:02.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0, changed state to down
% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n
Switch>enable
Switch#rename flash:backconfig.text flash:config.text
Destination filename [config.text]?          这里直接回车不写任何字符,不然更改的名字为变成你输入字符
Switch#dir
Directory of flash:/

    3  -rwx        1048   Mar 1 1993 00:03:04 +00:00  multiple-fs
    2  -rwx         796   Mar 1 1993 00:08:57 +00:00  vlan.dat
    4  -rwx        2797   Mar 1 1993 00:03:06 +00:00  config.text
    6  drwx         512   Mar 1 1993 00:14:37 +00:00  c2960s-universalk9-mz.122-55.SE7

57931776 bytes total (42647040 bytes free)
Switch#copy flash:config.text system:running-config
Destination filename [running-config]? 

% Generating 1024 bit RSA keys, keys will be non-exportable...
*Mar  1 00:05:27.202: %LINK-5-CHANGED: Interface FastEthernet0, changed state to administratively down[OK]

*Mar  1 00:05:31.827: %SSH-5-ENABLED: SSH 1.99 has been enabled
2797 bytes copied in 9.306 secs (301 bytes/sec)
*Mar  1 00:05:33.059: %PKI-6-AUTOSAVE: Running configuration saved to NVRAM
2960#enable

2960#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
2960(config)#hostname Switch
Switch(config)#no enable password 
Switch(config)#line console 0
Switch(config-line)#no password
Switch(config-line)#end
Switch#write

*Mar  1 00:06:18.619: %SYS-5-CONFIG_I: Configured from console by console
Building configuration...
[OK]

Switch#reload
Proceed with reload? [confirm]

*Mar  1 00:06:33.693: %SYS-5-RELOAD: Reload requested by console. Reload reason: Reload command
Using driver version 1 for media type 1
Base ethernet MAC Address: 04:0b:0d:0b:08:00
Xmodem file system is available.
The password-recovery mechanism is enabled.
Initializing Flash...
mifs[2]: 10 files, 1 directories
mifs[2]: Total bytes     :    1806336
mifs[2]: Bytes used      :     612352
mifs[2]: Bytes available :    1193984
mifs[2]: mifs fsck took 2 seconds.
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes     :    3870720
mifs[3]: Bytes used      :       1024
mifs[3]: Bytes available :    3869696
mifs[3]: mifs fsck took 1 seconds.
mifs[4]: 5 files, 1 directories
mifs[4]: Total bytes     :     258048
mifs[4]: Bytes used      :       9216
mifs[4]: Bytes available :     248832
mifs[4]: mifs fsck took 0 seconds.
mifs[5]: 5 files, 1 directories
mifs[5]: Total bytes     :     258048
mifs[5]: Bytes used      :       9216
mifs[5]: Bytes available :     248832
mifs[5]: mifs fsck took 1 seconds.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值