source: trunk/debathena/config/ssh-server-config/debian/10-csh-kerberos-credentials-warn @ 24038

Revision 24038, 1.0 KB checked in by broder, 15 years ago (diff)
Miscellaneous, minor cleanups in shell-config.
RevLine 
[24008]1# Warn the user if they log in without tickets or tokens
2
[24038]3# Check to make sure the user does not have a local account, and that
4# it's an interactive login
5if ("$DEBATHENA_HOME_TYPE" == "afs" && $?prompt) then
6    set tickets=""
7    set tokens=""
[24008]8
[24038]9    # Check for tickets
10    klist -s
11    if ("$?" == 0) then
12        set tickets="yes"
13    endif
[24008]14
[24038]15    # Check for tokens
16    tokens | grep -q 'athena\.mit\.edu'
17    if ("$?" == 0) then
18        set tokens="yes"
19    endif
[24008]20
[24038]21    if ("$tokens" != "yes" && "$tickets" != "yes" && ! -r ~/.cshrc) then
22        echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >/dev/stderr
23        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
24    else if ("$tokens" != "yes" && ! -r ~/.cshrc) then
25        echo "WARNING: You have no valid AFS tokens." >/dev/stderr
26        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
27    else if ("$tickets" != "yes") then
28        echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr
29        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
[24008]30    endif
31endif
Note: See TracBrowser for help on using the repository browser.