将主体发送到kerberos服务器时出错。 Apache2和kerberos5

时间:2015-04-15 15:59:58

标签: kerberos apache2.4

当我尝试使用kerberos5通过apache2进行身份验证时,我收到错误 我使用mod_auth_kerb
当我查看我的apache日志时,我可以通过添加以下内容来查看我的主体: 最后是.0.16.172.in-addr.arpa @。 所以kerberos回答

  

无法验证krb5凭据:Kerberos数据库中找不到服务器

我可以从kerberos获得一张票

我使用带有随机密钥的keytab来验证我的服务器:HTTP / admin-apache.domain.com 这里是apache日志的摘录:

  

[Wed Apr 15 16:12:50.539355 2015] [authz_core:debug] [pid 30467]   mod_authz_core.c(809):[client 192.168.90.100:43211] AH01626:   Require valid-user:denied的授权结果(未经过身份验证   用户))   [Wed Apr 15 16:12:50.539412 2015] [authz_core:debug] [pid   30467] mod_authz_core.c(809):[client 192.168.90.100:43211] AH01626:   授权结果:拒绝(没有经过身份验证的用户   尚)
  [Wed Apr 15 16:12:50.539440 2015] [auth_kerb:debug] [pid 30467]   src / mod_auth_kerb.c(1971):[client 192.168.90.100:43211]   用户输入的kerb_authenticate_user(NULL)和auth_type Kerberos
    [Wed Apr 15 16:12:50.541680 2015] [auth_kerb:debug] [pid 30467]   src / mod_auth_kerb.c(1049):[client 192.168.90.100:43211]使用   HTTP / admin-apache.domain.com.0.16.172.in-addr.arpa @作为服务器   密码验证负责人
  [Wed Apr 15 16:12:50.541715 2015]   [auth_kerb:debug] [pid 30467] src / mod_auth_kerb.c(753):[客户端   192.168.90.100:43211]尝试为用户获取TGT mope@domain.com
  [Wed Apr 15 16:12:50.565806 2015] [auth_kerb:debug] [pid 30467]   src / mod_auth_kerb.c(663):[client 192.168.90.100:43211]试图   使用principal验证KDC的真实性   HTTP / admin-apache.domain.com.0.16.172.in-addr.arpa @
    [4月15日星期三> 16:12:50.575915 2015] [auth_kerb:debug] [pid 30467]   src / mod_auth_kerb.c(678):[client 192.168.90.100:43211]   验证KDC时krb5_get_credentials()失败   [Wed Apr 15 16:12:50.575946 2015] [auth_kerb:error] [pid 30467] [客户   192.168.90.100:43211]无法验证krb5凭据:找不到服务器>在Kerberos数据库中   [Wed Apr 15 16:12:50.575959 2015]   [auth_kerb:debug] [pid 30467] src / mod_auth_kerb.c(1131):[客户端   192.168.90.100:43211] kerb_authenticate_user_krb5pwd ret = 401 user =(NULL)authtype =(NULL)

这是我的vhost配置:

 ServerName ldapadmin.domain.com  
 ServerAdmin root@localhost  
 DocumentRoot /usr/share/phpldapadmin/htdocs  
 ErrorLog /var/log/apache2/ldap.localhost-error.log  
 CustomLog /var/log/apache2/ldap.localhost-access.log common    </VirtualHost>
     


  
   AuthType Kerberos
  AuthName&#34; domain.com&#34;
  KrbMethod谈判上   KrbMethodK5Passwd上   Krb5Keytab /etc/apache2/http.keytab
  KrbAuthRealms DOMAIN.COM
  KrbServiceName HTTP
  需要有效用户

     

DirectoryIndex index.php
Options +FollowSymLinks
AllowOverride None

Order allow,deny
Allow from all

<IfModule mod_mime.c>

  <IfModule mod_php5.c>
    AddType application/x-httpd-php .php

    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_flag register_globals Off
    php_value include_path .
  </IfModule>

  <IfModule !mod_php5.c>
    <IfModule mod_actions.c>
      <IfModule mod_cgi.c>
        AddType application/x-httpd-php .php
        Action application/x-httpd-php /cgi-bin/php5
      </IfModule>
      <IfModule mod_cgid.c>                                                    
        AddType application/x-httpd-php .php                                   
        Action application/x-httpd-php /cgi-bin/php5                           
       </IfModule>
    </IfModule>
  </IfModule>

</IfModule>
     

为什么我的校长会被apache修改?
我该怎么做才能解决这个问题? 谢谢你的帮助 我很高兴我是Kerberos5的初学者

1 个答案:

答案 0 :(得分:0)

避免这种错误。你必须检查你的DNS记录 检查反向查找 使用bind9,您必须检查您的域的记录 语法是错误的常见来源 它必须有一个&#34;。&#34;在文件db.xx.xx.xx.in-addr.arpa

中每条记录的末尾