SUMMARY; Limiting logins

From: Ibrahim_Altahan@magna.on.ca
Date: Thu Jul 04 2002 - 08:25:00 EDT


The best answer came from Dennis, thank you. Add the following line in
the top of /etc/profile

#
# (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
# ALL RIGHTS RESERVED
#
#
# OSF/1 Release 1.0

trap "" 2 3

export LOGNAME TERM

#---------------------- START SESSION LIMIT ----------------------

EXCLUDELIST="/etc/profile.session.exclude"
if [ ! -z "$LOGNAME" ]; then
        if [ `grep -w $LOGNAME $EXCLUDELIST` ]; then
                :
        else
                LOGCNT=`who | grep -w $LOGNAME | wc -l`
                if [ "$LOGCNT" -gt "1" ]; then
                        clear
                        echo "\n\n\n...Only ONE session allowed per
user...\n\n\n"
                        exit 1
                fi
        fi
fi

#----------------------- END SESSION LIMIT -----------------------

....the rest of the global profile......

Ibrahim
"CONFIDENTIALITY NOTE: This message contains information which may be
privileged or confidential. If you are not the intended recipient, please
delete the e-mail and any attachments and notify us immediately by return
e-mail to the sender. Thank you in advance for your assistance."



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:45 EDT