3.10. 在复制环境中同步帐户锁定属性


目录服务器在本地存储帐户锁定属性。在具有多个服务器的环境中,为这些属性配置复制,以防止攻击者尝试登录到一台服务器,直到达到帐户锁定计数为止,然后在其他服务器上继续。

目录服务器强制实施密码和帐户锁定策略,如下所示:

  • 在数据供应商中强制执行密码策略
  • 在复制拓扑中的所有服务器上强制实施帐户锁定策略

目录服务器复制以下密码策略属性:

  • passwordMinAge
  • passwordMaxAge
  • passwordExp
  • passwordWarning

但是,默认情况下,Directory 服务器不会复制常规帐户锁定属性:

  • passwordRetryCount
  • retryCountResetTime
  • accountUnlockTime

要防止攻击者尝试登录到一台服务器,直到达到帐户锁定计数,然后继续其他服务器,复制这些帐户锁定属性。

3.10.2. 配置目录服务器以复制帐户锁定属性

如果您使用更新 passwordRetryCount,retryCountResetTime, 或 accountUnlockTime 属性的帐户锁定策略,请将 Directory 服务器配置为复制这些属性,使其值在所有服务器之间相同。

在复制拓扑中的所有供应商上执行此步骤。

前提条件

  • 您已配置了帐户锁定策略,或配置了更新上述一个或多个属性的密码策略。
  • 您可以在复制环境中使用 Directory 服务器。

流程

  1. 启用复制密码策略属性:

    # dsconf <instance_name> pwpolicy set --pwdisglobal="on"
    Copy to Clipboard Toggle word wrap
  2. 如果使用部分复制,显示复制中排除的属性列表:

    # dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"dsconf <instance_name> repl-agmt get --suffix "dc=example,dc=com" example-agreement | grep "nsDS5ReplicatedAttributeList"
    Copy to Clipboard Toggle word wrap

    使用默认设置时,不会显示输出,Directory 服务器会复制帐户锁定属性。但是,如果命令返回排除的属性列表,如下例所示,请验证属性列表:

    nsDS5ReplicatedAttributeList: (objectclass=*) $ EXCLUDE accountUnlockTime passwordRetryCount retryCountResetTime example1 example2
    Copy to Clipboard Toggle word wrap

    在本例中,accountUnlockTimepasswordRetryCountretryCountResetTime lockout 策略属性从复制中排除,以及两个其他属性。

  3. 如果上一命令的输出列出了任何帐户锁定属性,请更新分数复制设置,使其仅包含 lockout 策略属性以外的属性:

    # dsconf <instance_name> repl-agmt set --suffix "dc=example,dc=com" --frac-list "example1 example2" example-agreement
    Copy to Clipboard Toggle word wrap

验证

  1. 尝试以使用无效密码的用户身份执行搜索:

    # ldapsearch -H ldap://server.example.com -D "uid=example,ou=People,dc=example,dc=com" -w "<invalid-password>" -b "dc=example,dc=com" -x
    ldap_bind: Invalid credentials (49)
    Copy to Clipboard Toggle word wrap
  2. 显示用户的 passwordRetryCount 属性:

    # ldapsearch -H ldap://server.example.com -D "cn=Directory Manager" -W -b "uid=example,ou=People,dc=example,dc=com" -x passwordRetryCount
    ...
    dn: uid=example,ou=People,dc=example,dc=com
    passwordRetryCount: 1
    Copy to Clipboard Toggle word wrap
  3. 在复制拓扑中的不同服务器上运行上一命令。如果 passwordRetryCount 属性的值相同,则 Directory 服务器会复制该属性。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat