From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076330121579.tru64-unix-managers.marc@archive.invalid> From: Chua Koon Teck Date: Wed, 27 Mar 1996 11:22:04 +0000 To: tru64-unix-managers Subject: disallow duplicate login X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076330121579 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-----