On 17 Jul 2003, A.J. Venter wrote: > Looking at your script, I think I can suggest a simpler version > (requires the slay program - just do an FM search, which kills off all > processes for a certain user name); > > #!/bin/sh > #This script will kill all processes started by normal users. It should > #be run from cron daily at midnight. The script does not: > #Affect root or system users (such as appache). > #By using home directories as refferences, we can rule out a system user > #that was accidently misnumbered. > > cd /home > for I in *;do slay $I;done > > #end of script.
Well A.J, you just killed some of the samba stuff ;-), you also killed possibly valid user processes - people *are* allowed to work at night. slay is very brutal (and guess how it achieves a kill). My little script is way oversimplified, but it removes only *old* user processes. New processes don't have month name in ps listing. I don't have anybody coming to work before midnight and lasting to 3am - that's when the script is run and i do have a samba directory in/home (don't ask why :-) julius ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net
