应该针对 NIS 域中的每个用户执行此过程。
只有系统管理员在登录到 NIS 主服务器时才能为用户生成新密钥。
承担主管理员角色,或成为超级用户。
主管理员角色拥有主管理员配置文件。要创建角色并将角色指定给用户,请参见《系统管理指南:基本管理》中的第 2 章 “使用 Solaris Management Console(任务)”。
为用户创建新密钥。
# newkey -u username |
其中,username 是用户的名称。系统将提示键入口令。您可以键入通用口令。将使用此通用口令以加密格式存储私钥。
此命令允许用户使用只有其自己知道的口令重新加密其私钥。
可以使用 chkey 命令为用户创建新密钥对。
在此示例中,超级用户将设置密钥。
# newkey -u jdoe Adding new key for unix.12345@example.com New Password: <键入口令> Retype password:<重新键入口令> 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:<键入口令> Please enter the login password for jdoe: <键入口令> Sending key change request to centralexample... |