【技术分享】恢复Console口密码
发布作者:微思网络 发布时间:2022-08-04 浏览量:0次
设备提供如下方法可以恢复Console口密码
方法一:通过Telnet登录设备修改Console口密码。
方法二:在BootROM下配置跳过Console口密码启动后,修改Console口密码。
设备提供如下方法可以恢复Console口密码
如果用户拥有Telnet账号,并且具有3级或更高的权限,则可以通过Telnet登录到设备后修改Console口密码,然后保存配置。
1、使用Telnet账号登录设备,并确认当前账号有3级或更高的权限。
使用display users命令查看当前设备所有登录用户。其中带“+”标记行为当前用户,记录对应的编号VTY1。
<Huawei> display users
User-Intf Delay Type Network Address AuthenStatus AuthorcmdFlag
129 VTY 0 00:23:36 TEL 10.135.18.67 pass
Username : Unspecified
+ 130 VTY 1 01:20:36 TEL 10.135.18.91 pass
Username : Unspecified
131 VTY 2 00:00:00 TEL 10.135.18.54 pass
Username : Unspecifie
使用display user-interface命令可以显示所有用户的权限,确定VTY1对应的等级为15,有权限修改Console口密码。
<Huawei> display user-interface
Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int
0 CON 0 9600 - 15 - P -
+ 129 VTY 0 - 15 15 P -
+ 130 VTY 1 - 15 15 P -
+ 131 VTY 2 - 15 - P -
132 VTY 3 - 15 15 P -
......
2、修改Console用户的密码,以修改为密码认证,密码为“huawei@123”为例。
# V200R003C01以及更低版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipher huawei@123
[Huawei-ui-console0] retur
# V200R005C00以及更高版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipher
Enter Password(<8-128>):
[Huawei-ui-console0] retur
3、为了防止重启后配置丢失,选择保存配置。
在BootROM下配置跳过Console口密码启动后,修改Console口密码
设备的BootROM提供了配置跳过Console口密码启动的功能,可以在用户使用Console口登录的时候跳过密码检查。这样系统启动后除了不需要输入Console密码外,与正常启动相同,也会完成所有配置加载。设备启动后修改Console口密码,然后保存配置。
1.用串口线连接并重启设备,出现“Press Ctrl+B to break auto startup ...”打印信息时,按下“Ctrl+B”并键入密码后进入BootROM主菜单。
2.配置跳过Console口密码登录。
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
Enter your choice(1-7):7
PassWord Menu
1. Modify the menu password
2. Clear the console login password
0. Return
Enter your choice(0-2):2
Clear the console login password Succeed!
PassWord Menu
1. Modify the menu password
2. Clear the console login password
0. Return
Enter your choice(0-2):0
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
Enter your choice(1-7):
3.完成系统启动后,通过Console口登录时不需要认证,登录后修改Console口密码,以修改为密码认证,密码为“huawei@123”为例。
# V200R003C01以及更低版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipher huawei@123
[Huawei-ui-console0] retur
# V200R005C00以及更高版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipher
Enter Password(<8-128>):
[Huawei-ui-console0] retur
4.为了防止重启后配置丢失,保存配置。
<Huawei> save
Warning: The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activate
1