对 NIS 域中的每个用户执行此过程。
开始之前
必须登录到 NIS 主服务器才能为用户生成新密钥。必须已为您分配了 "Name Service Security"(名称服务安全)权限配置文件。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限。
# newkey -u username
其中,username 是用户的名称。系统将提示键入口令。您可以键入通用口令。私钥是使用此通用口令以加密形式存储的。
此命令允许用户使用只有本人知道的口令重新加密其私钥。
在此示例中,超级用户将设置密钥。
# 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. #
% 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...