Operating System - HP-UX
1833540 Members
2768 Online
110061 Solutions
New Discussion

Inactivity timeout for HP-UX 11i

 
SOLVED
Go to solution
Douglas D. Denney
Frequent Advisor

Inactivity timeout for HP-UX 11i

Hello,

I have been trying to determine if there is some sort of default inactivity timeout in HPUX 11i. Whenever I am logged in as root on my server, it times me out after a certain period of inactivity. It does this even though I have set TMOUT to 0, or unset it. Here's an example:

# TMOUT=0; export TMOUT
#
Shell will time out in 60 seconds.
sh: Timed out waiting for input.

Is there a system defined timeout? This only seems to be affecting me on HPUX 11i, not anything lower than that.

Any help would be appreciated.
7 REPLIES 7
Stefan Farrelly
Honored Contributor

Re: Inactivity timeout for HP-UX 11i

If youre using ssh I believe there is a timeout in that, check your sshd_config file, if youre using remsh or telnet then NO, there is no timeout - something else like your router/switch may be timing you out.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Bruno Ganino
Honored Contributor

Re: Inactivity timeout for HP-UX 11i

Try execution of fsck
after reboot the system.
(check of file system and repair it)
HTH
Bruno
Torino (Turin) +2H
Douglas D. Denney
Frequent Advisor

Re: Inactivity timeout for HP-UX 11i

Okay, but if the router/network was killing the process, why would it print "Shell will time out in 60 seconds"? Also, how would a router cause the process to die by printing nice little messages? Wouldn't I just lose the connection?

Thanks.
Stefan Farrelly
Honored Contributor
Solution

Re: Inactivity timeout for HP-UX 11i

Youre right - its not network kit, its definitely TMOUT in your shell which is doing it. Which shell do you use when you login ? (/sbin/sh or /usr/bin/sh or ?) and how do you login to root, simply su - or sudo or ? something in your login process to root is setting TMOUT. According to the manpage it is possible for the shell to be compiled with TMOUT hard set, and you unsetting it or setting it to 0 wont stop it timing out - are you using a special shell ?
Im from Palmerston North, New Zealand, but somehow ended up in London...
Douglas D. Denney
Frequent Advisor

Re: Inactivity timeout for HP-UX 11i

Aha!

Sudo...

Okay, here's how we run things. I log in using a "normal" account, then use sudo to become root and ALSO get a "script" of all my commands (for auditing purposes). We set the value of TMOUT in /etc/profile to be 1800 (30 minutes). What I bet is happening is that it runs the "/etc/sudo /etc/sudotrace" command as root, then the script command as a subprocess of that. I can change the TMOUT for the child process (the one running the script), but I can't change the TMOUT variable for it's parent. That is probably the process that eventually times out.

Does that sound like a plausible explanation?

Thanks for pushing me in the right direction. This has been bugging me for a few months now.
Joe Short
Super Advisor

Re: Inactivity timeout for HP-UX 11i

Also, if you are using C Shell, in HP-UX there is an automatic logout set for 1 hour.
Edit .chsrc for the individual user and add
set autologout = 0
This will turn off the autologout feature.
Or to set it globally, edit the file /etc/csh.login and set the same variable. The variable takes a number that represents the number of minutes of inactivity to wait.
Hope this helps.
Stefan Farrelly
Honored Contributor

Re: Inactivity timeout for HP-UX 11i

yip, sounds plausible to me. Sudo is the culprit.
Im from Palmerston North, New Zealand, but somehow ended up in London...