[K12OSN] Kill all your users
sbarar at gmail.com
Tue Dec 12 02:06:05 UTC 2006
On 12/12/06, David Trask <dtrask at vcsvikings.org> wrote:
> Kill 'em all! (at the end of the day) ;-)
> Here's how I do it. I have a script called "stop" located in /usr/bin.
> It's designed originally to "kill" a single user, but I have taken that
> script and made another script that can be launched as a cron job to
> "purge" the server. First the "stop" script....
> # usage stop username
> # stop
> # script to logoff a student
> if [ $1 != "root" ]
> for i in $(pgrep -u $1)
> kill -9 $i
> echo "Can't kill the root!!"
I'd rather leave a few UID's that are not killed by specifying UID's
above 1000 (we allot UID's below 1000 only to system people) so that
any screen or wget's running in background mode are not killed when
left for large downloads overnight.
More information about the K12OSN