Enter the kadmin console

#kadmin.local

Adding Principal to a Keytab File

kadmin.local : ktadd -k /etc/krb5/anoop.keytab sherlock

Removing a principal from keytab

kadmin.local : ktremove host/denver.example.com@EXAMPLE.COM

Adding principal

addprinc -randkey $primary_name/$fully.qualified.domain.name@EXAMPLE.COM

To list all of the entries in the etc/krb5/my_keytab key table with timestamps, type:

klist -t -k etc/krb5/my_keytab
Create the hdfs keytab file, which contains an entry for the hdfs principal.
$ kadmin
kadmin: xst -k hdfs-unmerged.keytab hdfs/fully.qualified.domain.name

To obtain tickets using hdfs principal using the keytab:
$ kinit -k -t hdfs.keytab hdfs/fully.qualified.domain.name@YOUR-REALM.COM

Advertisements