Configures a password for a new user account or changes the password for an existing account. Configuring a password for a new account is required to enable the account. Only the Admin role can change passwords for other users; users of any role can change their own passwords.
Important
By default, the Web UI supports passwords of up to 32 characters, while the CLI supports longer passwords. If a password longer than 32 characters is configured in the CLI, the user will be unable to log in to the Web UI until the password length is reduced or the password rules are changed to allow more characters.
Note
To include double quotes ("), spaces, question marks (?), or backslashes (\) as password characters, you must include a backslash as an escape character. For example, for a password of abcde", enter
abcde\"as thepasswordparameter.
Syntax
username <username> {[ password <password> | password 0 <password> | password 7 <password>] | curr-password <password>}
Parameters
<username>
Name of a new user account or an existing account with a password you want to change.
password 0 <password>
Specifies a cleartext password that will be hashed before it is stored.
password 7 <password>
Specifies a hashed password that is stored directly. This option allows you to use the hashed password displayed by the show configuration command.
curr_password <password>
Specifies the current password of the user entering this command. If this parameter is not supplied and if the system is configured to require the current password for password changes, the system prompts for the current password.
Examples
The following example enters a cleartext password for the user "jsmith."
hostname (config) # username jsmith password 0 XJCdvd23
In the following examples, the user "tjones" is entering the command, and the system is configured to require the current password for password changes.
The user supplies the current password in the command:
hostname (config) # username tjones password ABCde4H6 curr-password ZYX765RJ
The system prompts for the current password because it was not supplied in the command:
hostname (config) # username tjones password ABCde4H6 Current password:******** hostname (config) #
An invalid current password was entered:
hostname (config) # username tjones password ABCde4H6 Current password: *************** % Current password does not match. Please retry after 3 seconds.
Supported appliances
Command parameter curr-password introduced in Release 2021.3 for all appliances.