Modify the realm property for
krb5.confandkdc.conffile.![[Note]](../common/images/admon/note.png)
Note Ensure that the realm value in your
krb5.conffile matches with the default value forrealmproperty in yourgsInstaller.propertiesfile.Update the realm property in the
kdc.conffile and copy this file to each node in your cluster.Create the principals for all services in your Hadoop cluster.
Execute the following command:
kadmin: addprinc -randkey $$principal_name/fully.qualified.domain.name@YOUR-REALM.COM
The
$principal_namemust use the following mandatory naming conventions:![[Important]](../common/images/admon/important.png)
Important Upper case name in the FQDN part of the principals does not work with Kerberos. (JIRA: HADOOP-7988)
Table 3.3. Secure deployment - Mandatory naming conventions for principals Service Name Principal Name (mandatory naming convention) NameNode nn and HTTP Secondary NameNode nn, HTTP JobTracker jt TaskTracker tt DataNode dn HBase Master
hbase HBase RegionServer
hbase ZooKeeper zookeeper Hive Metastore hive Oozie oozie Oozie HTTP WebHCat HTTP
Set permissions for keytabs directory to
755.![[Note]](../common/images/admon/note.png)
Note The location of the keytab directory is specified by the
keytabdirproperty in thegsInstaller.propertiesfile.Create keytab files for all services and assign required permissions.
kadmin: xst -norandkey -k $keytab_file_name $principal_name/fully.qualified.domain.name
where, the
$keytab_file_nameuses the following mandatory naming conventions:Table 3.4. 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:hadoopZooKeeper zookeeper.service.keytabzookeeper700zookeeper:hadoopHive Metastore hive.service.keytabhive700hive:hadoopOozie oozie.service.keytaboozie700oozie:hadoopOozie spnego.service.keytabHTTP700oozie:hadoopWebHCat spnego.service.keytabHTTP700webhcat:hadoopOn each of the node in your cluster, change directory to the keytab directory (the location is specified by the
keytabdirproperty in thegsInstaller.propertiesfile).Copy the appropriate keytab file on each of node in your cluster.
Follow the steps listed in Step 2-2 through Step 2-4 above for creating keytab files and principals for the following users. Use the following mandatory naming conventions:
Table 3.5. Secure deployment - Mandatory naming conventions for HDFS service and Smoke test user's keytabs and host principals User Keytab File Name Principal Name Permissions $hdfsuser:hadoop$hdfsuser.headless.keytab$hdfsuser700$smoke_test_user:hadoop$smoke_test_user.headless.keytab$smoke_test_user700$hbaseuser:hadoop$hbaseuser.headless.keytab$hbaseuser700where
$hdfsuseris the user owning HDFS services. For example,hdfs.$smoke_test_useris the user that executes smoke tests to test if your Hadoop cluster is successfully deployed. By default, the value ishdptestuser.$hbaseuseris the user owning HBase services. For example,hbase.

