2010年7月3日

重設Cisco Router與Switch的密碼

適用於Cisco Router 1700/2600/3600 系列
1、重新打開Router的電源,並按Crtl+Break,進入ROM監視模式
2、更改組態暫存器
rommon 1 > confreg 0x2142
其中0x2142代表跳過啟動組態檔(startup-config)
一般正常的設定為0x2102
3、重新開機
rommon 2 > reset
4、進入自動裝配模式後,選no
Would you like to enter the initial configuration dialog?[yes/no] no
5、進入enable特權模式
Router > enable
Router#
6、切換到設定配置模式
Router# config t
7、修改密碼
Router(config)# enable secret XXX(密碼)
8、還原組態暫存器值
Router(config) # config-register 0x2102
9、離開配置模式
Router(config) # exit
10、儲存設定檔
Router # copy running-config startup-config
(將RAM中的設定,儲存到NVRAM中的啟動組態檔,這樣之後才能用新密碼登入)
11、重新啟動
Router # reload

Cisco Switch 2900系列
1、重新啟動Switch的電源,接著再長按mode button的鍵
2、switch : flash_init
3、在flash的目錄下顯示所有檔案
switch : dir flash :
4、更改config.text的名稱
switch : rename flash:config.text flash:config.pre
5、重新啟動
switch : boot
6、進入自動裝配模式後,選no
Continue with configuration dialog?[yes/no] no
7、進到enalbe特權模式
Switch > en
Switch #
8、再把config.old的檔名改回來
Switch # rename flash:config.pre flash:config.text
9、切到設定配置模式
Switch # config t
Switch(config) #
10、更改新密碼
Switch(config)# enable secret XXX(密碼)
11、回到特權模式
Switch(config)# end
12、儲存新的設定參數後,再重啟Switch即可
Switch # write memory(或是 copy running-config startup-config)

0 回應:

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.