在 Oracle® Solaris 11.2 中管理 Kerberos 和其他验证服务

退出打印视图

更新时间: 2014 年 9 月
 
 

如何交互配置 Kerberos 客户机

此过程使用 kclient 安装实用程序而非安装配置文件。如果客户机将加入 Active Directory 服务器,则转到如何将 Kerberos 客户机加入到 Active Directory 服务器

开始之前

您必须承担 root 角色。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限

  1. 运行不带参数的 kclient 命令。
    client# /usr/sbin/kclient

      脚本将提示您提供以下信息:

    • Kerberos 领域名称

    • 主 KDC 服务器主机名

    • KDC 从主机名

    • 映射到本地领域的域

    • 用于 Kerberos 验证的 PAM 服务名称和选项

    有关更多信息,请参见 kclient(1M) 手册页。

  2. 如果 KDC 服务器未运行 Oracle Solaris 发行版,请回答 y 并定义运行 KDC 的服务器类型。

    有关可用服务器的列表,请参见 kclient(1M) 手册页中的 –T 选项。

  3. 如果应将 DNS 用于 Kerberos 查找,请回答 y 并指示要使用的 DNS 查找选项。

    有效的选项有:–dns_lookup_kdc–dns_lookup_realm–dns_fallback。有关这些值的更多信息,请参见 krb5.conf(4) 手册页。

  4. 定义 Kerberos 领域的名称和主 KDC 主机名。

    此信息将添加到 /etc/krb5/krb5.conf 配置文件中。

  5. 如果从 KDC 位于该领域,请回答 y 并提供从 KDC 主机名。

    此信息用于在客户机配置文件中创建其他 KDC 项。

  6. 如果需要服务密钥或主机密钥,请回答 y

    通常情况下不需要服务密钥或主机密钥,除非客户机系统正在托管基于 Kerberos 的服务。

  7. 如果客户机是某个群集的成员,请回答 y 并提供该群集的逻辑名称。

    逻辑主机名可用于创建服务密钥,而后者是在群集中托管 Kerberos 服务所必需的。

  8. 确定映射到当前领域的所有域和主机。

    此映射允许其他域存在于客户机的缺省领域。

  9. 指定客户机是否会使用基于 Kerberos 的 NFS。

    当客户机使用 Kerberos 托管 NFS 服务时,需要创建 NFS 服务密钥。

  10. 指示是否需要创建新的 PAM 策略。

      要设置使用 Kerberos 进行验证的 PAM 服务,需要提供服务名称以及指示 Kerberos 验证的使用方式的标志。有效的标志选项包括:

    • first-首先使用 Kerberos 验证,仅当 Kerberos 验证失败时才使用 UNIX

    • only-仅使用 Kerberos 验证

    • optional-有选择地使用 Kerberos 验证

    有关为 Kerberos 提供的 PAM 服务的信息,请查看 /etc/security/pam_policy 中的文件。

  11. 指定是否应复制主 /etc/krb5/krb5.conf 文件。

    借助此选项,可以指定在 kclient 的参数不足时使用的特定配置信息。

示例 4-3  kclient 脚本的运行样例
...
Starting client setup
---------------------------------------------------

Is this a client of a non-Solaris KDC ? [y/n]: n
No action performed.
Do you want to use DNS for kerberos lookups ? [y/n]: n
No action performed.
Enter the Kerberos realm: EXAMPLE.COM
Specify the KDC host name for the above realm: kdc1.example.com

Note, this system and the KDC's time must be within 5 minutes of each other for
Kerberos to function. Both systems should run some form of time synchronization
system like Network Time Protocol (NTP).
Do you have any slave KDC(s) ? [y/n]: y
Enter a comma-separated list of slave KDC host names: kdc2.example.com

Will this client need service keys ? [y/n]: n
No action performed.
Is this client a member of a cluster that uses a logical host name ? [y/n]: n
No action performed.
Do you have multiple domains/hosts to map to realm ? [y/n]: y
Enter a comma-separated list of domain/hosts to map to the default realm: corphdqtrs.example.com, \
example.com

Setting up /etc/krb5/krb5.conf.

Do you plan on doing Kerberized nfs ? [y/n]: y
Do you want to update /etc/pam.conf ? [y/n]: y
Enter a comma-separated list of PAM service names in the following format:
service:{first|only|optional}: xscreensaver:first
Configuring /etc/pam.conf.

Do you want to copy over the master krb5.conf file ? [y/n]: n
No action performed.

---------------------------------------------------
Setup COMPLETE.