Force user to disconnect if no activity

Does anybody know how to force a user to automatically logoff a UNIX session if there is no keyboard activity for a period of time? We use COBOL and there is a BEFORE TIME option on the ACCEPT command, however, we do not want to change the many programs we have to detect this.

What we really want to have happen is from the UNIX login have some sort of a way to monitor and detect no activity and force the user to disconnect.

Thanks for your help,

There are a number of freeware "idle daemons" out there. Here is one. You can find others with a search engine.

These programs are controversial. And they can be defeated by such tactics as laying a book on the keyboard. User training is the real answer.

definitely not elaborate, but maybe just setting the TMOUT variable in ksh or bash might suit your needs; see the man pages for your shell.

This whole area is system admin is a pain in the butt. Perderabo is right about training, unless you have people who consdier logging in to be a chore, i.e., lazy.

Using TMOUT works (as Google said), so do the idle daemons. But then you get complaints because you set the time out values too large or too small, too hot, too cold... :slight_smile:

Some of our programmers have written little ditties to keep their processes on just about forever -- like this user:

benner     pts/5        Mar  9 10:56

Get people to use the unix lock utility. And if they have a PC used as a terminal then set up mandatory screensavers with passwords. Longterm, you'll be in better shape than trying to kill idle processes. IMO.