Sun Java System Directory Server Enterprise Edition 6.2 管理指南

目錄伺服器機器:將測試使用者增加至目錄伺服器

若要對目錄伺服器認證 Kerberos 使用者,使用者必須有目錄項目可對應於其 Kerberos 主體。

在上一個步驟中,測試使用者以 kerberos-test@EXAMPLE.COM 的主體增加到 Kerberos 資料庫中。由於身份識別對映配置已增加到目錄中,因此該名使用者的對應目錄項目必須具有 DN uid=kerberos-test,ou=People,dc=example,dc=com

在目錄中增加使用者之前,必須以下列內容建立檔案 testuser.ldif


範例 5–5 新的 testuser.ldif 檔案


dn: uid=kerberos-test,ou=People,dc=example,dc=com
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
uid: kerberos-test
givenName: Kerberos
sn: Test
cn: Kerberos Test
description: An account for testing Kerberos authentication through GSSAPI

接著,請使用 ldapmodify 將此項目增加到伺服器中:


$ ldapmodify -D cn=admin,cn=Administrators,cn=config -w - -f testuser.ldif
adding new entry uid=kerberos-test,ou=People,dc=example,dc=com
$