在工作现场经常会遇到某个交换机console口有密码,但客户又记不得密码的情况,这时就需要把密码重置来重新配置密码。
根据现场有没有配置ssh或telnet远程管理交换机的情况,可分两种处理方法:
方法一:
当有ssh或telnet用户能远程连接上交换机设备,并且该用户有修改console密码的权限。可以通过ssh或telnet用户直接修改console密码。
[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode aaa
[Huawei-ui-console0]qu
[Huawei]aaa
[Huawei-aaa]local-user xiaoming password simple xiaoming@123
[Huawei-aaa]local-user xiaoming service-type terminal
[Huawei-aaa]return
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Jan 31 2023 12:05:45-08:00 Huawei %CFM/4/SAVE(l)[50]:The user chose Y when de
ciding whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<Huawei>
方式二:
当没有ssh或telnet用户能远程连接上交换机设备,或者该用户的密码也一起忘记了的情况下。需要通过重启设备进入后台进行密码清除和修改(生产环境下需要确保不影响业务的情况下再操作)。
操作方法:
1,首先用console线连接交换机console口和电脑,打开CRT或Xshell终端软件,然后重启交换机,等待重启,终端软件上面会显示很多启动信息,不会理会
2,当出现Press Ctrl B or Ctrl E to enter BootROM/BootLoad menu :3,快速按下键盘组合键CTRL B
3,然后会出现如下界面,提示输入密码
注:一般password这个密码是不会被设置的,默认是空口令,直接回车即可;如果提示错误,可尝试输入原默认密码(如Admin@huawei.com,具体可参考交换机默认密码),一般都可进入。
4,然后跳转到如下界面,在BootROM/BootLoad主菜单下选择“Clear password for console user”,此处输入“7”然后回车,清除Console口登录密码,然后按提示输入“y”确认。
5,待出现下图内容后,选择“ Boot with default mode”,此处输入“1”回车。
注:此处不要选择“Reboot”选项,否则此次清除密码将失效。
6,稍等片刻,待设备重启完成后,此时通过Console口登录时不需要认证,登录交换机后,可以根据需要修改Console用户界面的认证方式及密码(可参考方法一中的相关配置)。