对不起,如果这是错误的stackexchange网站。
基于文档 (供参考,我也用这个博客文章 ),我有这在httpd.conf中:
# Increase max size of HTTP request headers so we are sure it can hold any SPNEGO token. LimitRequestFieldSize 12392 # Load the module LoadModule auth_gss_module /apps/apache2/modules/mod_auth_gss.so # Set general log level so we get some output LogLevel debug <Directory "/var/www/secured"> Order allow,deny Allow from all AuthType GSSAPI AuthGSSServiceName HTTP AuthGSSKeytabFile /path/to/keytab/servername.keytab #AuthGSSStripDomainBS On #AuthGSSStripDomainAT On AuthGSSForceCase upper AuthGSSDebug On require valid-user </Directory>
当我打开页面时,浏览器中出现“未经授权”,并在apache error_log中出现以下内容:
tail -f logs/error_log [authz_core:debug] [pid 3657:tid 27] mod_authz_core.c(802): [client 10.138.48.42:1432] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet) [core:debug] [pid 3657:tid 27] mod_auth_gss.c(620): [client 10.138.48.42:1432] gss_authenticate: type = GSSAPI [core:debug] [pid 3657:tid 27] mod_auth_gss.c(334): [client 10.138.48.42:1432] authenticate_user_gss called [core:debug] [pid 3657:tid 27] mod_auth_gss.c(373): [client 10.138.48.42:1432] Using keytab: KRB5_KTNAME=/path/to/keytab/servername.keytab [core:debug] [pid 3657:tid 27] mod_auth_gss.c(411): [client 10.138.48.42:1432] Client wants GSS mech: <unknown> [core:debug] [pid 3657:tid 27] mod_auth_gss.c(288): [client 10.138.48.42:1432] acquire_server_creds for HTTP@servername [core:debug] [pid 3657:tid 27] mod_auth_gss.c(438): [client 10.138.48.42:1432] got server creds for: HTTP/servername.testdomain.local@ [core:error] [pid 3657:tid 27] [client 10.138.48.42:1432] gss_accept_sec_context() failed: Invalid token was supplied (No error) [core:debug] [pid 3657:tid 27] mod_auth_gss.c(650): [client 10.138.48.42:1432] Authentication failed. [core:debug] [pid 3657:tid 27] mod_auth_gss.c(592): [client 10.138.48.42:1432] note_gss_auth_failure: auth_name = <undefined>
我注意到,我似乎acquire_server_creds for HTTP@servername但got server creds for: HTTP/servername.testdomain.local@ acquire_server_creds for HTTP@servername got server creds for: HTTP/servername.testdomain.local@ 。 我不知从哪里开始寻找。
这是一个Solaris 10盒子,Apache 2.4试图与Windows 2008域服务器通话。
在Solaris服务器上托pipe文件:
XXX.XXX.XXX.XXX servername.testdomain.local servername
没有/etc/hostname文件存在。
雪崩,
我是您参考的博客条目的作者。
您对此发表评论的问题通常是因为kerberos实现使用系统获取的名字(通常是/ etc / hosts文件中的第一个条目)。 它所发生的是你有密钥表的全名,第一个主机条目是没有限定的名字。 在这些条目中,我在三个位置configuration了全限定名:keytab,/ etc / hosts中的第一个条目和机器的主机名(/ etc / hostname)。
如果您查看以前的条目,我评论说我遇到了同样的问题。
你的/ etc / hosts是可以的(完全限定名是第一个)。 检查机器中的主机名是短的还是完全限定的名称。 只需执行主机名并检查响应。
如果名称较短,请尝试将主机名称更改为完全限定的名称:
主机名servername.testdomain.local
我认为有一个-t选项将其设置为临时。
再见!