Red Hat Training

A Red Hat training course is available for RHEL 8

第 19 章 使用 IdM 中的 SSSD 组件来缓存 autofs 映射

系统安全服务守护进程(SSSD)是一种系统服务,来访问远程服务目录和身份验证机制。当网络连接较慢时,数据缓存非常有用。要将 SSSD 服务配置为缓存 autofs 映射,请按照本节中的以下步骤操作。

19.1. 手动配置 autofs ,来将 IdM 服务器用作 LDAP 服务器

这个流程演示了如何配置 autofs ,来将 IdM 服务器用作 LDAP 服务器。

流程

  1. 编辑 /etc/autofs.conf 文件,来指定 autofs 搜索的模式属性:

    #
    # Other common LDAP naming
    #
    map_object_class = "automountMap"
    entry_object_class = "automount"
    map_attribute = "automountMapName"
    entry_attribute = "automountKey"
    value_attribute = "automountInformation"
    注意

    用户可以在 /etc/autofs.conf 文件中以小写和大写形式写入属性。

  2. (可选)指定 LDAP 配置。有两种方法可以做到这一点:最简单的方法是让自动挂载服务自行发现 LDAP 服务器和位置:

    ldap_uri = "ldap:///dc=example,dc=com"

    这个选项要求 DNS 包含可发现服务器的 SRV 记录。

    或者,明确设置要使用的 LDAP 服务器,以及用于 LDAP 搜索的基本 DN:

    ldap_uri = "ldap://ipa.example.com"
    search_base = "cn=location,cn=automount,dc=example,dc=com"
  3. 编辑 /etc/autofs_ldap_auth.conf 文件,以便 autofs 允许客户端通过 IdM LDAP 服务器进行身份验证。

    • authrequired 更改为 yes。
    • 将主体设置为 IdM LDAP 服务器(host/fqdn@REALM)的 Kerberos 主机主体。主体名称用于连接 IdM 目录,来作为 GSS 客户端身份验证的一部分。

      <autofs_ldap_sasl_conf
           usetls="no"
           tlsrequired="no"
           authrequired="yes"
           authtype="GSSAPI"
           clientprinc="host/server.example.com@EXAMPLE.COM"
           />

      有关主机主体的更多信息,请参阅在 在 IdM 中使用规范化的 DNS 主机名

      如有必要,请运行 klist -k 来获取确切的主机主体信息。