virtualbox - Kerberos kinit : Resource temporarily unavailable while getting initial credentials

标签 virtualbox kerberos centos7

我正在 VirtualBox VM 中运行的 CentOS7(更具体地说:Hortonworks HDP 2.3 沙箱)上设置 Kerberos。我的问题是 kinit 似乎无法访问我的 KDC,如果我在 /etc/hosts 中添加地址,答案是“获取初始凭据时资源暂时不可用”> 文件,如果我按原样保留该文件,我会收到消息“在获取初始凭据时无法联系领域 mycompany 的任何主机”
KDC 正在运行(可以使用 ps 找到它,并且服务以“okay”消息启动),kadmin 也是如此。

作为设置 kerberos 的指南,我遵循以下两个指南:
CentOS guide
Guide 2

我的配置文件: krb5.conf

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

[libdefaults]
  default_realm = MYCOMPANY.COM
  dns_lookup_realm = true
  dns_lookup_kdc = true
  ticket_lifetime = 24h
  renew_lifetime = 7d
  forwardable = true


[realms]
  MYCOMPANY.COM = {
    kdc = kerberos.mycompany.com
    admin_server = kerberos.mycompany.com
  }

[domain_realm]
  .mycompany.com = MYCOMPANY.COM
  mycompany.com = MYCOMPANY.COM

kdc.conf

[kdcdefaults]
  kdc_ports = 88
  kdc_tcp_ports = 88,750

[realms]
  MYCOMPANY.COM = {
    #master_key_type = aes256-cts
    acl_file = /var/kerberos/krb5kdc/kadm5.acl
    dict_file = /usr/share/dict/words
    admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
    supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
  }

kadm5.acl

*/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5233363f3b3c121f0b111d1f02131c0b7c111d1f" rel="noreferrer noopener nofollow">[email protected]</a> *

/etc/hosts

127.0.0.1       localhost.localdomain localhost
192.168.96.140  sandbox.hortonworks.com sandbox ambari.hortonworks.com
192.168.1.3     mycompany.com kerberos.mycompany.com

如果主机文件的第三行中有任何地址,我会收到“资源...”错误,如果该行丢失,我会收到“无法联系...”错误。

我可以使用 krb5_trace 或其他东西来跟踪 kinit 命令(不幸的是,我无法找到我从中获得的链接,也不记得确切的命令)到主机文件中指定的地址,因此 kinit 似乎联系合适的地址,只是 KDC 不监听那里。
Netstat 显示 KDC 正在监听 kdc.conf 中指定的端口

如有任何帮助,我们将不胜感激

最佳答案

好的,现在可以了。我为解决这个问题所做的事情:

/etc/resolv.conf

     mycompany.com  127.0.0.1

/etc/hosts

     127.0.0.1       localhost.localdomain localhost
     192.168.96.140  sandbox.hortonworks.com sandbox ambari.hortonworks.com
     127.0.0.1     mycompany.com kerberos.mycompany.com

而且,最尴尬的是:我使用 kinit mycompany/admin 作为主体 user/[email protected] 这当然是错误的。
正确的调用当然是kinit user/admin

关于virtualbox - Kerberos kinit : Resource temporarily unavailable while getting initial credentials,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32735406/

相关文章:

windows - Vagrant 无法与客人交流

vagrant - 运行 vagrant : "The host path of the shared folder is missing" 时出错

authentication - 使用带有 Kerberos 的 cURL 在 Keycloak 上进行身份验证

php - CakePHP 缓存无法在 Centos 7 中写入

VirtualBox 中的 Neo4j 服务器 : Unable to create rrd store

kerberos - Keycloak + Kerberos 认证 : Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - RC4 with HMAC

java - Kerberos 身份验证错误 - Sqoop 通过 Hive 从 SQL 导入 HDFS

proxy - dotnet restore 使用公司代理失败

java - 输入 : localhost:8080 or ip:8080 Centos7 vm 时 tomcat 启动但未显示在浏览器中

debian - VirtualBox 中 Debian 的主要/默认用户不是 sudo 用户