给出以下krb5.config(其中FOOBAR.COM是虚构的字符串)
[libdefaults]
renew_lifetime = 7d
forwardable = true
default_realm = FOOBAR.COM
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
[domain_realm]
#Been messing around with this part
FOOBAR.COM = FOOBAR.COM
.FOOBAR.COM = FOOBAR.COM
[logging]
default = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
kdc = FILE:/var/log/krb5kdc.log
[realms]
FOOBAR.COM = {
admin_server = my_admin_server_hostname
kdc = my_kdc_hostname
}
使用我的领域名称和其他参数调用kadmin无效。它找不到kdc。
[kdc machine] kadmin -s localhost -p admin/admin@foobar.com -r FOOBAR.COM -q "get_principal admin/admin@foobar.com"
Authenticating as principal admin/admin@foobar.com with password.
kadmin: Cannot find KDC for realm "foobar.com" while initializing kadmin interface
但是首先访问kadmin可能有效(也许是因为它访问kadmin.local吗?)
[kdc machine]# kadmin
Authenticating as principal admin/admin@FOOBAR.COM with password.
Password for admin/admin@FOOBAR.COM:
kadmin: get_principal admin/admin@foobar.com
get_principal: Principal does not exist while retrieving "admin/admin@foobar.com".
奇怪的是,省略主体标志也可以正常工作
[kdc machine]# kadmin -s localhost -r FOOBAR.COM -q "get_principal admin/admin@foobar.com"
Authenticating as principal admin/admin@FOOBAR.COM with password.
Password for admin/admin@FOOBAR.COM:
get_principal: Principal does not exist while retrieving "admin/admin@foobar.com".
我认为这是由于某些DNS问题所致,因为我的领域字符串FOOBAR.COM是一个虚构的地址。我一直在编辑krb5.conf和hosts文件来尝试解决此问题,但没有成功。不能使用实际的FQDN代替随机字符串作为领域名称。我不明白为什么省略-p会导致不同的结果...
有人对如何使第一个查询仍然有效有想法吗?
答案 0 :(得分:0)
好的,看来问题出在指定主体-p
此操作失败: -p admin/admin@holograph.tor.indexww.com
成功: -p管理员/管理员
Kadmin显然会自动在主体之后添加领域名称,并且失败了,根本与“找不到KDC服务器”无关。