在 NIS 域中的每个主机上执行此过程。
开始之前
您必须承担 root 角色。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限。
# svccfg -s name-service/switch listprop config config application config/value_authorization astring solaris.smf.value.name-service.switch config/default astring files config/host astring "files nis dns" config/printer astring "user files nis"
如果 config/default 值为 nis,您可以在此处停止。
# svccfg -s name-service/switch setprop config/publickey = astring: "nis" # svccfg -s name-service/switch:default refresh
# svccfg -s name-service/switch listprop config application config/value_authorization astring solaris.smf.value.name-service.switch config/default astring files config/host astring "files nis dns" config/printer astring "user files nis" config/publickey astring nis
在此系统上,列出 publickey 的值,因为它不同于缺省值 files。
# newkey -h hostname
其中,hostname 是客户机的名称。
在以下示例中,分配了 "Name Service Security"(名称服务安全)权限配置文件的管理员将 earth 设置为安全 NIS 客户机。
# newkey -h earth Adding new key for unix.earth@example.com New Password: xxxxxxxx Retype password: xxxxxxxx Please wait for the database to get updated... Your new key has been successfully stored away. #