思科交換機密碼清除方法記錄

注:這篇博客沒有什麼新內容,類似的網上有很多,只是對自己的實驗記錄。


  我們使用cisco交換機的時候,或多或少的會遇到要清除交換機配置的情況,一般如果我們可以進入特權模式(#),可以直接刪除配置,如果設置了enable密碼,而且我們不知道enable密碼的情況下,我們就需要藉助手動進入“Switch:”模式進行清除配置信息(包括enable密碼)。

    打開交換機電源,按住Mode鍵一段時間過後,屏幕中顯示下面的文字:

    

    The system has been interrupted, or encountered an error

    during initializion of the flash filesystem.  The following

    commands will initialize the flash filesystem, and finish

    loading the operating system software:


    :系統被打斷,或在初始化flash文件系統進程中遇到了一個錯誤。……

所以進入Switch:模式的方法,開機按住mode鍵10秒左右,打斷交換機的啓動進程,然後進入“Switch:”模式

wKiom1dOnDbi8kXLAACcX43Erhk351.png-wh_50


(1)特權模式清除配置的方法(#)


Switch#dir flash:

Directory of flash:/


  322  -rwx         676   Mar 1 1993 00:54:11 +00:00  vlan.dat

    2  -rwx        1921   Mar 1 1993 00:01:05 +00:00  private-config.text

    3  -rwx        2072   Mar 1 1993 00:01:05 +00:00  multiple-fs

    4  drwx         512   Mar 1 1993 00:08:32 +00:00  c2918-lanlitek9-mz.122-50.SE5


27998208 bytes total (19012096 bytes free)

Switch#delete flash:private-config.text

Delete filename [private-config.text]? 回車

Delete flash:private-config.text? [confirm] 回車

Switch#delete flash:vlan.dat

Delete filename [vlan.dat]? 回車

Delete flash:vlan.dat? [confirm] 回車

Switch#dir

Directory of flash:/


    3  -rwx        2072   Mar 1 1993 00:01:05 +00:00  multiple-fs

    4  drwx         512   Mar 1 1993 00:08:32 +00:00  c2918-lanlitek9-mz.122-50.SE5


27998208 bytes total (19016192 bytes free)

Switch#reload

Proceed with reload? [confirm]回車


*Mar  1 00:59:36.977: %SYS-5-RELOAD: Reload requested by console. Reload reason: Reload command


(2)Switch:模式清除配置(包括enable密碼)


switch:  flash_init

Initializing Flash...

mifs[3]: 316 files, 7 directories

mifs[3]: Total bytes     :   27998208

mifs[3]: Bytes used      :    8986624

mifs[3]: Bytes available :   19011584

mifs[3]: mifs fsck took 6 seconds.

...done Initializing Flash.


switch: dir flash:

Directory of flash:/


    2  -rwx  736       <date>               vlan.dat

    3  -rwx  1048      <date>               multiple-fs

    4  -rwx  2073      <date>               config.text

    5  -rwx  5         <date>               private-config.text

    6  drwx  512       <date>               c2918-lanlitek9-mz.122-50.SE5


19011584 bytes available (8986624 bytes used)


switch: delete flash:vlan.dat   

Are you sure you want to delete "flash:vdat" (y/n)?y

File "flash:vdat" not deleted -- no such file or directory


switch: delete flash:vlan.dat 

Are you sure you want to delete "flash:vlan.dat" (y/n)?y

File "flash:vlan.dat" deleted


switch: dir flash:

Directory of flash:/


    3  -rwx  1048      <date>               multiple-fs

    4  -rwx  2073      <date>               config.text

    5  -rwx  5         <date>               private-config.text

    6  drwx  512       <date>               c2918-lanlitek9-mz.122-50.SE5


19013120 bytes available (8985088 bytes used)


switch: delete flash:private-config.text

Are you sure you want to delete "flash:private-config.text" (y/n)?y

File "flash:private-config.text" deleted

switch: boot

Loading "flash:/c2918-lanlitek9-mz.122-50.SE5/c2918-lanlitek9-mz.122-50.SE5.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@





(3)正常交換機啓動流程如下:

    (使用XXXXXXXXXXX替換掉了一些敏感信息)


Using driver version 1 for media type 1

Base ethernet MAC Address: 5c:fc:66:55:3a:00

Xmodem file system is available.

The password-recovery mechanism is enabled.

Initializing Flash...

mifs[2]: 0 files, 1 directories

mifs[2]: Total bytes     :    3870720

mifs[2]: Bytes used      :       1024

mifs[2]: Bytes available :    3869696

mifs[2]: mifs fsck took 1 seconds.

mifs[3]: 316 files, 7 directories

mifs[3]: Total bytes     :   27998208

mifs[3]: Bytes used      :    8990720

mifs[3]: Bytes available :   19007488

mifs[3]: mifs fsck took 5 seconds.

...done Initializing Flash.

done.

Loading "flash:/c2918-lanlitek9-mz.122-50.SE5/c2918-lanlitek9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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

File "flash:/c2918-lanlitek9-mz.122-50.SE5/c2918-lanlitek9-mz.122-50.SE5.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, C2918 Software (C2918-LANLITEK9-M), Version 12.2(50)SE5, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Tue 28-Sep-10 17:15 by prod_rel_team

Image text-base: 0x00003000, data-base: 0x01200000


Initializing flashfs...

Using driver version 1 for media type 1

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 0 seconds.

mifs[3]: Initialization complete.


mifs[4]: 316 files, 7 directories

mifs[4]: Total bytes     : 27998208  

mifs[4]: Bytes used      : 8990720   

mifs[4]: Bytes available : 19007488  

mifs[4]: mifs fsck took 0 seconds.

mifs[4]: Initialization complete.


...done Initializing flashfs.


POST: CPU MIC register Tests : Begin

POST: CPU MIC register Tests : End, Status Passed


POST: PortASIC Memory Tests : Begin

POST: PortASIC Memory Tests : End, Status Passed


POST: CPU MIC interface Loopback Tests : Begin

POST: CPU MIC interface Loopback Tests : End, Status Passed


POST: PortASIC RingLoopback Tests : Begin

POST: PortASIC RingLoopback Tests : End, Status Passed


POST: PortASIC CAM Subsystem Tests : Begin

POST: PortASIC CAM Subsystem Tests : End, Status Passed


POST: PortASIC Port Loopback Tests : Begin

POST: PortASIC Port Loopback Tests : End, Status Passed


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

[email protected].


cisco WS-C2918-48TC-C (PowerPC405) processor (revision J0) with 65536K bytes of memory.

Processor board ID XXXXXXXXXXX

Last reset from power-on

1 Virtual Ethernet interface

48 FastEthernet interfaces

2 Gigabit Ethernet interfaces

The password-recovery mechanism is enabled.


64K bytes of flash-simulated non-volatile configuration memory.

Base ethernet MAC Address       : XXXXXXXXXXX

Motherboard assembly number     : XXXXXXXXXXX

Power supply part number        : XXXXXXXXXXX

Motherboard serial number       : XXXXXXXXXXX

Power supply serial number      : XXXXXXXXXXX

Model revision number           : J0

Motherboard revision number     : A0

Model number                    : WS-C2918-48TC-C

System serial number            : XXXXXXXXXXX

Top Assembly Part Number        : XXXXXXXXXXX

Top Assembly Revision Number    : B0

Version ID                      : V06

CLEI Code Number                : XXXXXXXXXXX

Hardware Board Revision Number  : 0x0B



Switch Ports Model              SW Version            SW Image                 

------ ----- -----              ----------            ----------               

*    1 50    WS-C2918-48TC-C    12.2(50)SE5           C2918-LANLITEK9-M        





         --- 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 configuration dialog? [yes/no]: 

% Please answer 'yes' or 'no'.

Would you like to enter the initial configuration dialog? [yes/no]: 

% Please answer 'yes' or 'no'.

Would you like to enter the initial configuration dialog? [yes/no]: 

*Mar  1 00:00:39.367: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down

*Mar  1 00:00:40.500: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan

*Mar  1 00:01:01.631: %SYS-5-RESTART: System restarted --

Cisco IOS Software, C2918 Software (C2918-LANLITEK9-M), Version 12.2(50)SE5, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Tue 28-Sep-10 17:15 by prod_rel_team

% Please answer 'yes' or 'no'.

Would you like to enter the initial configuration dialog? [yes/no]: no


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章