无法从 Kerberos 客户端登录 kadmin

无法从 Kerberos 客户端登录 kadmin

我在让客户端验证我刚刚设置的 Kerberos 服务器身份时遇到了一个小问题。每当我运行:

[root@localhost log]# kadmin -r KERBEROS.MONZELL.COM -p host/kerberos.monzell.com
Authenticating as principal host/kerberos.monzell.com with password.

我收到以下消息:

Password for host/[email protected]: 
kadmin: Communication failure with server while initializing kadmin interface

在服务器端,我看到以下内容:

Sep 12 23:19:47 sl6 krb5kdc[6349](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.15.31: SERVER_NOT_FOUND: host/[email protected] for kadmin/[email protected], Server not found in Kerberos database

尽管事后似乎还在做其他事情:

Sep 12 23:19:47 sl6 krb5kdc[6349](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.15.31: ISSUE: authtime 1315883987, etypes {rep=18 tkt=18 ses=18}, host/[email protected] for kadmin/[email protected]
Sep 12 23:24:14 sl6 krb5kdc[6349](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.15.31: ISSUE: authtime 1315884254, etypes {rep=18 tkt=18 ses=18}, host/[email protected] for kadmin/[email protected]

我尝试了一些原则来让它发挥作用:

kadmin.local:  listprincs
K/[email protected]
host/[email protected]
host/[email protected]
kadmin/[email protected]
kadmin/[email protected]
kadmin/[email protected]
kadmin/[email protected]
[email protected]
krbtgt/[email protected]
[email protected]
root/[email protected]

以及在客户端的 hosts 文件和服务器的 hosts 文件上添加真实主机名和客户端主机名(客户端是 kvm0001.monzell.com,而 kerberos 服务器是 kerberos.monzell.com)。到目前为止,还没有成功。

我从这里该往哪个方向走?

客户端和服务器都运行 Scientific Linux 6,顺便说一下,客户端是在服务器上运行的 KVM 实例。

让我补充一下,是的,在 authconfig 实用程序中有一个启用 Kerberos 身份验证的选项。但是,这是我第一次设置 Kerberos 服务器,所以我不知道它是否真的有效。这就是我进行这项特殊练习的原因。

答案1

我搞明白了 - 首先,运行 kadmin 并不是测试 kerberos 的正确方法。相反,我在 KDC 安装了 kerberized 服务器 utilis,然后使用以下命令测试了 krsh:

/usr/kerberos/bin/krsh -x -PN kerberos.monzell.com

至于 kadmin,我收到的错误是因为我需要在 KDC 打开端口 749:

iptables -I INPUT -s 192.168.15.0/24 -m tcp -p tcp --dport 749 -j ACCEPT

这解决了问题并允许我从客户端管理 KDC。

[root@localhost ~]# kadmin -p rilindo/[email protected]
Authenticating as principal rilindo/[email protected] with password.
Password for rilindo/[email protected]: 
kadmin:  listprincs
K/[email protected]
host/[email protected]
host/[email protected]
kadmin/[email protected]
kadmin/[email protected]
kadmin/[email protected]
krbtgt/[email protected]
rilindo/[email protected]
[email protected]

相关内容