给定以下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-local首先有效(可能是因为它访问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会导致不同的结果。。。
有人知道如何仍然让第一个查询工作吗?
好吧,所以问题似乎是指定主体-p
此操作失败:-p管理员/admin@holograph.tor.indexww.com
成功:-p admin/admin
Kadmin显然自动在主体之后添加领域名称,但失败了,这与"找不到KDC服务器"无关。