我正在开发一个使用 NTLM SSO 和 LDAP 集成的 WordPress 页面。
我遇到的问题是,由于某些原因,当您访问该网站时,我收到 500 内部服务器错误,并在来自 apache2 的 error.log 中收到以下错误。
我在跑步:
Linux intranet.website.de 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64 GNU/Linux
[pid 593:tid 139997705381632] [client 10.15.200.12:33659] gss_acquire_cred() failed: Unspecified GSS failure. Minor code may provide more information (, No key table entry found matching HTTPS/intranet.website.de@), referer: https://intranet.website.de/
这是我的krb5.conf
文件。
[libdefaults]
default_realm = DC.WEBSITE.DE
# The following krb5.conf variables are only for MIT Kerberos.
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following encryption type specification will be used by MIT Kerberos
# if uncommented. In general, the defaults in the MIT Kerberos code are
# correct and overriding these specifications only serves to disable new
# encryption types as they are added, creating interoperability problems.
#
# The only time when you might need to uncomment these lines and change
# the enctypes is if you have local software that will break on ticket
# caches containing ticket encryption types it doesn't know about (such as
# old versions of Sun Java).
# default_tgs_enctypes = des3-hmac-sha1
# default_tkt_enctypes = des3-hmac-sha1
# permitted_enctypes = des3-hmac-sha1
# The following libdefaults parameters are only for Heimdal Kerberos.
fcc-mit-ticketflags = true
[realms]
DC.WEBSITE.DE = {
kdc = DC.WEBSITE.DE:88
admin_server = DC.WEBSITE.DE:749
}
[domain_realm]
website.de = DC.WEBSITE.DE
dc.website.de = DC.WEBSITE.DE
.website.de = DC.WEBSITE.DE
.dc.website.de = DC.WEBSITE.DE
[logging]
default = FILE:/var/krb5/kdc.log
kdc = FILE:/var/krb5/kdc.log
我添加到的行apache2.conf
<Directory /var/www/html>
AuthType Kerberos
KrbAuthRealms DC.WEBSITE.DE
KrbServiceName HTTPS
Krb5Keytab /etc/krb5.keytab
KrbMethodNegotiate on
KrbMethodK5Passwd on
require valid-user
</Directory>
命令输出klist -k /etc/krb5.keytab
:
KVNO Principal
---- --------------------------------------------------------------------------
14 HTTPS/[email protected]
如果有人可以帮助我,我将不胜感激,在过去的 4-5 小时内,我用 google 搜索并尝试自己解决问题,但没有成功。
PS:这是我用来生成Keytab的命令
ktpass -princ HTTPS/[email protected] -pass ****** -mapuser [email protected] -Ptype KRB5_NT_PRINCIPAL -out "C:\Users\adminx\Desktop\krb5.keytab"