此过程在 LDAP 客户机上为全局区域建立 LDAP 命名服务配置。
使用 txzonemgr 脚本。
开始之前
Oracle Directory Server 企业版(即 LDAP 服务器)必须存在。该服务器必须置备有 Trusted Extensions 数据库,并且此客户机系统必须能够与该服务器联系。因此,LDAP 服务器必须已为此客户机指定安全模板。不需要特定的指定,通配符指定已足够。
您必须在全局区域中承担 root 角色。
LDAP 的标准命名服务转换文件对 Trusted Extensions 具有过多限制。
# svccfg -s name-service/switch listprop config config application config/value_authorization astring solaris.smf.value.name-service.switch config/default astring files ldap config/netgroup astring ldap config/printer astring "user files ldap"
# svccfg -s name-service/switch setprop config/host = astring: "files dns ldap" # svccfg -s name-service/switch:default refresh
# svccfg -s name-service/switch listprop config config application config/value_authorization astring solaris.smf.value.name-service.switch config/default astring files ldap config/host astring files dns ldap config/netgroup astring ldap config/printer astring "user files ldap"
Trusted Extensions 数据库使用缺省配置 files ldap,因此未被列出。
# txzonemgr &
Enter Domain Name: Type the domain name Enter Hostname of LDAP Server: Type the name of the server Enter IP Address of LDAP Server servername: Type the IP address Enter LDAP Proxy Password: Type the password to the server Confirm LDAP Proxy Password: Retype the password to the server Enter LDAP Profile Name: Type the profile name
Proceed to create LDAP Client?
确认后,txzonemgr 脚本将运行 ldapclient init 命令。
# ldapclient -v mod -a enableShadowUpdate=TRUE \ > -a adminDN=cn=admin,ou=profile,dc=domain,dc=suffix System successfully configured
# ldapclient list
其输出与以下内容类似:
NS_LDAP_FILE_VERSION= 2.0 NS_LDAP_BINDDN= cn=proxyagent,ou=profile,dc=domain-name ... NS_LDAP_BIND_TIME= number
如果出现错误,请重新执行Step 2 至Step 4。例如,以下错误可能表示系统没有 LDAP 服务器上的项。
LDAP ERROR (91): Can't connect to the LDAP server. Failed to find defaultSearchBase for domain domain-name
要更正此错误,需要检查 LDAP 服务器。