- A+
【问题描述】
最近一次登录华为 USG6530
防火墙时,密码错误,所有密码均不行,无奈只能重置密码,根据华为的技术文档,现将过程整理如下,便于参考。
【参考信息】
华为互动社区
https://forum.huawei.com/enterprise/zh/forum.php?mod=viewthread&tid=417453
【说明信息】
由于 USG6000
系列默认 WEB
界面和 console
的用户名和密码是同一个,为: admin/Admin@123
,且出于安全性考虑,默认没有开通 telnet
服务。如果WEB密码更改后且遗忘了,如果之前也没有单独开启过 telnet
或者 stelnet
等远程登录方式,则只能先通过在 bootrom
模式清除 console
密码,然后通过 console
方式登录设备后再重置WEB登录密码了。
通过 bootrom
模式清除 console
密码的操作方法有两种,都不会丢失配置,具体如下:
【方法及步骤】
方法一:
1.通过 Console
口连接设备并重启设备。在设备启动过程中,看到提示信息 “PressCtrl+B toEnterBootMenu...”
时,请在5秒钟内按下 “Ctrl+B”
,输入 BootROM
密码 “O&m15213”
进入 BootROM
主系统菜单。
2.按下 Ctrl+Z
进入隐藏菜单,输入 “RecoverConsolePassword”
对应的序号清空密码。
说明:如果遇到特殊情况没有 “RecoverConsolePassword”
,请转到方法 2
进行操作。
3.输入 “Exit”
对应的序号,回到 BootROM
主系统菜单。
4.输入 “Reboot”
对应的序号,重启系统。
5.重置密码
说明:重新进入系统后,请马上设置密码并保存,否则登录超时或重启后仍然需要通过用户验证才能进入系统。
重置默认帐号 admin
密码为 Admin@1234
的示例如下:
[USG6530-1] system-view
[USG6530-1] aaa
[USG6530-1-aaa] manager-user admin
[USG6530-1-aaa-manager-user-admin] password cipher Admin@1234
[USG6530-1-aaa-manager-user-admin] return
save
方法二:
如果执行到方法2,也就是进入隐藏菜单后发现没有 “RecoverConsolePassword”
, 可以将设备配置为空配置启动。设备启动后使用缺省管理员帐号/密码 (admin/Admin@123)
登录设备,将配置文件导出并修改管理员密码,覆盖回设备上的配置文件,达到修改登录密码的效果。
1.通过Console口连接设备并重启设备。在设备启动过程中,看到提示信息“Press Ctrl+B to Enter Boot Menu...”时,请在5秒钟内按下“Ctrl+B”,输入BootROM密码“O&m15213”进入 BootROM
主系统菜单,按如下步骤将设备配置为空配置启动。
缺省的 BootROM
密码为 O&m15213
,如果使用缺省值登录后,为了提高安全性,建议在进入扩展段 BootROM
主菜单后选择 5
进行修改。密码修改后请妥善保管以免丢失。
Press Ctrl+B to Enter Main Menu…3
Password:
For the sake of security, please modify the original password.
====================< Extend Main Menu >====================
| <1> Boot System |
| <2> Set Startup Application Software and Configuration |
| <3> File Management Menu… |
| <4> Load and Upgrade Menu… |
| <5> Modify Bootrom Password |
| <6> Reset Factory Configuration |
<0> Reboot
Press Ctrl+T to Enter Manufacture Test Menu…
| Press Ctrl+Z to Enter Diagnose Menu… |
Enter your choice(0-6): 5
Change Password.
Old Password:
New Password: *
Confirm Password: *
Save new password … Done.
继续:
====================< Extend Main Menu >====================
| <1> Boot System |
| <2> Set Startup Application Software and Configuration |
| <3> File Management Menu… |
| <4> Load and Upgrade Menu… |
| <5> Modify Bootrom Password |
| <6> Reset Factory Configuration |
<0> Reboot
Press Ctrl+T to Enter Manufacture Test Menu…
| Press Ctrl+Z to Enter Diagnose Menu… |
Enter your choice(0-6): 2 //此处选择2,进入设置启动文件和配置文件的子菜单。
Current boot application software:
Current boot configuration:
<1> Modify setting
<0> Quit
Enter your choice (0-1): 1 //此处选择1,进入修改配置子菜单。
File(s) in hda1:
1:hda1:/sup.bin 139720443 bytes
2:hda1:/vrpcfg.zip 17142 bytes
Total size: 1201569792 bytes.
Free size: 1061832207 bytes.
File(s) in hda2:
1:hda2:/keylog/log_1389968546.txt 442185 bytes
Total size: 640745472 bytes.
Free size: 640253952 bytes.
Input the name of application software(eg: hda1:/sup.bin):
Input the name of configuration or '.' to clear setting(eg: hda1:/vrpcfg.zip):. //此处输入“.”来将下次启动配置改为空配置。
Modifed configuration successful.
Next boot configuration: NULL
继续:
====================< Extend Main Menu >====================
| <1> Boot System |
| <2> Set Startup Application Software and Configuration |
| <3> File Management Menu… |
| <4> Load and Upgrade Menu… |
| <5> Modify Bootrom Password |
| <6> Reset Factory Configuration |
<0> Reboot
Press Ctrl+T to Enter Manufacture Test Menu…
| Press Ctrl+Z to Enter Diagnose Menu… |Enter your choice(0-6): 1 //此处选择1引导系统启动。
2.参照通过 HTTPS
登录 Web
界面或通过以太网口登录 WebUI
界面,通过设备 GE0/MGMT
接口登录 WebUI
界面。 3.选择“系统 > 配置文件管理”,单击“下次启动配置文件”所在行的“选择”。在“配置文件管理”页签中,导出最近一次保存的配置文件。

4.在PC上使用文本编辑工具修改配置文件中的管理员密码。此处以修改管理员 admin
的密码为 Admin@1234
为例进行说明。
5.将修改后的配置文件上传回设备,并设置为下次启动配置文件。
6.选择“系统 > 配置 > 系统重启”,单击“重启”,重启设备。
此处一定要选择“重启”,而不是“保存重启”,否则重置不起作用。
7.设备完成启动后,就可以使用新的用户名 admin
和密码 Admin@1234
登录,且配置也恢复为最近保存的配置。