Collecting a Kerberos ticket
This script collects and displays all Kerberos tickets in the cache.
Kerberos ticket
BASH
# cat get-ticket.sh
#!/bin/sh
kinit -kt /etc/security/keytabs/hive.service.keytab hive/$(hostname -f)@INDEXIMA.CO
klist
echo ""
Example of get_ticket.sh execution
example
BASH
# ./get-ticket.sh
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: hive/ns391011.co@INDEXIMA.COM
Valid starting Expires Service principal
16:37:46 16:57:00 krbtgt/INDEXIMA.COM@INDEXIMA.COM
------------------------------------------------------------