1.5  Password Control典型配置举例

1. 组网需求

有以下密码管理需求:

·全局密码管理策略:用户2次登录失败后就永久禁止登录;密码老化时间为30天;允许用户进行密码更新的最小时间间隔为36小时;密码过期后60天内允许登录5次;用户帐号的闲置时间为30天;不允许密码中包含用户名或者颠倒用户名;不允许密码中包含连续三个或以上字符。

·super密码管理策略:密码元素的最少组合类型为3种,至少要包含每种元素的个数为5个。

·本地Telnet用户test的密码管理策略:最小密码长度为12个字符,密码元素的最少组合类型为2种,至少要包含每种元素的个数为5个,密码老化时间为20天。

2. 配置步骤

# 使能全局密码管理功能。

system-view

[Sysname] password-control enable

# 配置用户2次登录失败后就永久禁止该用户登录。

[Sysname] password-control login-attempt 2 exceed lock

# 配置全局的密码老化时间为30天。

[Sysname] password-control aging 30

# 配置密码更新的最小时间间隔为36小时。

[Sysname] password-control password update interval 36

# 配置用户密码过期后的60天内允许登录5次。

[Sysname] password-control expired-user-login delay 60 times 5

# 配置用户帐号的闲置时间为30天。

[Sysname] password-control login idle-time 30

# 使能在配置的密码中检查包含用户名或者颠倒的用户名的功能。

[Sysname] password-control complexity user-name check

#使能在配置的密码中检查包含连续三个或以上相同字符的功能。

[Sysname] password-control complexity same-character check

# 配置super密码元素的最少组合类型为3种,至少要包含每种元素的个数为5个。

[Sysname] password-control super composition type-number 3 type-length 5

# 配置super密码。

[Sysname] super password level 3 simple 12345ABGFTweuix

# 添加本地用户test。

[Sysname] local-user test

# 配置本地用户的服务类型为Telnet。

[Sysname-luser-test] service-type telnet

# 配置本地用户的最小密码长度为12个字符。

[Sysname-luser-test] password-control length 12

# 配置本地用户的密码元素的最少组合类型为2种,至少要包含每种元素的个数为5个。

[Sysname-luser-test] password-control composition type-number 2 type-length 5

# 配置本地用户的密码老化时间为20天。

[Sysname-luser-test] password-control aging 20

# 以交互式方式配置本地用户密码。

[Sysname-luser-test] password

Password:***********

Confirm :***********

Updating user(s) information, please wait........

[Sysname-luser-test] quit

3. 验证配置结果

# 可通过如下命令查看全局密码管理的配置信息。

display password-control

Global password control configurations:

Password control:                    Enabled

Password aging:                      Enabled (30 days)

Password length:                     Enabled (10 characters)

Password composition:                Enabled (1 types,  1 characters per type)

Password history:                    Enabled (max history record:4)

Early notice on password expiration: 7 days

User authentication timeout:         60 seconds

Maximum failed login attempts:       2 times

Login attempt-failed action:         Lock

Minimum password update time:        36 hours

User account idle-time:              30 days

Login with aged password:            5 times in 60 day(s)

Password complexity:                 Enabled (username checking)

Enabled (repeated characters checking)

# 可通过如下命令查看super密码管理的配置信息。

display password-control super

Super password control configurations:

Password aging:                      Enabled (30 days)

Password length:                     Enabled (10 characters)

Password composition:                Enabled (3 types,  5 characters per type)

# 可通过如下命令查看到本地用户密码管理的配置信息。

display local-user user-name test

The contents of local user test:

State:                    Active

ServiceType:              telnet

Access-limit:             Disable           Current AccessNum: 0

User-group:               system

Bind attributes:

Authorization attributes:

Password aging:                       Enabled (20 days)

Password length:                      Enabled (12 characters)

Password composition:                 Enabled (2 types,  5 characters per type)

Total 1 local user(s) matched.

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐