To create a kerberos keytab file on Ubuntu and with the kerberos packages installed (e.g. sudo apt-get install krb5-user )
root@jmcc02:~# ktutil ktutil: addent -password -p myusername@DOMAIN.TLD.COM -k 1 -e RC4-HMAC Password for myusername@DOMAIN.TLD.COM: ktutil: wkt username.keytab ktutil: quit root@jmcc02:~#
After completing those steps there should be a keyfile created in the current directory. That keytab file can be used instead of using a password. For example:
/usr/bin/kinit myusername@DOMAIN.TLD.COM -k -t /root/username.keytab