遺失 Cisco 路由器 Enable Secret/Password 時,標準恢復流程為:Console 中斷啟動 → Rommon 修改配置寄存器略過啟動配置 → 複製 Startup-config 到 Running-config → 修改密碼 → 恢復寄存器 → 存檔重啟。本文提供 1841/2800/3800 等主流機種通用的 10 步驟 SOP。
rommon>。confreg 0x2142(或 o/r 0x2142),使下次啟動忽略 NVRAM 啟動配置。reset 或 i 重啟,進入 Setup 對話全選 no,按 Enter 至 Router>。enable(無密碼直接進入 Router#)。copy startup-config running-config(關鍵步驟,將原密碼配置載入記憶體)。configure terminal
no enable secret ! 移除舊密文
enable secret 新密碼 ! 設定新 MD5 密文
! 或 enable password 新密碼(不建議,明文)
disable → enable 輸入新密碼確認可進入 # 模式。config-register 0x2102(恢復正常啟動流程)。show version 確認最後一行 Configuration register is 0x2102。write memory / copy running-config startup-config → reload 完成。| 現象 | 可能原因 | 對策 |
|---|---|---|
| Break 鍵無反應 | 終端軟體未送 Break、寄存器 Bit 8=1 (Break disabled) | 換 SecureCRT/PuTTY 送 Special Command → Break;或拔電池清 CMOS(極少數舊機種) |
| 進入 rommon 後無法 confreg | 輸入錯誤(字母 o vs 數字 0)、舊版 rommon 不支援 | 改用 o/r 0x2142;查 ? 看支援指令 |
| 修改密碼後重啟失效 | 未執行 config-register 0x2102 或未 write memory | 嚴格遵循步驟 8、10 |
| 無法進入 rommon | 按鍵時機太早/太晚 | 通電後 10~60 秒內持續送 Break,見 rommon> 即停止 |
service password-encryption、aaa new-model、login block-for 防暴力破解。