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

Revision 24039, 1.2 KB checked in by broder, 15 years ago (diff)
In ssh-server-config: * Put a blank line before and after any ticket/token warnings.
Line 
1# Warn the user if they log in without tickets or tokens
2
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=""
8
9    # Check for tickets
10    klist -s
11    if ("$?" == 0) then
12        set tickets="yes"
13    endif
14
15    # Check for tokens
16    tokens | grep -q 'athena\.mit\.edu'
17    if ("$?" == 0) then
18        set tokens="yes"
19    endif
20
21    if ("$tokens" != "yes" && "$tickets" != "yes" && ! -r ~/.cshrc) then
22        echo >/dev/stderr
23        echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >/dev/stderr
24        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
25        echo >/dev/stderr
26    else if ("$tokens" != "yes" && ! -r ~/.cshrc) then
27        echo >/dev/stderr
28        echo "WARNING: You have no valid AFS tokens." >/dev/stderr
29        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
30        echo >/dev/stderr
31    else if ("$tickets" != "yes") then
32        echo >/dev/stderr
33        echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr
34        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
35        echo >/dev/stderr
36    endif
37endif
Note: See TracBrowser for help on using the repository browser.