Step 1: As the root user, start the kadmin tool on the KDC server:
/usr/krb5/sbin/kadmin.local
kadmin.local:
Step 2: Create the keytab files for all services in your Hadoop cluster.
Use
kadminutility to execute the following:kadmin: xst -norandkey -k $keytab_file_name $principal_name/fully.qualified.domain.nameThe
$keytab_file_namemust use the following mandatory naming conventions:Table 5.17. Secure deployment - Mandatory naming conventions for keytab files Service Name Keytab File Name Principal Name Permissions Owner NameNode nn.service.keytabnn700hdfs:hadoopNameNode spnego.service.keytabHTTP700hdfs:hadoopSecondary NameNode nn.service.keytabnn700hdfs:hadoopSecondary NameNode spnego.service.keytabHTTP700hdfs:hadoopJobTracker jt.service.keytabjt700mapred:hadoopTaskTracker tt.service.keytabtt700mapred:hadoopDataNode dn.service.keytabdn700hdfs:hadoopHBase Master hbase.service.keytabhbase700hbase:hadoopHBase RegionServer hbase.service.keytabhbase700hbase:hadoopHive Metastore hive.service.keytabhive700hive:hadoopOozie oozie.service.keytaboozie700oozie:hadoopOozie spnego.service.keytabHTTP700oozie:hadoopWebHCat spnego.service.keytabHTTP700webhcat:hadoopFor example, to create NameNode principals' (nn, host, and HTTP) keytab files, execute the following commands:
kadmin: xst -k nn.service.keytab nn/NAMENODE kadmin: xst -k spnego.service.keytab HTTP/NAMENODEOn each of the node in your cluster, change directory to the
$keytabdirectory.![[Note]](../common/images/admon/note.png)
Note The location is specified by the
keytabdirproperty in thegsInstaller.propertiesfileCopy the appropriate keytab file on each of node in your cluster.
Step 3: Follow the steps listed in Step - 2 above, to create keytab files according to the following mandatory naming conventions:
| User Name | Principal Name (mandatory naming convention) |
| HDFS User | Value specified for hdfsuser.headless.keytab property in master-install-location/gsInstaller/gsInstaller.properties file. |
| HBase User | Value specified for hbaseuser.headless.keytab
property in
master-install-location/gsInstaller/gsInstaller.properties
file. |
| Smoke Test User | Value specified for smoke_test_user.headless.keytab property in master-install-location/gsInstaller/gsInstaller.properties file. |
Step 4: Use the klist utlity on each of your service to verify that the correct keytab files and principals are associated with the correct service. For example, to verify the keytabs for the NameNode, execute the following command:
klist –k -t /etc/security/nn.service.keytab

