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.
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
[24039]22        echo >/dev/stderr
[24038]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
[24039]25        echo >/dev/stderr
[24038]26    else if ("$tokens" != "yes" && ! -r ~/.cshrc) then
[24039]27        echo >/dev/stderr
[24038]28        echo "WARNING: You have no valid AFS tokens." >/dev/stderr
29        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
[24039]30        echo >/dev/stderr
[24038]31    else if ("$tickets" != "yes") then
[24039]32        echo >/dev/stderr
[24038]33        echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr
34        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
[24039]35        echo >/dev/stderr
[24008]36    endif
37endif
Note: See TracBrowser for help on using the repository browser.