為了在 LDAP 上儲存 krb5 主體項目,LDAP 命名上下文(根基本名稱)是否需要與領域名稱相符?
領域的主體
HQ.EXAMPLE.ORG
可以儲存在
dc=範例,dc=組織
目錄樹的命名上下文?
答案1
名稱根本不必匹配。您只需獲得正確的權限即可。
這是這個概念的一個有效但不理想的例子:
$ ldapsearch -Q -LLL -h ldap1.example.com -b cn=krbcontainer -s one objectclass @krbRealmContainer
dn: cn=EXAMPLE.COM,cn=krbContainer
cn: EXAMPLE.COM
objectClass: top
objectClass: krbRealmContainer
objectClass: krbTicketPolicyAux
krbSubTrees: ou=people,dc=example,dc=com
dn: cn=kadmin-service,cn=krbContainer
objectClass: krbKdcService
objectClass: simpleSecurityObject
cn: kadmin-service
dn: cn=kdc-service,cn=krbContainer
objectClass: krbKdcService
objectClass: simpleSecurityObject
cn: kdc-service
ldap1 ~ # cat /etc/krb5.conf
#krb5.conf
[libdefaults]
[realms]
EXMAPLE.COM = {
admin_server = ldap1.example.com
kdc = ldap1.example.com
database_module = openldap_ldapconf
}
[logging]
kdc = SYSLOG:INFO:AUTH
admin_server = SYSLOG:INFO:AUTH
[dbdefaults]
ldap_kerberos_container_dn = cn=krbContainer
[dbmodules]
openldap_ldapconf = {
db_library = ldap
ldap_kerberos_container_dn = cn=krbContainer
ldap_kdc_dn = "cn=kdc-service,cn=krbContainer"
# this object needs to have read rights on
# the realm container and principal subtrees
ldap_kadmind_dn = "cn=kadmin-service,cn=krbContainer"
# this object needs to have read and write rights on
# the realm container and principal subtrees
ldap_service_password_file = /etc/krb5kdc.keyfile
ldap_servers = ldapi:///
ldap_conns_per_server = 5
}