Operating System - HP-UX
1823121 Members
3361 Online
109646 Solutions
New Discussion юеВ

How to unset TMOUT temporarily

 
SOLVED
Go to solution
Jorge Fabregas
Regular Advisor

How to unset TMOUT temporarily

Hello everyone,

I'm learning HP-UX and this is my first question on the forums :)

I always like to set the TMOUT variable in the .profile of the root user on all my servers. One thing I noticed in HP-UX is that I'm unable to unset the variable. On Linux, I have the variable in .bash_profile and whenever I know I'm going to be working for a while I do a "unset TMOUT" and I'm not kicked out for the time period specified in the variable.

On HP-UX, I have my TMOUT for 60 seconds. No matter if I do "unset TMOUT" ...I'll get the timeout msg at 60 seconds after login. It seems there's no way to turn off the timeout feature once you declare the variable. If I do "echo $TMOUT", after unsetting it, the variable is not there, so I'm unsetting it properly. Is there something I'm missing?

Thanks in advance,
Jorge
8 REPLIES 8
Stanimir
Trusted Contributor

Re: How to unset TMOUT temporarily

So after "login" you pass again through
.profile and may be you is setting this variable again.
Robert-Jan Goossens
Honored Contributor

Re: How to unset TMOUT temporarily

Hi Jorge,

If you would to "unset" TMOUT you just have to export it again.

Regards,

Robert-Jan.
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to unset TMOUT temporarily

Hi Jorge:

# export TMOUT=0

...will set an infinite timeout.

Regards!

...JRF...
Hai Nguyen_1
Honored Contributor

Re: How to unset TMOUT temporarily

Jorge,

# export TMOUT=

also sets an indefinite timeout.

Hai
Jorge Fabregas
Regular Advisor

Re: How to unset TMOUT temporarily

Thanks everyone for taking the time to help me.


Andrew Cowan
Honored Contributor

Re: How to unset TMOUT temporarily

Any root admin worth his salt will have set TMOUT as readonly (in /etc/PROFILE), in which case you can't change/unset it. However all you have to do is to enter "read" at the command line and hit enter, the shell will then sit there indefinately, or until you hit enter again.

Pete Randall
Outstanding Contributor

Re: How to unset TMOUT temporarily

Andrew,

I'm unaware of the method used to set a variable read-only, could you shed some light on my ignorance, please?


Pete


Pete
Sundar_7
Honored Contributor

Re: How to unset TMOUT temporarily

Hi Pete,

# typeset -r variable
# variable=somevalue
sh: variable: This variable is read only.
#

Thanks,

Sundar.
Learn What to do ,How to do and more importantly When to do ?