Re: Restricting logins

From: terry.german@PHONES4U.CO.UK
Date: Tue Apr 27 2004 - 09:51:34 EDT


Before acting on this e-mail or opening any attachments you are advised to read
The Caudwell Holdings group of companies' disclaimer at the end of this e-mail.
=======================================================

William,

Try adding the below to the top of there .profile... We use it here and it
works fine.

##########################################################################
# Check if user is already logged in as only one login is allowed
ME=`who am i | awk '{print $1}'`
echo $ME | grep "^put the user id here" >/dev/null
if [ $? -eq 0 ]
then
  LOGCNT=`who |awk '{print $1}'| grep "^$ME$"| wc -l`
  if [ $LOGCNT -gt 2 ]
  then
        echo $ME >/tmp/2logins.lst
        echo Sorry, you are already logged in. Please finish current task
and
        echo then continue with the new task. You are now limited to 2
login.
        sleep 9
        logout
  fi
fi
############################################################################

the part "if [ $LOGCNT -gt 2 ]" say if they are already 2 login then they
are not allowed another.

Hope this helps mate.

Thanks

-----Original Message-----
From: William Capeless [mailto:CAPELW@MMC.ORG]
Sent: 27 April 2004 14:36
To: aix-l@Princeton.EDU
Subject: Restricting logins

Hello all,

Is there an easy way to restrict a USERID to a single login on a system? We
have some users who are sharing their passwords, and sometimes find a single
USERID logged in several times at once. Management has forbidden us from
pummeling the user about the head with large heavy objects.

Thanx,
           Bill Capeless

William Capeless
System Software Specialist
Maine Medical Center
22 Bramhall St.
Portland, Maine 04102
(207) 871-6512
capelw@mmc.org <mailto:capelw@mmc.org>

=======================================================
Confidentiality Notice
This e-mail is confidential and intended for the use of the named recipient only.
If you are not the intended recipient please notify us by telephone immediately
on +44(0)1782 600600 or return it to us by e-mail. Please then delete it from
your system and note that any use, dissemination, forwarding, printing or copying
is strictly prohibited.

Any views or opinions are solely those of the author and do not necessarily
represent those of The Caudwell Holdings group of companies.

Encryptions and Viruses
Please note that this e-mail and any attachments have not been encrypted.
They may therefore be liable to be compromised. Please also note that it is your
responsibility to scan this e-mail and any attachments for viruses. We do not,
to the extent permitted by law, accept any liability (whether in contract, negligence
or otherwise) for any virus infection and/or external compromise of security and/or
confidentiality in relation to transmissions sent by e-mail.

Monitoring
Activity and use of The Caudwell Holdings group of companies' systems is monitored
to secure its effective use and operation and for other lawful business purposes.
Communications using these systems will also be monitored and may be recorded to
secure effective use and operation and for other lawful business purposes.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:51 EDT