忘记Console口密码的解决方法

电子说

1.2w人已加入

描述

01方法一

方法一:通过STelnet/Telnet登录设备修改Console口密码。

使用Telnet协议存在安全风险,建议用户使用STelnet V2登录设备。

如果用户可以通过STelnet/Telnet登录设备,并且具有3级或更高的权限,则可以通过STelnet/Telnet登录到设备后修改Console口密码,然后保存配置。

01 使用STelnet/Telnet账号登录设备,并确认当前账号有3级或更高的权限使用display users命令查看当前设备所有登录用户。其中带“*”标记的为当前用户的用户界面,对应编号为VTY1。

 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   0053  TEL    10.135.18.67      pass      yes      Unspecified

*  35  VTY 1  0000  TEL    10.135.18.91      pass      yes      Unspecified

使用display user-interface命令可以显示所有用户的权限,确定VTY1对应的等级为15,有权限修改Console口密码。

 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     -   
......

02 修改Console口密码,以修改为密码认证为例

 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

命令

03 为了防止重启后配置丢失,选择保存配置

 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.

  02 方法二

方法二:通过BIOS菜单设置新的Console口密码

设备的BIOS提供了清空Console口登录密码的功能,用户可以在设备启动后修改Console口登录密码,然后保存配置。

(1)进入到BIOS菜单需要重启设备(可以通过将设备先下电再上电的方式进行重启),会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。设备启动过程中不要对设备进行下电操作。

(2)对于CE12800系列交换机,如果设备是双主控,则需要在执行以下操作前将备用主控板拔下,待执行完以下操作后,再插上备用主控板,执行save命令以保证主用主控板和备用主控板配置一致。

(3)根据以下步骤完成设备启动后,仅本次通过Console口登录时不需要输入密码,原来的Console口登录密码仍然保存在配置文件中。登录后请及时设置新的登录密码,否则下次通过Console口登录时还是需要输入原来的密码。

01 通过Console口连接设备,并重启设备

当界面出现以下信息时,请3秒内按下快捷键“Ctrl+B”并输入BIOS密码,进入BIOS主菜单。

Press CTRL+B to enter BIOS menu or CTRL+E to boot DFX:  1

Password:   //输入BIOS密码。

命令

02 根据设备的提示,在BIOS主菜单下选择“Modify console password”,出现以下界面信息,选择y后,设备将会继续启动

Caution: A new console password must be set after the restart.


Continue now? Yes(y) or No(n):y

03 设备完成系统启动后,本次通过Console口登录时不需要认证,登录后需要及时修改Console口密码,以修改为密码认证为例

 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

04 为了防止重启后配置丢失,选择保存配置

 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.

  03 方法三

方法三:通过BootLoader菜单修改Console口密码

设备的BootLoader提供了清空Console口登录密码的功能,用户可以在设备启动后修改Console口登录密码,然后保存配置。

(1)要进入到BootLoader菜单需要重启设备(可以通过将设备先下电再上电的方式进行重启),会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。设备启动过程中不要对设备进行下电操作。

(2)对于12800E&16800系列交换机,如果设备是双主控,则需要在执行以下操作前将备用主控板拔下,待执行完以下操作后,再插上备用主控板,执行save命令以保证主用主控板和备用主控板配置一致。

命令

(3)根据以下步骤完成设备启动后,仅本次通过Console口登录时不需要输入密码,原来的Console口登录密码仍然保存在配置文件中。登录后请及时设置新的登录密码,否则下次通过Console口登录时还是需要输入原来的密码。

01 通过Console口连接设备,并重启设备

当界面出现以下信息时,请3秒内按下快捷键“Ctrl+B”并输入BootLoader密码,进入BootLoader主菜单。

Press CTRL+B to enter BOOT menu or CTRL+E to boot DFX: 1

Password:   //输入BootLoader密码。

02 根据设备的提示,在BootLoader主菜单下选择第6项,再选择“Modify console password”,出现以下界面信息,选择y后,设备将会继续启动

Caution: A new console password must be set after the restart.
Continue now? Yes(y) or No(n):y

03 设备完成系统启动后,本次通过Console口登录时不需要认证,登录后需要及时修改Console口密码,以修改为密码认证为例

 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

04 为了防止重启后配置丢失,选择保存配置

 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。

  审核编辑:汤梓红

 

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分