local-user aging

Function

The local-user aging command sets the aging period of a local user account.

The undo local-user aging command restores the default setting.

By default, a local user account does not age.

Format

local-user user-name aging aging-period

undo local-user user-name aging

Parameters

Parameter Description Value
user-name

Specifies a 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.

aging-period

Specifies the aging period.

The value is an integer ranging from 0 to 365, in days.

Views

AAA view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
aaa write

Usage Guidelines

Usage Scenario

To age a local user account that has been idle for a long time, run the local-user aging command. If a user account keeps being idle for a configured aging period, the user account automatically ages.

When the user-aging command is used to configure the aging period for all users,

  • If the local-user aging command is not run, the aging time configured using the user-aging command takes effect.
  • If the local-user aging command is run, the aging time configured using the local-user aging command takes effect.

You can run the display local-user command to view the start aging time of the local user.

Configuration Impact

After the configured aging period elapses, users using the local user account fail to log in.

A local user attribute change does not apply to online users. The change takes effect after the online users relog in.

Example

# Set the aging period for a local user account username to 90 days.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] local-user username aging 90
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >