若要對目錄伺服器認證 Kerberos 使用者,使用者必須有目錄項目可對應於其 Kerberos 主體。
在上一個步驟中,測試使用者以 kerberos-test@EXAMPLE.COM 的主體增加到 Kerberos 資料庫中。由於身份識別對映配置已增加到目錄中,因此該名使用者的對應目錄項目必須具有 DN uid=kerberos-test,ou=People,dc=example,dc=com。
在目錄中增加使用者之前,必須以下列內容建立檔案 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 $ |