user-password expire prompt

Function

The user-password expire prompt command sets the password validity period and the period for advance warning before the password expires.

The undo user-password expire prompt command cancels the configuration.

By default, the configured password does not expire.

Format

user-password expire expire-days prompt prompt-days

undo user-password expire

Parameters

Parameter Description Value
expire-days

Specifies the password validity period.

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

If the value is 0, it means that the password never expires.

prompt prompt-days

Specifies the period for advance warning before the password expires.

The value is an integer in the ranging from 0 to 180.

Views

AAA view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
aaa write

Usage Guidelines

Usage Scenario

To prevent account stealing due to unchanged passwords, run the

user-password expire command to set the password validity period and the period for advance warning before the password expires.

Expiration time is calculated from when the account was created.

Prerequisites

A local user has logged in to the device as an administrator.

Configuration Impact

  • The user-password expire command applies only to administrators. The system prompts the administrator to change the password N days before the password expires.
  • If the administrator does not change the password till the password expires, the administrator is denied access to the device.

Precautions

  • The parameter expire-days must be greater than or equal to the parameter prompt-days.
  • The user-password expire command that is configured in the AAA view or local AAA server view takes effect only for users in the specific view and does not affect another in the other view.

Example

# Set the password validity period to 90 days and the period for advance warning before the password expires to 7 days in the AAA view.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] user-password expire 90 prompt 7
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >