tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* disallow duplicate login
@ 1996-03-27 11:22 Chua Koon Teck
  0 siblings, 0 replies; only message in thread
From: Chua Koon Teck @ 1996-03-27 11:22 UTC (permalink / raw)
  To: tru64-unix-managers

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-----

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-03-27 11:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-27 11:22 disallow duplicate login Chua Koon Teck

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