If you forget the password for logging in through the console port or you want to change the password, use either of the following two methods to set a new password.
Telnet may bring security risks. You are advised to log in to the switch through STelnet V2.
Ensure that you have an STelnet/Telnet account and administrator rights. The following uses the command lines and outputs of logging in to the device using STelnet as an example. After logging in to the switch through STelnet, perform the following configuration.
# Take password authentication as an example. Set the password to Huawei@123.
<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 <HUAWEI> save
# Take AAA authentication as an example. Set the user name and password to admin123 and Huawei@123 respectively.
<HUAWEI> system-view [HUAWEI] user-interface console 0 [HUAWEI-ui-console0] authentication-mode aaa [HUAWEI-ui-console0] quit [HUAWEI] aaa [HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123 [HUAWEI-aaa] local-user admin123 service-type terminal [HUAWEI-aaa] return <HUAWEI> save
If multiple switches are stacked, power off the member switches. After completing the following operations on the master switch, run the save command to ensure that the configurations on the master switch can be synchronized after other member switches are started.
You can use the BootLoad menu of the switch to clear the lost password for console port login. After starting the switch, set a new password and save your configuration. Perform the following steps.
Connect the terminal to the console port of the switch and restart the switch. When the following message is displayed, press Ctrl+B or Ctrl+E immediately and enter the BootLoad password to access the BootLoad menu.
Press Ctrl+B or Ctrl+E to enter BootLoad menu ... 2
password: //Enter the BootLoad password.
Some switch models allow you to enter the BootLoad menu by pressing Ctrl+E. Perform operations as prompted on the screen.
The command outputs of different versions on different devices may be different. Therefore, the command outputs on your device may be different from that provided in this example.
By default, in versions earlier than V100R006C05, the default BootLoad password is huawei. In V100R006C05 and later versions, the default password is Admin@huawei.com.
Do not select Reboot; otherwise, the password cannot be cleared.