- 进入kerberos 控制台
kadmin.local
- 1
- 添加用户,生成实例
add_principal, addprinc, ank
addprinc -randkey xxxx@xxxxT.COM
- 1
- 为各实例生成密钥
xst -k xxxx.keytab xxxx@xxxxT.COM
- 1
或
kadmin.local -q "xst -k xxxx.keytab xxxx@xxxxT.COM
- 合并key
合并hadoop.keytab和HTTP.keytab为hdfs.keytab。
ktutil
rkt hadoop.keytab
rkt HTTP.keytab
wkt hdfs.keytab
- 1
- 2
- 3
- 4
- 查看keytab文件
klist -ket /etc/krb5.keytab
- 1
- 删除用户
delete_principal, delprinc
delprinc xxxx@xxxxT.COM
- 1
- 修改用户密码
change_password, cpw
cpw xxxx@xxxxT.COM
- 1
- 查看所有用户
list_principals, listprincs, get_principals, getprincs
listprincs
- 1
- 修改票据属性
modify_principal, modprinc
modprinc -maxrenewlife 1week
- 1
修改票据可在一周内renew
10. 查看票据信息
get_principal, getprinc
getprinc xxxx@xxxxT.COM
- 导出keytab文件
ktadd, xst
xst -e aes128-cts-hmac-sha1-96:normal -k /home/dengsc/dengsc.keytab dengsc@XXXX.COM
-e 执定加密方式
-k 指定keytab文件名
注:导出keytab文件时会重新生成密码.
kadmin.local模式下可添加参数‘-norandkey’,导出keytab文件时不重置密码.
egg: xst -norandkey -k /home/dengsc/dengsc.keytab
? - help