重啟Switch。 立即按住“Mode”按鈕。 按住按鈕約12秒鍾,狀態LED將變為琥珀色。 在console輸入界面上,您應該位於引導加載程序(BootLoader)中。
Switch:
添加以下變量:
Switch: SWITCH_IGNORE_STARTUP_CFG=1
Switch: SWITCH_DISABLE_PASSWORD_RECOVERY=0
然后啟動交換機:
Switch: boot
一旦交換機啟動成功,我們可以進入#模式,然后恢復running配置:
Switch# copy start runn
接來下恢復密碼,然后刪除在BootLoader中設置的變量:
Switch# no system ignore startupconfig switch all
Switch# system disable password recovery switch all
Switch# copy runn start
例如設置本地的賬戶密碼並保存:
Switch#conf t Switch(config)#username xxx pri 15 secret xxx Switch(config)#no system ignore startupconfig switch all Switch(config)#exit Switch#wr Building configuration...
[OK]
Switch#
如下修改AAA的示例:
Switch(config)# aaa new-model Switch(config)# aaa authentication login default local Switch(config)# username admin privilege 15 secret StAnLeYcUp Switch(config)# line vty 0 4 Switch(config-line)# login authentication default
Refer to:
https://www.mathewjbray.com/cisco/cisco-ios-xe-password-recovery-on-catalyst-3850/