Kerberos常用命令笔记

半兽人 发表于: 2016-07-26   最后更新时间: 2016-10-23  
  •   0 订阅,752 游览

增加用户,带随机密码的

sudo /usr/sbin/kadmin.local -q 'addprinc -randkey kafka/10.211.55.5@EXAMPLE.COM'
sudo /usr/sbin/kadmin.local -q 'addprinc -randkey zookeeper/127.0.0.1@EXAMPLE.COM'

添加到密钥库

sudo /usr/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kafka.keytab kafka/10.211.55.5@EXAMPLE.COM”
sudo /usr/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kafka.keytab kafka/weiwei@EXAMPLE.COM’
sudo /usr/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kafka.keytab zookeeper/10.211.55.5@EXAMPLE.COM”
sudo /usr/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kafka.keytab zookeeper/127.0.0.1@EXAMPLE.COM”
sudo /usr/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kafka.keytab clients@EXAMPLE.COM”

查看数据库密钥

klist -t -e -k /var/kerberos/krb5kdc/kafka.keytab

查看方式2

ktutil
rkt /var/kerberos/krb5kdc/kafka.keytab

初始化密钥

kinit -kt /var/kerberos/krb5kdc/kafka.keytab kafka/10.211.55.5@EXAMPLE.COM

启动kerberos

service krb5kdc restart
chkconfig krb5kdc on

启动kadmind

kadmind






发表于: 11月前   最后更新时间: 8月前   游览量:752
上一条: kerberos认证的原理
下一条: RabbitMQ和kafka从几个角度简单的对比
评论…

  • 评论…
    • in this conversation
      提问