The local-user password expire command configures the period after which a password expires.
The undo local-user password expire command restores the default setting.
By default, a password never expires.
Parameter | Description | Value |
---|---|---|
user-name |
Specifies the user name. |
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. |
days |
Specifies the remaining days. |
The value is an integer ranging from 0 to 999. If the value is 0, it means that the password never expires. |
Usage Scenario
To harden network security, administrators can run the local-user password expire command to configure the period after which a password expires.
When the password is changed, the system resets the period.
After a password expires, reconfigure a new password for users. Otherwise, users fail to log in.
Prerequisites
A local user has been created.
Precautions
A local user attribute change does not apply to online users. The change takes effect after the online users relog in.