< Home

set password min-length

Function

The set password min-length command sets the minimum length of passwords in plain text allowed by a device.

The undo set password min-length command restores the default minimum length of passwords in plain text allowed by a device.

By default, the minimum length of passwords in plain text allowed by a device is 8 characters.

Format

set password min-length length

undo set password min-length

Parameters

Parameter Description Value
length Specifies the minimum length of passwords in plain text allowed by a device. The value is an integer ranging from 6 to 16.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command can change the limit on the password length. A longer password length makes the password more complex and improves device security.

Precautions

  • The set password min-length command limits the length of all passwords in plain text. Only the passwords longer than or equal to the minimum length take effect. The minimum length does not take effect for the following passwords:

    • Passwords configured during configuration restoration
    • Passwords that have taken effect before the minimum length is configured
  • This command limits the minimum length of only the passwords in plain text configured using the following commands:
    • set authentication password
    • lock
    • local-user
    • super password

    The set password min-length command does not limit the minimum length of other types of passwords.

If password complexity check has been disabled using the undo user-password complexity-check command, the set password min-length command does not limit the minimum length of passwords in plain text of local users.

For device security purposes, do not disable the password complexity check function and change the password periodically.

Example

# Set the minimum length of passwords in plain text allowed by the local device to 10 characters.

<HUAWEI> system-view
[HUAWEI] set password min-length 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >