Killing Idle Users

Taking care of your Linux box.

Killing Idle Users

Postby linuxgeek » Sat Aug 10, 2002 10:42 am

Hi there,


Here is a script for killing idle users after a 10 hr mark!
------- cut here ----------

who -u | cut -c 1-10,39-50 | grep 10: > current
for each IDLE_USR ( `cat current | awk '{print $3}'` )
kill -9 $IDLE_USR
end
exit (0)

------- cut here ----------

Enjoy

--uppal
Junaid Saeed Uppal
uppal at linux dot net dot pk
Cell : +92.345.8586045
linuxgeek
Site Admin
 
Posts: 195
Joined: Wed Aug 07, 2002 8:00 pm
ICQ: 15619696
Website: http://www.linux.net.pk
AOL: pakipenguin
Location: Multan, Pakistan

Postby fawad » Sat Aug 10, 2002 7:48 pm

Probably not a good thing to do in general use. The user could be compiling a kernel etc, so might have left the session running.
fawad
Site Admin
 
Posts: 918
Joined: Wed Aug 07, 2002 8:00 pm
ICQ: 17672437
Website: http://www.fawad.net
WLM: fawadhalim@hotmail.com
Yahoo Messenger: fawad2048
AOL: fawadhalim
Location: Addison, IL

Postby linuxgeek » Sat Aug 10, 2002 8:07 pm

fawad wrote:Probably not a good thing to do in general use. The user could be compiling a kernel etc, so might have left the session running.



Umm.. just for servers where you give free shell accounts .. or to kick off users who do idling
Junaid Saeed Uppal
uppal at linux dot net dot pk
Cell : +92.345.8586045
linuxgeek
Site Admin
 
Posts: 195
Joined: Wed Aug 07, 2002 8:00 pm
ICQ: 15619696
Website: http://www.linux.net.pk
AOL: pakipenguin
Location: Multan, Pakistan

huh?

Postby animal » Mon Oct 21, 2002 5:50 pm

you ain't need any script. just get a gun n kill those bastardz!!!!
animal
 


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron