3 # krb5_login.sh - obtain and cache Kerberos ticket-granting ticket
5 ###############################################################################
8 # nothing need for root
10 [ $UID -eq 0 ] && exit 0
13 # list Kerberos 5 credentials silently
15 # 0 - klist finds a credentials cache
16 # 1 - klist does not find a credentials cache or the tickets are expired
20 # get the user name for uid $UID
21 GSS_USER=$(getent passwd $UID | cut -d: -f1)
23 GSS_PASS=${GSS_PASS:-"$GSS_USER"}
25 echo "***** refresh Kerberos V5 TGT for uid $UID *****"
26 if [ -z "$GSS_PASS" ]; then
29 echo $GSS_PASS | kinit