本章介绍了Console口、Telnet和BootROM密码遗忘后通过重新设置密码来找回的处理方法,建议用户妥善保管密码,并定期修改。
恢复Console口密码
恢复telnet登录密码
恢复BootROM密码
恢复Console口密码
方法一:通过Telnet登录设备修改Console口密码。
方法二:在BootROM下配置跳过Console口密码启动后,修改Console口密码。
方法三:在BootROM下重命名当前启动配置文件,以空配置启动后修改Console口密码。
请优先使用方法一,如果Telnet密码也忘记了再使用其它两个方法。
如果Console登录用的是密码认证,在方法一不可能的情况下优先使用方法二。
如果Console登录用的是AAA认证,在方法一不可能的情况下使用方法二或方法三。
您可以在《AR路由器 缺省帐号与密码》文档中获取各种缺省帐号与密码信息。获取该文档需要权限,如需升级权限,请查看网站帮助。
通过Telnet登录设备修改Console口密码
如果用户拥有Telnet账号,并且具有3级或更高的权限,则可以通过Telnet登录到设备后修改Console口密码,然后保存配置。
使用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 : Unspecified
使用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 - ......
修改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] return
# V200R005C00以及更高版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipherEnter Password(<8-128>): [Huawei-ui-console0] return
为了防止重启后配置丢失,选择保存配置。
<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 activated
在BootROM下配置跳过Console口密码启动后,修改Console口密码
设备的BootROM提供了配置跳过Console口密码启动的功能,可以在用户使用Console口登录的时候跳过密码检查。这样系统启动后除了不需要输入Console密码外,与正常启动相同,也会完成所有配置加载。设备启动后修改Console口密码,然后保存配置。
要进入到BootROM菜单需要重启设备,会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。
清空Console口密码登录后请马上配置新的密码,否则登录超时或重启后,仍需要清空密码来登录。
在此操作过程中不要对设备进行下电。
用串口线连接并重启设备,出现“Press Ctrl+B to break auto startup ...”打印信息时,按下“Ctrl+B”并键入密码后进入BootROM主菜单。
配置跳过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):1
完成系统启动后,通过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] return
# V200R005C00以及更高版本。
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode password
[Huawei-ui-console0] set authentication password cipherEnter Password(<8-128>): [Huawei-ui-console0] return
为了防止重启后配置丢失,保存配置。
<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 activated
在BootROM下重命名当前启动配置文件,以空配置启动后修改Console口密码
在BootROM下重命名当前启动配置文件,设备会以空配置启动,启动后将配置文件导出并修改Console口密码,覆盖回设备上的配置文件,达到修改登录密码的效果。
要进入到BootROM菜单需要重启设备,会导致业务中断,请视具体情况做好设备备份,并尽量选择业务量较少的时间操作。
在此操作过程中不要对设备进行下电。
用串口线连接并重启设备,出现“Press Ctrl+B to break auto startup ...”打印信息时,按下“Ctrl+B”并键入密码后进入BootROM主菜单。
重命名当前启动配置文件。
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):4 Startup Select 1. Display Startup 2. Set Boot File 3. Set Config File 4. Startupfile Check Manage 5. Set Startup Waiting Time 0. return Enter your choice(0-5):1************** Current Stratup info **************** Valid Flag State : Vaild Boot File Name : flash:/softwarenew.cc Config File Name : flash:/cfgnew.zip Licence File Name : Patch File Name : Voice File Name : ************** Pre Startup info ******************** Valid Flag State : Vaild Boot File Name : flash:/software.cc Config File Name : flash:/cfg.zip Licence File Name : Patch File Name : flash:/patch.pat Voice File Name : Startup Select 1. Display Startup 2. Set Boot File 3. Set Config File 4. Startupfile Check Manage 5. Set Startup Waiting Time 0. return Enter your choice(0-5):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):5 File Menu 1. Flash file system 0. Return Enter your choice(0-1):1 SDCard file system MENU 1. List file in Flash 2. Delete file in Flash 3. Rename file in Flash 4. Format Flash 5. Check Flash 0. Return Enter your choice(0-5):3Please input the file name: cfgnew.zipPlease input the new name: cfgnew-copy.zipRename file[flash:/cfgnew.zip] to [flash:/cfgnew-copy.zip], Yes or No(Y/N): y Rename OK! SDCard file system MENU 1. List file in Flash 2. Delete file in Flash 3. Rename file in Flash 4. Format Flash 5. Check Flash 0. Return Enter your choice(0-5):0 File Menu 1. Flash file system 0. Return Enter your choice(0-1):1 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):1
完成系统启动后,设备会恢复为默认的出厂配置,并提示设置Console口密码,以密码为“huawei@123”为例。
# V200R003C01以及更低版本。Please configure the login password (maximum length 16) Enter password: Confirm password:
# V200R005C00以及更高版本。
Please configure the login password (<8-128>) Enter password: Confirm password:
配置设备为FTP服务器,FTP路径需与前面重命名后的配置文件的路径保持一致。
<Huawei> system-view
[Huawei] ftp server enableInfo: Succeeded in starting the FTP server. [Huawei] aaa
[Huawei-aaa] local-user huawei password irreversible-cipher huawei@123
[Huawei-aaa] local-user huawei ftp-directory flash:
[Huawei-aaa] local-user huawei service-type ftp
[Huawei-aaa] local-user huawei privilege level 15
从PC上下载重命名后的配置文件。
C:Documents and SettingAdministrator> ftp 10.110.24.254 Connected to 10.110.24.254. 220 FTP service ready. User (10.110.24.254:(none)): huawei331 Password required for huawei. Password: 230 User logged in. ftp> get cfgnew-copy.zip //与前面重命名后的配置文件的文件名保持一致 200 Port command okay. 150 Opening ASCII mode data connection for cfgnew-copy.zip. 226 Transfer complete. ftp: 收到 981 字节,用时 0.00Seconds 981000.00Kbytes/sec.
在PC上解压后使用文本编辑工具(建议用系统自带的文本编辑工具)打开并删除Console口认证配置,删除后重新压缩成.zip文件。
将修改后的配置文件上传到设备,并覆盖原有配置文件。
<ftp> put cfgnew-copy.zip200 Port command okay. 150 Opening ASCII mode data connection for cfgnew-copy.zip. 226 Transfer complete. ftp: 发送981 字节,用时 0.00Seconds 981000.00Kbytes/sec.
设置修改后的配置文件为下一次启动配置文件,选择不保存配置重启设备。
<Huawei> startup saved-configuration cfgnew-copy.zipThis operation will take several minutes, please wait... Info: Succeeded in setting the file for booting system <Huawei> reboot fastSystem will reboot! Continue ? [y/n]:y
完成系统启动后,设备会提示设置Console口密码,以密码为“huawei@123”为例。
# V200R003C01以及更低版本。Please configure the login password (maximum length 16) Enter password: Confirm password:
# V200R005C00以及更高版本。
Please configure the login password (<8-128>) Enter password: Confirm password:
为了防止下次重启后配置丢失,选择保存配置。
<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 activated
恢复telnet登录密码
Telnet协议可以对设备进行远程维护和管理,如果Telnet密码丢失,可以通过Console口登录设备后重新进行配置。
AAA方式:使用用户名+密码方式登录。
Password方式:只使用密码登录。
这里以对VTY0~4进行相同的配置为例。
当用户登录到设备后,可执行命令display current-configuration configuration user-interface查看VTY用户的认证方式。用户可以在原有认证方式的基础上修改密码,也可以重新配置认证方式。
AAA方式
<Huawei> system-view [Huawei] user-interface vty 0 [Huawei-ui-vty0] protocol inbound telnet [Huawei-ui-vty0] authentication-mode aaa [Huawei-ui-vty0] quit [Huawei] aaa [Huawei-aaa] local-user admin123 password irreversible-cipher Huawei@123 [Huawei-aaa] local-user admin123 service-type telnet [Huawei-aaa] local-user admin123 privilege level 15 [Huawei-aaa] return <Huawei> save
该配置完成后用户可以使用用户名“admin123”,密码“Huawei@123”登录设备。
Password方式
<Huawei> system-view [Huawei] user-interface vty 0 4 [Huawei-ui-vty0-4] authentication-mode password [Huawei-ui-vty0-4] set authentication password cipher Huawei@123 [Huawei-ui-vty0-4] return
# V200R005C00以及更高版本。
<Huawei> system-view [Huawei] user-interface vty 0 [Huawei-ui-vty0] authentication-mode password [Huawei-ui-vty0] set authentication password cipherWarning: The "password" authentication mode is not secure, and it is strongly re commended to use "aaa" authentication mode. Enter Password(<8-128>): Confirm password: [Huawei-ui-vty0] user privilege level 15 [Huawei-ui-vty0] return <Huawei> save
该配置完成后用户可以输入密码“Huawei@123”登录设备。
恢复BootROM密码
BootROM提供了配置恢复、系统软件升级等功能,是设备安全、维护的基础。BootROM密码的安全性非常重要,需要慎重保存。如果BootROM密码丢失,可以通过恢复默认密码功能后重新设置新密码来进行修改。
请通过串口线连接设备完成下面的操作。
恢复默认密码,重启设备。
<Huawei> system-view
[Huawei] diagnose
[Huawei-diagnose] restore boot-passwordInfo: Restore boot password success! [Huawei-diagnose] return
<Huawei> rebootInfo: The system is comparing the configuration, please wait. Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/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 activated System will reboot! Continue ? [y/n]:y Info: system is rebooting ,please wait...
在BootROM下修改密码。
重启设备后,出现“Press Ctrl+B to break auto startup ...”打印信息时,按下“Ctrl+B”并键入密码后进入BootROM主菜单。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):1Modify password. Press Ctrl+c to break. Enter Old Password:****** //输入原BootRom密码 Input new password:****** //输入新BootRom密码 Input new password again:****** //再次输入新BootRom密码 Are you sure to change password? [y/n]:ySave new password Success. 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):1
请立即点击咨询我们或拨打咨询热线: 17804441181,我们会详细为你一一解答你心中的疑难。项目经理在线