使用 ktutil 创建服务主体
目前我可以使用 2 个虚拟机(windows-server 和 linux)来启动服务。但我在 Windows 服务器(即域控制器)上生成密钥表。
我想从 Linux 创建密钥表。
目前我正在
- AD windows 服务器 [DOMAIN MYNETWORK.NET] 中执行以下操作
创建服务 =
aservice
创建安全组 =
ServiceAcc
。使服务成员成为
ServiceAcc
创建一个 User =
auser
,它是 OU 的域控制器- 创建一个 User =
auser
,它是 OUsetspn -S HTTP/aservice.mynetwork.net auser
keytab:
ktpass -Out service-a.keytab -Princ HTTP/[电子邮件受保护] -mapUser auser -Crypto All -Ptype KRB5_NT_PRINCIPAL -Pass *
在linux中配置 krb5.conf 并将 dns 指向 AD:
- kinit:
kinit -kt aservice.keytab HTTP/[电子邮件受保护]
所以这可以正常工作。如果我不与用户一起执行密钥表,我将无法 kinit 等。
现在,我遇到的问题是如何直接从 Linux 执行所有这些操作,我不知道如何执行此操作。我能找到的所有文档都是执行以下操作:
- ktutil
- ktutil:
addent -password -p auser -k 1 -e aes256-cts
- Password for [email protected]:
- ktutil: wkt auser.keytab
但是:
- 之后我无法 kinit。
- 这仅添加用户,而不添加服务。我可以对服务执行相同的操作,但我不会添加用户。
我看到了一种可以使用 kadmin 做到这一点的方法,但我也遇到了问题,因为每次我尝试使用它时都会遇到识别问题。
Currently I'm able to kinit to a service using 2 vms (windows-server and linux). But I generate the keytab on the windows server, which is the domain controller.
I want to create the keytab from linux.
Currently I'm doing the following
in AD windows server [DOMAIN MYNETWORK.NET]
Create a service =
aservice
Create a security group =
ServiceAcc
.Make aservice member of
ServiceAcc
Create a User =
auser
which is a Domain Controller of an OUsetspn -S HTTP/aservice.mynetwork.net auser
keytab:
ktpass -Out service-a.keytab -Princ HTTP/[email protected] -mapUser auser -Crypto All -Ptype KRB5_NT_PRINCIPAL -Pass *
In linux with krb5.conf configurated and dns pointing to the AD:
- kinit:
kinit -kt aservice.keytab HTTP/[email protected]
So this works correctly. If I don't do the keytab with the user I can't kinit, etc.
Now, the issue I'm having is how to do all this directly from Linux and I'm not sure how to perfor this. All the documentation I can find is to do the following:
- ktutil
- ktutil:
addent -password -p auser -k 1 -e aes256-cts
- Password for [email protected]:
- ktutil: wkt auser.keytab
But:
- I can't kinit after that.
- This only adds a user, not the service. I could do the same with the service but then I'm not adding the user.
I saw a way to possible do this with kadmin, but I was having issues with that too as I get identification issues every time I try to use it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论