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_at_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-----
Received on Wed Mar 27 1996 - 12:54:36 NZST