password (local user view)

Syntax

In non-FIPS mode:

password [ [ hash ] { cipher | simple } password ]

undo password

In FIPS mode:

password

View

Local user view

Default level

2: System level

Parameters

hash: Enables hash-based encryption.

{ cipher | simple } password: Specifies a case-sensitive password string. 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.

Description

Use password to configure a password for a local user.

Use undo password to delete the password of a local user.

If none of the parameters is specified, you enter the interactive mode to set a plaintext password. The interactive mode is available only on switches that support the password control feature. For more information about password control commands, see Security Command Reference.

When the password control feature is globally enabled 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. In addition, you cannot configure a password by using the password hash cipher password command.

For secrecy, all passwords, including passwords configured in plain text, are saved in cipher text.

Related commands: display local-user.

Examples

# Set the password of local user user1 to 123456 in plain text.

<Sysname> system-view
[Sysname] local-user user1
[Sysname-luser-user1] password simple 123456

# Set the password of local user user1 to AAbbcc1234% in interactive mode.

<Sysname> system-view
[Sysname] local-user user1
[Sysname-luser-user1] password
Password:***********
Confirm :***********