logging out idle logins

How do i go about automatically logging out logins that have not had any activity for ... lets say an hour?
[121 byte] By [twee2003] at [2007-11-25 23:25:07]
# 1

I'm sure there's a few ways to do it, but this way seems pretty good.

Write a script that takes the output from a "w"; cut (or awk) on the "idle" column; send a "kill -9" to the calling tty. However, some users may have jobs running in the backgroud that may need to see ouput from what they are running. There login appears to be idle, but they could have a few jobs in the background.

bhf21279 at 2007-7-5 18:12:00 > top of Java-index,General,Talk to the Sysop...
# 2
Maybe not exactly what you want, but it may be along those lines...use of shell builtins to accomodate autologout... http://forum.sun.com/thread.jsp?forum=152&thread=11236
jeffreys at 2007-7-5 18:12:00 > top of Java-index,General,Talk to the Sysop...
# 3
Thanks!
twee2003 at 2007-7-5 18:12:00 > top of Java-index,General,Talk to the Sysop...