46
•
service-type
password
Use
password
to configure a password for a local user.
Use
undo password
to delete the password of a local user.
Syntax
password
[ [
hash
] {
cipher
|
simple
}
password
]
undo password
Views
Local user view
Default command level
2: System level
Parameters
hash
: Enables hash-based encryption.
cipher
: Sets a ciphertext password.
simple
: Sets a plaintext password.
password
: Specifies the password string. This argument is case sensitive. If
hash
is not specified, a
ciphertext password must be a string of 1 to 117 characters and a plaintext password must be a
string of 1 to 63 characters. If
hash
is specified, a ciphertext password must be a string of 1 to 110
characters and a plaintext password must be a string of 1 to 63 characters.
Usage guidelines
If you do not specify any parameter, you enter the interactive mode to set a plaintext password string.
The interactive mode is available only on devices that support the password control feature. For
more information about password control commands, see "Password control configuration
commands."
When the password control feature is enabled globally by using the
password-control enable
command, local user passwords, such as the length and complexity, are under the restriction of the
password control feature and are not displayed, and the
password hash cipher
command does not
take effect.
For security purposes, all passwords, including passwords configured in plain text, are saved in
cipher text or hashed form.
This command is not supported in FIPS mode. To configure a local user password in FIPS mode, use
the
password-control
command.
Examples
# Set the password to 123456 in plain text for local user
user1
.
<Sysname> system-view
[Sysname] local-user user1
[Sysname-luser-user1] password simple 123456
# Set a plaintext password 123456 in interactive mode for local user
user1
.
<Sysname> system-view
[Sysname] local-user user1
[Sysname-luser-user1] password
Password:******
Confirm :******