Bash 创建keytab以自动化脚本

Bash 创建keytab以自动化脚本,bash,kerberos,keytab,Bash,Kerberos,Keytab,我在创建keytab以自动执行正在运行的脚本时遇到问题 我使用这个网站作为参考 这就是我目前所做的: $ ktutil ktutil: addent -password -p bli1@testtesttest.corp.supernice.net -k 1 -e arcfour-hmac Password for bli1@testtesttest.corp.supernice.net: ktutil: ktutil: wkt bli1.keytab ktutil: quit 当

我在创建
keytab
以自动执行正在运行的脚本时遇到问题

我使用这个网站作为参考

这就是我目前所做的:

$ ktutil
ktutil:  addent -password -p bli1@testtesttest.corp.supernice.net -k 1 -e arcfour-hmac
Password for bli1@testtesttest.corp.supernice.net: 
ktutil:  
ktutil:  wkt bli1.keytab
ktutil:  quit
当我尝试运行脚本时,出现以下错误:

$ kinit bli1@testtesttest.corp.supernice.net -k -t bli1.keytab; python3 -m pytrinity.monitors.rate_monitor test
kinit: Cannot find KDC for requested realm while getting initial credentials
我不确定是否正确创建了
keytab
,因为在
keytab
创建过程中,我很难找到关于每个参数的深入文档。我不确定
-k
用于什么

addent: add entry
-password: add password
-p: principal
-e: encryption

我认为问题在于根据错误消息连接到KDC。kerberos配置文件中有什么内容/etc/krb5.conf通常是它的名称

您需要查看领域的kdc主机名/地址。然后尝试ping,看看是否可以从框中访问它。我无法在krb6.conf中更改任何内容,因为我没有权限,也无法更改这些权限。在我的
[realm]
CORP.COMPANY.NET={kdc=qycdccorp01.CORP.COMPANY.NET}
我尝试了从框中ping qycdccorp01.corp.company.net,并且能够得到响应,然后继续并尝试使用生成的键选项卡使用
kinit-k-t进行kinitbli1@testtesttest.corp.supernice.net
并查看它是否成功。但让我告诉你们一件事,通常当你们指定领域时,你们都用大写字母。因此,请首先尝试这个方法,如果它不起作用,请用大写字母指定@TESTxxxxx all