The local-user password command creates a local user and sets a login password for the user. If the local user has been created, the command modifies the login password of the user.
The undo local-user command deletes a local user.
By default, the system has no local user.
Parameter | Description | Value |
---|---|---|
user-name |
Specifies the username. |
The value is a string of 1 to 253 case-insensitive characters without spaces. If the value includes @, the characters before @ are the user name and the characters after @ are the domain name. If the value excludes @ or the domain name does not exist, the entire string is the user name and the user belongs to the default domain. A user name cannot contain two or more @s. When the user security policy is configured, the value is a string of 6 to 253 characters. When the user security policy is not configured, the value is a string of 1 to 253 characters. The user name cannot contain spaces or the following special characters: /, \, :, *, ?, ", <, >, |, @, ', %. |
cipher password |
Specifies the password in cipher text. The password is input in simple or encrypt text but stored in cipher text in the configuration file. The password in ciphertext is encrypted using the AES algorithm. |
When the user security policy is configured, the value is a string of 8 to 128 case-insensitive characters without spaces. When the user security policy is not configured, the value is a string of 1 to 128 case-insensitive characters without spaces. When the user security policy is configured, the password cannot be the same as the user name, or in reverse order with the user name. The password must contain the following characters: upper-case character, lower-case character, digit, and special character. Except the question mark (?) and space. However, when quotation marks are used around the password, spaces are allowed in the password.
When the user security policy is configured, the password cannot be the same as the user name, or in reverse order with the user name. The password must contain the following characters: upper-case character, lower-case character, digit, and special character.
|
irreversible-cipher irreversible-cipher-password |
Specifies the password in irreversible ciphertext key. The password is input in simple or encrypt text but stored in cipher text in the configuration file. |
When the user security policy is configured, the value is a string of 8 to 128 case-insensitive characters without spaces. When the user security policy is not configured, the value is a string of 1 to 128 case-insensitive characters without spaces. When the user security policy is configured, the password cannot be the same as the user name, or in reverse order with the user name. The password must contain the following characters: upper-case character, lower-case character, digit, and special character. Except the question mark (?) and space. However, when quotation marks are used around the password, spaces are allowed in the password.
When the user security policy is configured, the password cannot be the same as the user name, or in reverse order with the user name. The password must contain the following characters: upper-case character, lower-case character, digit, and special character.
Except the question mark (?) and space. However, when quotation marks are used around the password, spaces are allowed in the password.
|
Usage Scenario
If you need to use any of the following methods to access the device, you need to create a local user and set the login password for the user:
A login request is permitted only if a correct password is entered.
If a specified user name does not exist, running the local-user password command will create a local user. If a specified user name exists, running the local-user password command will set a new password for the user.
If the local-user service-type command has been run to configure a user as an administrator by specifying the user type as the Telnet, FTP, SSH, SNMP, or terminal user, the system automatically changes the user password to an irreversible ciphertext key. when a user password is modified, the old password should be input.
Configuration Impact
The rules for setting a password and a user name are more strict after the user-security-policy enable command is run than before.
After the user-password complexity-check command is run, to create a local user or change the login password for the local user, note the following:
When the user-security-policy enable command and the user-password complexity-check complexity-enhance command are configured at the same time, the configuration with the highest security takes effect.
If the password is specified in an irreversible ciphertext key, the PPP CHAP authentication fails.
A password is input in simple text or ciphertext but stored in ciphertext in the configuration file. If a user enters a password based on the prompted message, irreversible-cipher is displayed in the generated configuration file.
After the configuration, when you use the display local-user username command to view the attributes of a local user, it will be displayed in encrypted text.
Precautions
After a local user is created using the local-user password command, the device sets the local user rights based on the following principles:
A local user attribute change does not apply to online users. The change takes effect after the online users relog in.
By default, the cryptographic algorithm for the user login password is scrypt. If the crypto password irreversible-algorithm hmac-sha256 command is run, the cryptographic algorithm is set to hmac-sha256.
After the weak password dictionary maintenance function is enabled, the passwords (which can be queried using the display security weak-password-dictionary command) defined in the weak password dictionary are unavailable.
<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] local-user hello@163.net password irreversible-cipher Hello-13579
<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] local-user hello@163.net password Please configure the password (8-128) Enter Password: Confirm Password:
<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] local-user hello1@163.net password cipher 1qaz@WSX
<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] local-user hello2@163.net password cipher 1qaz@WSX Please enter old password: