< Home

local-user expire-date

Function

The local-user expire-date command sets the expiration date of a local account.

The undo local-user expire-date command restores the default expiration date of a local account.

By default, a local account is permanently valid.

Format

local-user user-name expire-date expire-date

undo local-user user-name expire-date

Parameters

Parameter Description Value
user-name

Specifies a local account.

The value is a string of 1 to 64 characters. It cannot contain spaces, asterisk, double quotation mark and question mark.
NOTE:

During local authentication or authorization, run the authentication-mode { local | local-case } or authorization-mode { local | local-case } command to configure case sensitivity for user names. If the parameter is set to local, user names are case-insensitive. If the parameter is set to local-case, user names are case-sensitive.

Note the following when configuring case sensitivity for user names:

  • Only the user name is case-sensitive and the domain name is case-insensitive.
  • For user security purposes, you cannot configure multiple local users with the user names that differ only in uppercase or lowercase. For example, after configuring ABC, you cannot configure Abc or abc as the user name.
  • When a device is upgraded from V200R011C10 or an earlier version to a version later than V200R011C10, all local user names in the original configuration file are saved in lowercase. When a configuration file that is manually configured or generated using the third-party tool is used for configuration restoration, local user names that differ only in uppercase or lowercase are considered as one user name and the first one among these local user names is used.
expire-date

Specifies the expiration date of the local account.

The value is in YYYY/MM/DD format. YYYY specifies the year, MM specifies the month, and DD specifies the day. The value ranges from 2000/1/1 to 2099/12/31.

Views

AAA view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After a local account is created, the account has no expiration date by default. You can run the local-user expire-date command to set the expiration date of a local account. When the expiration date is reached, the account expires. This configuration enhances network security.

Precautions

  • For example, if the expiration date of the local account is set to 2013-10-1, the account becomes invalid at 00:00 on 2013-10-1.
  • This function takes effect only for users who go online after this function is successfully configured.

Example

# Set the expiration date of local account hello@163.net to 2013/10/1.

<HUAWEI> system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user hello@163.net expire-date 2013/10/1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >