[
https://issues.apache.org/jira/browse/DIRKRB-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134352#comment-16134352
]
John Zhuge commented on DIRKRB-615:
-----------------------------------
Hi [~jiajia], sorry for the long delay. Haven't got a chance to try again until
today. Don't have "kdc.conf" becausae I am using Hadoop's MiniKdc which creates
SimpleKdcServer.
MiniKdc properties:
{noformat}
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: debug: true
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: transport: TCP
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: max.ticket.lifetime: 86400000
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: org.name: EXAMPLE
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: kdc.port: 55555
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: org.domain: COM
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: max.renewable.lifetime:
604800000
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: instance: DefaultKrbServer
2017-08-20 02:20:39,164 INFO minikdc.MiniKdc: kdc.bind.address: localhost
{noformat}
Generated krb5.conf:
{noformat}
[libdefaults]
kdc_realm = EXAMPLE.COM
default_realm = EXAMPLE.COM
udp_preference_limit = 1
kdc_tcp_port = 55555
#_KDC_UDP_PORT_
[realms]
EXAMPLE.COM = {
kdc = localhost:55555
}
{noformat}
On Mac, kinit would fail. However, if I change the transport from TCP to UDP,
kinit works! Now I start to think this is just a bug in Mac version of kinit.
{noformat}
$ kinit --version
kinit (Heimdal 1.5.1apple1)
Copyright 1995-2011 Kungliga Tekniska Högskolan
Send bug-reports to [email protected]
{noformat}
> Can not connect to simplekdc server
> -----------------------------------
>
> Key: DIRKRB-615
> URL: https://issues.apache.org/jira/browse/DIRKRB-615
> Project: Directory Kerberos
> Issue Type: Bug
> Affects Versions: 1.0.0-RC2
> Reporter: John Zhuge
> Assignee: Jiajia Li
>
> Started a simplekdc server which generated the following krb5.conf:
> {code}
> [libdefaults]
> kdc_realm = EXAMPLE.COM
> default_realm = EXAMPLE.COM
> udp_preference_limit = 1
> kdc_tcp_port = 10088
> #_KDC_UDP_PORT_
> [realms]
> EXAMPLE.COM = {
> kdc = localhost:10088
> }
> {code}
> But kinit failed to connect to simplekdc server on Mac:
> {noformat}
> $ kinit jzhuge
> [email protected]'s password:
> kinit: krb5_get_init_creds: unable to reach any KDC in realm EXAMPLE.COM,
> tried 1 KDC
> {noformat}
> Wireshark showed kinit used UDP, while simplekdc was configured with TCP.
> Replaced the {{kdc}} option in krb5.conf with {{kdc = tcp/localhost:10088}},
> kinit was able to connect.
> Suggested fix:
> Add {{<service>/}} prefix to option {{kdc}} in the template
> https://github.com/apache/directory-kerby/blob/trunk/kerby-kerb/kerb-simplekdc/src/main/resources/krb5-template.conf
> and
> https://github.com/apache/directory-kerby/blob/trunk/kerby-kerb/kerb-simplekdc/src/main/resources/krb5_udp-template.conf.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)