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

退出打印视图

更新时间: 2014 年 9 月
 
 

如何为 NIS 用户设置 Diffie-Hellman 密钥

对 NIS 域中的每个用户执行此过程。

开始之前

必须登录到 NIS 主服务器才能为用户生成新密钥。必须已为您分配了 "Name Service Security"(名称服务安全)权限配置文件。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限

  1. 为用户创建新密钥。
    # newkey -u username

    其中,username 是用户的名称。系统将提示键入口令。您可以键入通用口令。私钥是使用此通用口令以加密形式存储的。

  2. 指示用户登录并键入 chkey -p 命令。

    此命令允许用户使用只有本人知道的口令重新加密其私钥。


    注 - 可以使用 chkey 命令为用户创建新密钥对。
示例 10-2  在 NIS 中设置并加密新用户密钥

在此示例中,超级用户将设置密钥。

# newkey -u jdoe
Adding new key for unix.12345@example.com
New Password: xxxxxxxx
Retype password: xxxxxxxx
Please wait for the database to get updated...
Your new key has been successfully stored away.
#

然后,用户 jdoe 使用专用口令对该密钥重新加密。

% chkey -p
Updating nis publickey database.
Reencrypting key for unix.12345@example.com
Please enter the Secure-RPC password for jdoe: xxxxxxxx
Please enter the login password for jdoe: xxxxxxxx
Sending key change request to centralexample...