local-user password expire

Function

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.

Format

local-user user-name password expire days

undo local-user user-name password expire

Parameters

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.

Views

AAA view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
aaa write

Usage Guidelines

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.

Example

# Configure the password for user user1 to expires in 90 days.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] local-user user13579 password irreversible-cipher Hello-13579
[~HUAWEI-aaa] local-user user13579 password expire 90
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >