SUMMARY; Limiting logins

From: <Ibrahim_Altahan_at_magna.on.ca>
Date: Thu, 04 Jul 2002 08:25:00 -0400

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."
Received on Thu Jul 04 2002 - 12:33:30 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT