1. 程式人生 > >ASA密碼恢復流程

ASA密碼恢復流程

1、建立console連線
2、重啟啟動安全裝置
3、進入ROMMMON模式
出現Use BREAK or ESC to interrupt boot字樣時,按下ESC鍵進入ROMMON模式。
4、設定ROMMON配置暫存器
Rommon #0>confreg
Do you want to change this configuration? y/n[n]:y
在disable system configuration?處選擇“y"
Disable system configuration?y/n[n]:y
5、啟動安全裝置
Rommon #1>boot
6、訪問特權模式
Ciscoasa>
Ciscoasa>enable
Password:<cr>
Ciscoasa#
7、載入儲存的配置檔案
Copy startup-config running-config
8、重新設定密碼
ASA#config ter
ASA(config)#passwd Ci$co123
ASA(config)#enable password Ci$co123
如果裝置使用的是本地的使用者認證,那麼使用者密碼也可以進行修改:
ASA(config)#username cisco password Ci$co123
9、恢復配置暫存器
ASA(config)#config-register 0x1
10、將當前配置儲存近NVRAM
ASA(config)#copy running-config startup-config 或 write memory

禁用密碼恢復流程:如果配置了這一條命令,會彈出告警資訊,告知管理員,恢復密碼的唯一方式就是清除flash中的所有檔案。然後再從外部伺服器(如TFTP)中下載新的映象和配置檔案。


ASA(config)#no service password-recovery

在禁用密碼恢復流程的情況下恢復密碼:
1、建立一條console連線
2、重啟裝置
3、進入ROMMON模式
4、從flash中清除系統檔案
Erase all file systems?y/n[n]:y
Permanently erase Disk0:and Disk1:?y/n[n]:y
Erase Disk0:
……………………………………………
!Output omitted for brevity
Disk1:is not present
Enabling password recovery…
Rommon #0>
5、載入一個系統映象檔案
Rommon #0>address=172.18.82.75
Rommon #1>server=172.18.82.10
Rommon #3>interface gigabitEthernet0/1
GigabitEthernet0/1
MAC Address:000f.f775.4b54
Rommon #4>file asa914-smp-k8.bin
Rommon #5>tftpdnld
Tftp
[email protected]

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
裝置將系統檔案下載到記憶體中並重啟裝置,但是,下載的映象檔案並不會被存在flash中。
6、載入配置檔案
Ciscoasa>enable
Password:<cr>
Ciscoasa#config ter
Cicsoasa(config)#inter management0/0
Ciscoasa(config-if)#ip add 172.18.82.75 255.255.255.0
Ciscoasa(config-if)#nameif management
INFO:Security level for "management" set to 0 by default
Ciscoasa(config-if)#security-level 100
Ciscoasa(config-if)#no shu
Ciscoasa(config)#copy tftp:running-config
Address or name of remote host[]?172.18.82.10
Source filename[]?asa.conf
Destination filename[running-config]?
Accessing tftp://172.18.82.10/asa.conf…!!
Cryptochecksum(unchanged):1c9855a1 2cca93c7 a9691450 9bab6e92
1246 bytes copied in 0.90 secs
Ciscoasa#
7、重設密碼
Ciscoasa#config t
Ciscoasa(config)#passwd Ci$co123
Ciscoasa(config)#enable password Ci$co123
如果是本地使用者認證,也可以修改本地使用者密碼
Ciscoasa(config)#username cisco password Ci$co123
8、將當前配置儲存到NVRAM
Ciscoasa(config)#copy running-config startup-config
9、將ASA映象檔案載入flash。可以參考ASA CLI升級映象的操作。