[comp.unix.questions] How do I use ksh TMOUT on 5.2

txr98@wash08.UUCP (Timothy Reed) (06/08/88)

hopefully easy question: how  do I access the  TMOUT variable to zap  an
idle user.  Ideally I'd  like to trap it in  a user's login shell.   MKS
doc indicates  that TMOUT's  sends  a SIGALRM,  but  ksh does  not  seem
recognize such a signal on the unix 5.2  system I am running ksh on.   I
manually set TMOUT to '1', and got a 'shell timeout in 60 seconds'  with
every tap of the return key!
Thanks in advance...
+-------------------------------------------------------+
| Timothy Reed - American Chemical Society              |
| UUCP:   ..uunet!wash08!txr98                          |
| USMAIL: 1155 16th NW^MRoom 412^MWashington, DC 20036  |
| VOICE:  202 872-6018                                  |
+-------------------------------------------------------+

kluft@hpcupt1.HP.COM (Ian Kluft) (06/10/88)

> / txr98@wash08.UUCP (Timothy Reed) /  3:29 pm  Jun  7, 1988 /
> hopefully easy question: how  do I access the  TMOUT variable to zap  an
> idle user.  Ideally I'd  like to trap it in  a user's login shell.   MKS
> doc indicates  that TMOUT's  sends  a SIGALRM,  but  ksh does  not  seem
> recognize such a signal on the unix 5.2  system I am running ksh on.   I
> manually set TMOUT to '1', and got a 'shell timeout in 60 seconds'  with
> every tap of the return key!
> Thanks in advance...
> +-------------------------------------------------------+
> | Timothy Reed - American Chemical Society              |
> | UUCP:   ..uunet!wash08!txr98                          |
> ... etc.

If you want everyone on your system to have their KSH time out after, say,
5 minutes, set TMOUT in the /etc/profile to 5*60 seconds or 300.  This
would be the line you'd add to /etc/profile:

TMOUT=300; export  TMOUT; readonly TMOUT

With the readonly on there, the users cannot change or unset it in their
login shell.

Ian Kluft		HP Network Systems Group
hplabs!hprasor!kluft	Cupertino, CA

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (06/10/88)

In article <130@wash08.UUCP> txr98@wash08.UUCP (Timothy Reed) writes:
| hopefully easy question: how  do I access the  TMOUT variable to zap  an
| idle user.  Ideally I'd  like to trap it in  a user's login shell.   MKS

TMOUT is in seconds. For ten minutes set it to 600. You might set it in
/etc/rc and then make it readonly. I do something similar for my guest
users.

-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me