It is possible to automatically get a Kerberos Ticket (kinit) generated everytime you login via SSH to a host by editing “.bash_profile”. This also applies to a scenario wherin you are using Red Hat IDM/IPA and want to automate “kinit” instead of a user have to manually type in kinit everytime they login.
You need to edit .bash_profile for root and that would be replicated across all user logins of the host.
Edit /etc/skel/.bash_profile and add “kinit” in a new line.
# vi /etc/skel/.bash_profile
After adding kinit as given above exit the file and the logoff and login back to the host. You will notice a change and that you will get 2 password prompts and new Kerberos ticket will be generated at the same time.
You can check the Kerberos Ticket (TGT) by issuing “klist”.
That’s it all done.
If you encounter any errors during the process, let us know via Contact Us and will try our best to help.