tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Chua Koon Teck <koonteck () singnet ! com ! sg>
To: tru64-unix-managers
Subject: disallow duplicate login
Date: Wed, 27 Mar 1996 11:22:04 +0000	[thread overview]
Message-ID: <96076330121579.tru64-unix-managers.marc@archive.invalid> (raw)

Hi

Is there anyway to disallow duplicate login in Digital UNIX under 
enhanced security ?  I have currently customised a login shell which 
check for the user's process.  If the user's process exist, then it will 
kill his previous session.  My statement looks like :

lynxid=`ps -ef | egrep "$USER" | egrep bin/lynx|egrep -v grep | awk   
'{printf "%d ", $2}'`
if [ ! -z "$lynxid" ]; then
       /sbin/kill -9 $lynxid
fi

The lynx is a menu which is automatically started off whenever the user
login.  The use of "ps" in the above statement to grep for the user
process use a significant resource on my system which usually has over 300
processes running. 

Is there any better version of "ps" which uses less resource ?  

Is there any feature that is in C2 security  to disallow duplicate login ?  

Is it possible to write a C code to check for the process id and to kill 
it ?

Thank you.

Have a nice day.



Regards


____________________________________________________________________________
Chua Koon Teck	                  	
Singapore Telecom
Comcentre
SingNet			
email=koonteck@singnet.com.sg
URL="http://www.singnet.com.sg/~koonteck"
____________________________________________________________________________

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.i

mQCNAjCz3oAAAAEEALaaeL0E8AJ6NkL2XZI/BLn5UH9W2oy+iwXf+8QolN1NlRuP
EYYgqt9s5pnmR5t1jpl+OWNzYLGiovsEUm8lgtlXrVFtI+SpsJTrA+tvpyRL0UNu
bAVeMZTc2g9loHF5zab0AIG7QUrTu88oUJjDHMThpxdFLzJ0CKFv0KQasFflAAUR
tChDaHVhIEtvb24gVGVjayA8a29vbnRlY2tAc2luZ25ldC5jb20uc2c+
=4XZx
-----END PGP PUBLIC KEY BLOCK-----

                 reply	other threads:[~1996-03-27 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox