關於思科C2950交換機清除密碼,恢復初始配置的方法


上個月河南做項目,因需要大批量的對服務器進行操作系統的安裝,於是想到了PXE網絡批量安裝,

好不容易到機房的倉庫找到網線及一台思科交換機,但到安裝的時候,發現思科交換機里應該有配置了

通過配置線連接交換機,又發現又設置了enable密碼,於是筆者只能想到恢復初始配置,遂將實現過程整理如下:

 

1、按住前面板的mode鍵不放,插上電源,等3-5秒后松開mode鍵,我們將會看到如下提示:

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
    load_helper
    boot

switch: 

2、到這里我們輸入flash_init命令,開始初始化flash,完了后,我們再輸入ren flash:config.text flash:config.old

     命令對已存豐的config.text重新命名成config.old,不刪除、方便以后還可以恢復,最后我們在使用boot命令進行啟動

switch: flash_init
Initializing Flash...
flashfs[0]: 18 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 3966464
flashfs[0]: Bytes available: 3774976
flashfs[0]: flashfs fsck took 6 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
switch: dir

List of filesystems currently registered:

               flash[0]: (read-write)
              xmodem[1]: (read-only)
                null[2]: (read-write)
                  bs[3]: (read-only)

switch: 

3、這樣我們等啟動好了,再次使用enable命令進入特權模式就沒有密碼了,還可以使用dir命令查看到我們重命名的文件,如下所示:

Switch>en
Switch#dir
Directory of flash:/

    2  -rwx     2664051   Mar 01 1993 00:03:22  c2950-i6q4l2-mz.121-11.EA1.bin
    4  -rwx        1216   Apr 15 1994 21:28:58  vlan.dat
    5  -rwx        4413   Jan 31 1994 21:45:53  config.old
    6  -rwx           5   Jan 31 1994 21:45:53  private-config.text
    7  drwx         704   Mar 01 1993 00:04:00  html
   19  -rwx         109   Mar 01 1993 00:04:01  info
   20  -rwx         109   Mar 01 1993 00:04:01  info.ver
   21  -rwx         269   Jan 01 1970 00:01:46  env_vars

7741440 bytes total (3774976 bytes free)
Switch#

 

尊重別人的勞動成果 轉載請務必注明出處:http://www.cnblogs.com/5201351/p/5028575.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM