in reply to Kill User

Hmmm...seems overly complicated. I could compact this into two shell lines:
  1. kill user's current ps list
  2. add entry into /etc/.notelnet (or whatever it's called on your system)
Running this as a fake daemon is wasteful. Polling for results is wasteful in most situations, anyway.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
RE: RE: Kill User
by Octavian (Monk) on Oct 30, 2000 at 21:29 UTC
    I used fuser because I was told it was safer to use on peoples programs than just doing a straight kill on them..something to do with hanging CDE or something. And it is never used as a daemon I just ran it, and when done, I hit control - c to break out.
      But the user still has a small window of time to do something we he logs in. You must run this script in an infinite loop as Fastolfe mentioned, POLLING, no worse, and grepping something. If CDE was hanging with SIGKILL, then you should have tried a different signal, perhaps SIGQUIT. You have to run this wasteful script for as long as you want to block the user. I can imagine that this script is eating an unusual amount of processing time when all you need to do is block them from telnetting in, not killing their processes when you see one. This is very inefficient and unsafe code.
      AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.