![kinit:获取初始凭证时无法联系领域“UBUNTU”的任何 KDC](https://linux22.com/image/637334/kinit%EF%BC%9A%E8%8E%B7%E5%8F%96%E5%88%9D%E5%A7%8B%E5%87%AD%E8%AF%81%E6%97%B6%E6%97%A0%E6%B3%95%E8%81%94%E7%B3%BB%E9%A2%86%E5%9F%9F%E2%80%9CUBUNTU%E2%80%9D%E7%9A%84%E4%BB%BB%E4%BD%95%20KDC.png)
我正在 ubuntu 机器上安装 Kerberos5-1.12.1这些说明。
每当我尝试做的时候:
kinit user1
我遇到了一个错误:
kinit: Cannot contact any KDC for realm 'UBUNTU' while getting initial credentials
以下是我的 krb5.conf 和 kdc.conf 文件:
/etc/krb5.conf:
[libdefaults]
default_realm = UBUNTU
# The following krb5.conf variables are only for MIT Kerberos.
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
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.
#
# Thie 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.
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}
fcc-mit-ticketflags = true
[realms]
UBUNTU = {
kdc = 172.20.104.226
admin_server = 172.20.104.226
}
ATHENA.MIT.EDU = {
kdc = kerberos.mit.edu:88
kdc = kerberos-1.mit.edu:88
kdc = kerberos-2.mit.edu:88
admin_server = kerberos.mit.edu
default_domain = mit.edu
}
MEDIA-LAB.MIT.EDU = {
kdc = kerberos.media.mit.edu
admin_server = kerberos.media.mit.edu
}
ZONE.MIT.EDU = {
kdc = casio.mit.edu
kdc = seiko.mit.edu
admin_server = casio.mit.edu
}
MOOF.MIT.EDU = {
kdc = three-headed-dogcow.mit.edu:88
kdc = three-headed-dogcow-1.mit.edu:88
admin_server = three-headed-dogcow.mit.edu
}
CSAIL.MIT.EDU = {
kdc = kerberos-1.csail.mit.edu
kdc = kerberos-2.csail.mit.edu
admin_server = kerberos.csail.mit.edu
default_domain = csail.mit.edu
krb524_server = krb524.csail.mit.edu
}
IHTFP.ORG = {
kdc = kerberos.ihtfp.org
admin_server = kerberos.ihtfp.org
}
GNU.ORG = {
kdc = kerberos.gnu.org
kdc = kerberos-2.gnu.org
kdc = kerberos-3.gnu.org
admin_server = kerberos.gnu.org
}
1TS.ORG = {
kdc = kerberos.1ts.org
admin_server = kerberos.1ts.org
}
GRATUITOUS.ORG = {
kdc = kerberos.gratuitous.org
admin_server = kerberos.gratuitous.org
}
DOOMCOM.ORG = {
kdc = kerberos.doomcom.org
admin_server = kerberos.doomcom.org
}
ANDREW.CMU.EDU = {
kdc = vice28.fs.andrew.cmu.edu
kdc = vice2.fs.andrew.cmu.edu
kdc = vice11.fs.andrew.cmu.edu
kdc = vice12.fs.andrew.cmu.edu
admin_server = vice28.fs.andrew.cmu.edu
default_domain = andrew.cmu.edu
}
CS.CMU.EDU = {
kdc = kerberos.cs.cmu.edu
kdc = kerberos-2.srv.cs.cmu.edu
admin_server = kerberos.cs.cmu.edu
}
DEMENTIA.ORG = {
kdc = kerberos.dementia.org
kdc = kerberos2.dementia.org
admin_server = kerberos.dementia.org
}
stanford.edu = {
kdc = krb5auth1.stanford.edu
kdc = krb5auth2.stanford.edu
kdc = krb5auth3.stanford.edu
master_kdc = krb5auth1.stanford.edu
admin_server = krb5-admin.stanford.edu
default_domain = stanford.edu
}
[domain_realm]
.mit.edu = ATHENA.MIT.EDU
mit.edu = ATHENA.MIT.EDU
.media.mit.edu = MEDIA-LAB.MIT.EDU
media.mit.edu = MEDIA-LAB.MIT.EDU
.csail.mit.edu = CSAIL.MIT.EDU
csail.mit.edu = CSAIL.MIT.EDU
.whoi.edu = ATHENA.MIT.EDU
whoi.edu = ATHENA.MIT.EDU
.stanford.edu = stanford.edu
.slac.stanford.edu = SLAC.STANFORD.EDU
.ubuntu = UBUNTU
ubuntu = UBUNTU
[login]
krb5_convert = true
krb5_get_tickets = false
[logging]
kdc = FILE:/var/log/kerberos/krb5kdc.log
admin_server = FILE:/var/log/kerberos/kadmin.log
default = FILE:/var/log/kerberos/krb5lib.log
/usr/local/var/krb5kdc/kdc.conf:
[kdcdefaults]
kdc_ports = 88
[realms]
UBUNTU = {
kadmind_port = 749
max_life = 12h 0m 0s
max_renewable_life = 7d 0h 0m 0s
master_key_type = des3-hmac-sha1
supported_enctypes = des3-hmac-sha1:normal des-cbc-crc:normal des-cbc-crc:v4
}
[logging]
kdc = FILE:/usr/local/var/krb5kdc/kdc.log
admin_server = FILE:/usr/local/var/krb5kdc/kadmin.log
我的配置文件有问题吗?如果没有,谁能告诉我为什么会出现这个错误?
提前致谢...
答案1
虽然这是一个两年前的问题,但我还是给出了答案,因为我遇到过类似的问题。
LX-141(root)# root/greg>net ads join -S W12R2-C17.jamie_ad1.net -U Administrator%pwd
kerberos_kinit_password Administrator@JAMIE_AD1.NET failed: Cannot contact any KDC for requested realm
Failed to join domain: failed to connect to AD: Cannot contact any KDC for requested realm
就我而言,结果是重新启动 Windows 机器上的“Kerberos 密钥分发中心”服务,该服务要么被某人手动停止,要么崩溃了。
这可能与 Linux 端的问题完全相同——KDC 服务器无响应。
我希望它将来能够对某些人有所帮助。
答案2
[domain_realm]
.UBUNTU = UBUNTU
UBUNTU = UBUNTU
保存登记册
答案3
如果您安装了krb5-{
admin-server
,
kdc
}
正确(apt-get install
),那么你kdc.conf
应该在/etc/krb5kdc/kdc.conf
另外,使用更好的 enctypes。现在不再是 90 年代了。
答案4
我知道这个问题已经发布很久了,但我想添加我的解决方案
确保在 etc/hosts 中添加了与 kdc 名称相同的主机名
希望这会对某人有所帮助,谢谢。