CloudEngine系列交换机如何恢复Console口密码
通过Console口登录设备,是管理设备常用的一种方式。为了安全起见,通常会设置通过Console口登录设备的密码。本文档主要介绍忘记Console口密码时,如何恢复Console口密码即重置Console口密码。
可以通过以下三种中任意一种方式重置Console口密码:
方法一:通过STelnet/Telnet登录设备重置Console口密码。
方法二:通过BootLoader菜单重置Console口密码。
方法三:通过BIOS菜单重置Console口密码。
- 请优先使用方法一,方法二/三需要重启设备,会导致业务中断,如果STelnet/Telnet密码也忘记了再使用方法二/三。
- 方法二/三支持的设备不同,仅CE5880EI、CE6857EI、CE6860EI、CE6865EI、CE6865SI、CE6880EI、CE6881、CE5881、CE6881K、CE6820、CE6863、CE6863K、CE6881E、CE8850EI、CE6870-48T6CQ-EI、CE6875EI、CE8861EI、CE9860EI、CE8868EI、CE12800E、CE16800系列交换机支持BootLoader菜单。其余设备请选择方法三。
通过STelnet/Telnet登录设备重置Console口密码
如果用户可以通过STelnet/Telnet登录设备,并且具有管理级别(3级或15级)的权限,则可以通过STelnet/Telnet登录到设备后用命令行重新设置Console口密码。
使用STelnet/Telnet账号登录设备。
使用display users命令查看当前设备所有登录用户。其中带“*”标记的为当前用户的用户界面,对应编号为VTY1。
<HUAWEI> display users NOTE: User-Intf: The absolute number and the relative number of user interface Authen: Whether the authentication passes Author: Command line authorization flag -------------------------------------------------------------------------------- User-Intf Delay Type Network Address Authen Author Username -------------------------------------------------------------------------------- 34 VTY 0 00:06:53 TEL 10.135.18.67 pass yes Unspecified * 35 VTY 1 00:00:00 TEL 10.135.18.91 pass yes Unspecified
使用display user-interface命令可以显示所有用户的权限,其中ActualPrivi表示用户的实际权限。若当前用户的等级为3或15,有权限设置Console口密码。
<HUAWEI> display user-interface Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int 0 CON 0 9600 - 15 - P - + 34 VTY 0 - 15 15 P - + 35 VTY 1 - 15 15 P - ......
重新设置Console口密码。
- 以设置为密码认证方式为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode password [*HUAWEI-ui-console0] set authentication password Please configure the login password (8-16) Enter Password: //输入新密码 Confirm Password: //再次输入新密码进行确认 [*HUAWEI-ui-console0] user privilege level 3 [*HUAWEI-ui-console0] commit [~HUAWEI-ui-console0] return
- 以设置为AAA认证方式,用户名为admin123,密码为Huawei@!123为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode aaa [*HUAWEI-ui-console0] quit [*HUAWEI] aaa [*HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@!123 Info: A new user is added. [*HUAWEI-aaa] local-user admin123 service-type terminal [*HUAWEI-aaa] local-user admin123 level 3 [*HUAWEI-aaa] commit [~HUAWEI-aaa] return
- 以设置为密码认证方式为例。
为了防止重启后配置丢失,请保存配置。
<HUAWEI> save Warning: The current configuration will be written to the device. Continue? [Y/N]:y Now saving the current configuration to the slot 1 Info: Save the configuration successfully.
通过BootLoader菜单重置Console口密码
设备的BootLoader菜单提供了清空Console口登录密码的功能。清空Console口登录密码后,用户可以在设备启动后,用命令行重新设置Console口登录密码。
要进入到BootLoader菜单需要重启设备(可以通过将设备先下电再上电的方式进行重启),会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。设备启动过程中不要对设备进行下电操作。
对于CE12800E、CE16800系列交换机,如果设备是双主控,则需要先将备用主控板拔下,待执行完以下操作后,再插上备用主控板,执行save命令以保证主用主控板和备用主控板配置一致。
根据以下步骤完成设备启动后,仅本次通过Console口登录时不需要输入密码,原来的Console口登录密码仍然保存在配置文件中。登录后请及时设置新的登录密码,否则下次通过Console口登录时还是需要输入原来的密码。
- 通过Console口连接设备。如图1-1所示,以CE16800系列产品举例,设备与用户侧主机PC相连。
重启设备,在设备出现以下提示信息时,请3秒内按下快捷键Ctrl+B,进入Bootloader主菜单。
Press CTRL+R to enter the Recovery mode and restore factory configurations. Press CTRL+B to enter BOOT menu or CTRL+E to boot DFX: 3
- 在BootLoader主菜单,输入BootLoader密码。
- 选择“Password manager submenu”,进入密码管理子菜单。
- 选择"Clear the console login password",进入清空Console口登录密码子菜单。出现以下界面信息,选择y后,设备将会继续启动。
Caution: A new console password must be set after the restart. Continue now? Yes(y) or No(n): y Password: //输入BootLoader密码,如果BootLoader密码为空则无需输入
- 设备系统启动完成后,本次通过Console口登录时不需要输入密码,登录后需要及时设置Console口密码。
- 以设置为密码认证为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode password [*HUAWEI-ui-console0] set authentication password Please configure the login password (8-16) Enter Password: //输入新密码 Confirm Password: //再次输入新密码进行确认 [*HUAWEI-ui-console0] user privilege level 3 [*HUAWEI-ui-console0] commit [~HUAWEI-ui-console0] return
- 以设置为AAA认证方式,用户名为admin123,密码为Huawei@!123为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode aaa [*HUAWEI-ui-console0] quit [*HUAWEI] aaa [*HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@!123 Info: A new user is added. [*HUAWEI-aaa] local-user admin123 service-type terminal [*HUAWEI-aaa] local-user admin123 level 3 [*HUAWEI-aaa] commit [~HUAWEI-aaa] return
- 以设置为密码认证为例。
- 为了防止重启后配置丢失,保存配置。
<HUAWEI> save Warning: The current configuration will be written to the device. Continue? [Y/N]:y Now saving the current configuration to the slot 1 Info: Save the configuration successfully.
通过BIOS菜单重置Console口密码
设备的BIOS菜单提供了清空Console口登录密码的功能。清空Console口登录密码后,用户可以在设备启动后用命令行重新设置Console口登录密码。
要进入到BIOS菜单需要重启设备(可以通过将设备先下电再上电的方式进行重启),会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。设备启动过程中不要对设备进行下电操作。
对于CE12800系列交换机,如果设备是双主控,则需要先将备用主控板拔下,待执行完以下操作后,再插上备用主控板,执行save命令以保证主用主控板和备用主控板配置一致。
根据以下步骤完成设备启动后,仅本次通过Console口登录时不需要输入密码,原来的Console口登录密码仍然保存在配置文件中。登录后请及时设置新的登录密码,否则下次通过Console口登录时还是需要输入原来的密码。
通过Console口连接设备,如图1-2所示,以CE12800系列产品举例,设备与用户侧主机PC相连。
重启设备,当界面出现以下信息时,请3秒内按下快捷键“Ctrl+B”并输入BIOS密码,进入BIOS主菜单。
Press CTRL+B to enter BIOS menu or CTRL+E to boot DFX: 1
- 在BIOS主菜单中,输入BIOS密码。
根据设备的提示,在BIOS主菜单下选择“Modify console password”,出现以下界面信息,选择y后,设备将会继续启动。
Caution: A new console password must be set after the restart. Continue now? Yes(y) or No(n):y
设备系统启动完成后,本次通过Console口登录时不需要输入密码,登录后需要及时设置Console口密码。
- 以设置为密码认证方式为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode password [*HUAWEI-ui-console0] set authentication password Please configure the login password (8-16) Enter Password: //输入新密码 Confirm Password: //再次输入新密码进行确认 [*HUAWEI-ui-console0] user privilege level 3 [*HUAWEI-ui-console0] commit [~HUAWEI-ui-console0] return
- 以设置为AAA认证方式,用户名为admin123,密码为Huawei@!123为例。
<HUAWEI> system-view [~HUAWEI] user-interface console 0 [~HUAWEI-ui-console0] authentication-mode aaa [*HUAWEI-ui-console0] quit [*HUAWEI] aaa [*HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@!123 Info: A new user is added. [*HUAWEI-aaa] local-user admin123 service-type terminal [*HUAWEI-aaa] local-user admin123 level 3 [*HUAWEI-aaa] commit [~HUAWEI-aaa] return
- 以设置为密码认证方式为例。
- 为了防止重启后配置丢失,保存配置。
<HUAWEI> save Warning: The current configuration will be written to the device. Continue? [Y/N]:y Now saving the current configuration to the slot 1 Info: Save the configuration successfully.