Ambari在安装Kerberos时无法创建主体

时间:2019-07-18 05:10:09

标签: kerberos ambari kdc

我已经安装了MITKDC。我正在使用来自Ambari的现有MIT KDC启用Kerberos。创建主体时,我遇到了错误。

无法创建主体trinitylocal-071819@HUB.LOCAL-无法为trinitylocal-071819@HUB.LOCAL创建服务主体             STDOUT:使用现有凭据作为主体admin/admin@HUB.LOCAL进行身份验证。

STDERR: WARNING: no policy specified for trinitylocal-071819@HUB.LOCAL; defaulting to no policy
        add_principal: Insufficient access to lock the database while creating "trinitylocal-071819@HUB.LOCAL".Administration credentials NOT DESTROYED.

我可以使用kadmin.local.below命令创建主体,下面的命令也可以使用。我也可以登录Kinit admin / admin。

我已经尝试过并且可以登录的Klist命令。 下面是我的krb5.conf和kdc.conf。

下面是我的krb5.conf

[libdefaults]
      renew_lifetime = 7d
      forwardable = true
      default_realm = HUB.LOCAL
      ticket_lifetime = 24h
      dns_lookup_realm = false
      dns_lookup_kdc = false
      default_ccache_name = /tmp/krb5cc_%{uid}
      #default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
      #default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5

    [logging]
      default = FILE:/var/log/krb5kdc.log
      admin_server = FILE:/var/log/kadmind.log
      kdc = FILE:/var/log/krb5kdc.log

    [realms]
      HUB.LOCAL = {
        admin_server = HOSTNAME
        kdc = HOSTNAME
      }

下面是我的kdc.conf

[kdcdefaults]
 kdc_ports = 750,88

[realms]
            EXAMPLE.COM = {
                database_name = /var/lib/krb5kdc/principal
                admin_keytab = FILE:/etc/krb5kdc/kadm5.keytab
                acl_file = /etc/krb5kdc/kadm5.acl
                key_stash_file = /etc/krb5kdc/stash
                kdc_ports = 750,88
                max_life = 10h 0m 0s
                max_renewable_life = 7d 0h 0m 0s
                master_key_type = des3-hmac-sha1
                supported_enctypes = aes256-cts:normal arcfour-hmac:normal des3-hmac-sha1:normal des-cbc-crc:normal des:normal des:v4 des:norealm des:onlyrealm des:afs3
                default_principal_flags = +preauth
            }

1 个答案:

答案 0 :(得分:0)

解决了安装问题。我没有给适当的REALM