The local-user expire command sets the expiration date of a local user account.
The undo local-user expire command restores the default expiration date of a local user account.
By default, a local user account is permanently valid.
Parameter | Description | Value |
---|---|---|
user-name |
Specifies a local user account. |
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. |
date |
Specifies the expiration date of a local user account. |
The format is YYYY-MM-DD. The value of YYYY ranges from 2000 to 2099, the value of MM ranges from 1 to 12, and the value of DD ranges from 1 to 31. The date cannot be earlier than the current date. |
Usage Scenario
You can run the local-user expire command to set the expiration date of a local user account. When the expiration date is reached, the account expires. This configuration enhances network security.
Precautions
For example, if two management accounts, user A and user B, are configured on a device and the expiration dates of user A and user B are respectively August 1, 2013 and August 31, 2013, the user A account expires on August 1, 2013.
A local user attribute change does not apply to online users. The change takes effect after the online users relog in.