H3C系列以太网交换机 登录口令恢复手册(V1.00)
目 录
第1章 H3C系列交换机登录口令简介
& 说明:
本手册中介绍的登录口令恢复方法适用于以下H3C系列交换机产品:
l S2126-EI
l S3100
l S3100-52P
l S3600
l S3610
l S5100
l S5500
l S5510
l S5600
l E126/E126A/E152/E352/E328
其他型号的H3C交换机产品口令恢复方法请参见各产品的安装手册或联系H3C代理商。
1.1 控制台登录口令
通过控制台进行本地登录是登录交换机的最基本的方式,也是配置通过其他方式登录交换机的基础。用户使用配置线缆将计算机的串口与H3C系列交换机的Console口进行连接,即可以通过PC上的终端仿真程序对交换机进行配置和管理。H3C系列以太网交换机缺省情况下只能通过Console口进行本地登录。
用户可以通过设置控制台登录口令来对通过Console口登录的用户进行限制,防止非法用户篡改设备的当前配置。
H3C系列交换机对使用Console口登录的用户支持三种认证方式:
l None
l Password
l Scheme
& 说明:
有关这三种口令认证方式的详细说明和配置,请参见各型号交换机的操作手册和命令手册。
在配置了控制台登录口令之后,交换机会在用户使用Console口登录时提示用户输入口令。
**************************************************************************
* Copyright (c) 2004-2007 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
**************************************************************************
User interface aux0 is available.
Press ENTER to get started.
Login authentication
Password:
1.2 Telnet登录口令
Telnet是远程登录和管理网络设备的常用方式,通过Telnet,用户只需要知道远程设备的IP地址和Telnet登录口令,即可以对设备进行远程管理和维护。
H3C系列交换机支持Telnet功能,用户可以通过Telnet远程管理交换机,也可以通过设置Telnet口令对Telnet用户进行限制,防止非法用户登录。
H3C系列交换机对使用Telnet登录的用户支持三种认证方式:
l None
l Password
l Scheme
& 说明:
有关这三种口令认证方式的详细说明和配置,请参见各型号交换机的操作手册和命令手册。
在配置了Telnet登录口令之后,交换机会在用户使用Telnet登录时提示用户输入口令。
**************************************************************************
* Copyright(c) 2004-2007 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
**************************************************************************
Login authentication
Password:
第2章 恢复H3C系列交换机的登录口令
2.1 恢复控制台登录口令
如果用户设置的控制台登录口令丢失,可以通过使用BOOT菜单中的“跳过配置文件启动”功能进行恢复。
(1) 使用配置线缆将计算机的串口与H3C系列交换机的Console口进行连接,配置终端仿真程序,重新启动交换机。
(2) 在交换机完成自检后,在下面的界面键入<Ctrl+B>进入BOOT菜单。
Board checking.......................................LSA1LTSG
SDRAM fast selftest.......................................OK!
Flash fast selftest.......................................OK!
CPLD selftest.............................................OK!
Switch chip selftest......................................OK!
Slot 1/1/1 has no module or get slot type error
Slot 1/1/2 has no module or get slot type error
Slot 1/1/3 has no module or get slot type error
Slot 1/1/4 has no module or get slot type error
PHY selftest..............................................OK!
Please check port leds..............................finished!
The switch Mac is: 000f-e200-3900
Press Ctrl-B to enter Boot Menu... 5
password:
& 说明:
缺省情况下,进入BOOT菜单的口令为空。如果用户设置了BOOT菜单口令,但该口令已经丢失,请与代理商联系。
(3) 进入BOOT菜单后,键入“7”,选择“跳过配置文件启动”功能。
BOOT MENU
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify bootrom password
6. Enter bootrom upgrade menu
7. Skip current configuration file
8. Set bootrom password recovery
9. Set switch startup mode
0. Reboot
Enter your choice(0-9): 7
The current setting is running configuration file when reboot.
Are you sure to skip current configuration file when reboot? Yes or No(Y/N) y
Setting......done!
(4) 回到BOOT菜单后,输入“0”重新启动交换机。
BOOT MENU
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify bootrom password
6. Enter bootrom upgrade menu
7. Skip current configuration file
8. Set bootrom password recovery
9. Set switch startup mode
0. Reboot
Enter your choice(0-9): 0
^@System rebooting...
(5) 再次启动时,交换机会跳过配置文件,即跳过对控制台口令的配置,用户可以直接登录交换机。
**************************************************************************
* Copyright (c) 2004-2007 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
**************************************************************************
Configuration file is skipped.
User interface aux0 is available.
Press ENTER to get started.
<H3C>
(6) 用户登录后,可以使用display startup命令查看启动配置文件,并使用more命令查看该配置文件中的控制台口令配置。
<H3C> display startup
Current startup saved-configuration file: NULL
Next startup saved-configuration file: flash:/vrpcfg.cfg
<H3C> more vrpcfg.cfg
……(略)
#
user-interface aux 0
authentication-mode password
set authentication password simple test
user-interface vty 0 4
authentication-mode none
user privilege level 3
idle-timeout 0 0
#
return
<H3C>
& 说明:
如果用户设置的口令为明文,则口令将直接显示在配置文件中;如果用户设置了密文的口令,则将显示为转换后的密文字符,此时需要用户自行将密文转换为明文。
(7) 用户可以使用FTP或TFTP将启动配置文件发送到PC上,使用文本编辑软件(例如Windows系统的“记事本”或“写字板”软件)对配置文件进行编辑,修改认证口令或修改认证方式为None,再将配置文件上传到交换机上覆盖原有文件。再次启动后,交换机将使用更新后的配置文件,用户可以重新进行口令配置,同时其他原有配置不会丢失。
& 说明:
以上操作适用于在Password方式或Scheme方式中的本地方式下恢复登录口令。如果用户使用Scheme方式中的Radius方式进行认证,用户的登录口令将在Radius服务器上进行设置,当登录口令丢失或Radius服务器不可用时,也会造成登录失败;这种情况下,用户可以通过上面描述的方式编辑配置文件,修改认证方式为None,即可跳过认证直接登录,但登录口令需要用户在Radius服务器上进行恢复。
(8) 需要注意的是,在第三步操作中选择的“跳过配置文件”选项会保存在BootRom中,如果不进行修改,则此后每次重启设备都会跳过配置文件。因此,需要用户手工重启设备,并再次进入BOOT菜单选择“跳过配置文件”选项,在提示确认的时候输入“N”,才能恢复启动时加载配置文件。
BOOT MENU
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify bootrom password
6. Enter bootrom upgrade menu
7. Skip current configuration file
8. Set bootrom password recovery
9. Set switch startup mode
0. Reboot
Enter your choice(0-9): 7
The current setting is running configuration file when reboot.
Are you sure to skip current configuration file when reboot? Yes or No(Y/N) n
Setting......done!
2.2 恢复Telnet登录口令
如果用户丢失了Telnet登录口令,可以使用Console口登录到控制台界面,对Telnet的口令配置进行查看和修改。
(1) 使用配置线缆将计算机的串口与H3C系列交换机的Console口进行连接,配置终端仿真程序,登录到交换机控制台界面。
(2) 使用display current-configuration命令查看当前配置文件中对于用户界面的认证配置。
<H3C> display current-configuration | begin user-interface
user-interface aux 0
set authentication password simple test
user-interface vty 0 4
user privilege level 3
set authentication password simple h3c
idle-timeout 0 0
#
& 说明:
l display current-configuration命令中使用的“| begin user-interface”参数表示对输出信息进行筛选,从第一个包含“user-interface”字符的配置开始显示,在这里使用是为了快速定位配置文件中关于用户接口的配置内容。关于使用正则表达式对输出信息进行筛选的详细信息,请参加各交换机产品的操作手册。
l 由于用户界面的缺省认证模式为“password”模式,因此如果在配置文件中没有显示“authentication-mode”配置信息,则表示当前的认证模式为“password”。
(3) 通过命令修改认证方式和认证口令。
由显示信息可以看到,当前配置的Telnet用户界面认证模式为password,口令为h3c:
l 如果用户不需要改变登录口令,可以退出当前控制台界面,使用Telnet登录,输入口令“h3c”即可成功登录。
l 如果用户需要修改登录口令,可以在用户界面视图下使用set authentication password命令更新口令,例如:
<H3C> system-view
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4] set authentication password simple new
l 如果用户需要修改Telnet登录时的认证方式,可以在用户界面视图下使用authentication-mode命令进行操作,例如修改为在Telnet登录时不进行认证:
<H3C> system-view
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4] authentication-mode none
经过以上配置后,用户再次登录Telnet界面时,交换机将采用修改后的配置对用户进行认证。
& 说明:
建议用户在完成上述配置后及时使用save命令保存配置,以避免交换机重启后仍使用修改前的配置对用户进行登录认证。


