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

Revision 24039, 1.0 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 
[24038]1# If a user logs in without tickets and tokens, display a warning
2# message to let them know
[24008]3
[24038]4# Check to make sure the user does not have a local account, and that
5# it's an interactive login
6if [ "$DEBATHENA_HOME_TYPE" = "afs" ] && [ "$PS1" ]; then
7    tickets=
8    tokens=
[24008]9
[24038]10    # Check for tokens
11    if tokens | grep -q 'athena\.mit\.edu'; then
12        tokens="yes"
13    fi
[24008]14
[24038]15    # Check for tickets
16    if klist -s; then
17        tickets="yes"
18    fi
[24008]19
[24038]20    if [ -z "$tokens" ] && [ -z "$tickets" ] && [ ! -r ~/.bashrc ]; then
[24039]21        echo >&2
[24038]22        echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >&2
23        echo "See http://debathena.mit.edu/ssh" >&2
[24039]24        echo >&2
[24038]25    elif [ -z "$tokens" ] && [ ! -r ~/.bashrc ]; then
[24039]26        echo >&2
[24038]27        echo "WARNING: You have no valid AFS tokens." >&2
28        echo "See http://debathena.mit.edu/ssh" >&2
[24039]29        echo >&2
[24038]30    elif [ -z "$tickets" ]; then
[24039]31        echo >&2
[24038]32        echo "WARNING: You have no valid Kerberos tickets." >&2
33        echo "See http://debathena.mit.edu/ssh" >&2
[24039]34        echo >&2
[24008]35    fi
36fi
Note: See TracBrowser for help on using the repository browser.