Question: how to create krb5.keytab file in linux?
Answer: Log on as theKerberos administrator (Admin) and create a principal in the KDC. You can use cluster-wide or host-based credentials. ... 
Obtain the key of the principal by running the subcommand getprinc principal_name .
Create the keytab files, using the ktutil command: