2 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
5 # krb5_login.sh - obtain and cache Kerberos ticket-granting ticket
7 ###############################################################################
10 # nothing need for root
12 [ $UID -eq 0 ] && exit 0
15 # list Kerberos 5 credentials silently
17 # 0 - klist finds a credentials cache
18 # 1 - klist does not find a credentials cache or the tickets are expired
22 # get the user name for uid $UID
23 GSS_USER=$(getent passwd $UID | cut -d: -f1)
25 GSS_PASS=${GSS_PASS:-"$GSS_USER"}
27 echo "***** refresh Kerberos V5 TGT for uid $UID *****"
28 if [ -z "$GSS_PASS" ]; then
36 set spawnid [spawn /bin/bash]
37 send "export PS1=\"user@host $ \" \r"
39 timeout {puts "timeout" ;exit 1}
45 timeout {puts "timeout" ;exit 1}
51 timeout {puts "timeout" ;exit 1}