思科交換機強制恢復出廠設定(清密碼)
阿新 • • 發佈:2019-01-03
1)拔下交換機電源,用手按住交換機“Mode” 按鈕,插上電源,等待交換機進入控制檯模式。其提示符為“switch:”
2)switch: flash_init //初始化flash檔案系統
3)switch: dir flash: //命令顯示flash中所儲存的配置檔案的名稱。
4)switch: rename flash:config.text flash:config.old //命令把原來的配置檔案改名為config.old。(NVRAM是從flash虛擬的,flash:config.text =startup-config)
5)switch: reset //命令把原來的配置檔案改名為config.old。重新啟動交換機,這時交換機找不到其配置檔案(所以配置檔案中的特權密碼也就無效),系統就會提示是否進入“配置對話(configuration dialog)” ,選擇“N” 。
6)switch># enable //進入特權執行模式。
7)switch# rename flash:config.old flash:config.text //把配置檔名字修改回來
8)switch#copy flash:config.text running-config //把配置檔案從FLASH中裝載到RAM中。
9)Switch# config terminal //進入全域性配置模式
10)Switch(config)# no enable password //刪除使能密碼
11)Switch(config)# no enable secret //刪除加密的密碼
12)Switch(config)# end //直接返回到特權模式
13)Switch# show runnig-config //檢視正在進行的配置檔案,請注意檢視密碼
14)Switch# copy running-config startup-config //備份配置檔案到NVRAM