系统管理指南:安全性服务

Procedure如何为 NIS 主机设置 Diffie-Hellman 密钥

应该针对 NIS 域中的每个主机执行此过程。

  1. 承担主管理员角色,或成为超级用户。

    主管理员角色拥有主管理员配置文件。要创建角色并将角色指定给用户,请参见《系统管理指南:基本管理》中的第 2  章 “使用 Solaris Management Console(任务)”

  2. 在名称服务中启用 publickey 映射。

    将以下行添加到 /etc/nsswitch.conf 文件中:


    publickey: nis
  3. 使用 newkey 命令创建一个新的密钥对。


    # newkey -h hostname
    

    其中,hostname 是客户机的名称。


示例 15–3 在 NIS 客户机上为 root 设置新密钥

在以下示例中,会将 earth 设置为安全 NIS 客户机。


# newkey -h earth

Adding new key for unix.earth@example.com

New Password:   <键入口令>

Retype password:<重新键入口令>

Please wait for the database to get updated...

Your new key has been successfully stored away.

#