home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 10636 < prev    next >
Internet Message Format  |  1994-06-19  |  937b

  1. Path: wupost!uhog.mit.edu!news.kei.com!travelers.mail.cornell.edu!cornell!rochester!udel!itchy.ee.udel.edu!kelleher
  2. From: kelleher@itchy.ee.udel.edu (Jason D. Kelleher)
  3. Newsgroups: alt.sources
  4. Subject: Re: S-Kill [1/1]  Kill by process name.
  5. Date: 10 Jun 1994 17:59:39 GMT
  6. Organization: University of Delaware
  7. Lines: 15
  8. Message-ID: <2ta9mb$8s7@louie.udel.edu>
  9. References: <2slfh2$f19@oak.oakland.edu> <CqsGEH.J0o@cbfsb.cb.att.com> <MAZER.94Jun5144951@asterix.etho.caltech.edu> <1994Jun9.092416.1@ma208a.lamar.edu>
  10. NNTP-Posting-Host: itchy.ee.udel.edu
  11.  
  12.     Here's my "user killer".
  13.  
  14. #!/bin/csh -f
  15. if ( $#argv < 1 ) then
  16.         echo "Usage: masskill username..."
  17.         exit
  18. endif
  19. if ( "$1" == "root" || "$1" == `whoami` ) then
  20.         echo ""; echo "That wouldn't be very prudent.  Now would it?"; echo ""
  21.         exit
  22. endif
  23. foreach user ($argv[1-])
  24.         /usr/bin/kill -15 `/bin/ps -augx | egrep "^$user" | awk -e '{print $2}'`
  25. end
  26.  
  27.