cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Logout

Bruce eley_1
Occasional Advisor

Auto Logout

My users are running in the /bin/sh shell. Does it support the TMOUT command? If not is there another way to logout idle logins?
9 REPLIES
Ivan Ferreira
Honored Contributor

Re: Auto Logout

Hi Bruce, TMOUT is not a command, is an environmen variable that must be set, for example:

TMOUT=120
export TMOUT

This should be included in the /etc/profile file.

The man page for sh (man 1p sh) gives you info about the variables.

Other options discussed in your previous post, do you remember?

Have a nice day, welcome to the forum, and please, keep assigning points to the answers you get.

http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bruce eley_1
Occasional Advisor

Re: Auto Logout

Thanks for the quick responce. I entered the varialbe in the /etc/profile and set it as follows

TMOUT=120
export TMOUT

when I log in I get -sh: tmout.sh: not found

Your help is greatly appreciated!
Bruce eley_1
Occasional Advisor

Re: Auto Logout

Sorry left out part of the line that I get at login

-sh: tmout.sh:: not found
Ivan Ferreira
Honored Contributor

Re: Auto Logout

Extrange, I just tested with the /bin/sh shell, adding the lines to the profile, and it works without problem.

What OS version are you using (sizer -v).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bruce eley_1
Occasional Advisor

Re: Auto Logout

Tru64 5.1
Kapil Jha
Honored Contributor

Re: Auto Logout

Hi Bruce,
Can you try one more thing open sh or ksh
# export TMOUT=120

sit idle and see if its working.
Because like Ivan mine is also working.
BR,
Kapil
I am in this small bowl, I wane see the real world......
Bruce eley_1
Occasional Advisor

Re: Auto Logout

I have tried that and it never logs the session out.
Khairy
Esteemed Contributor

Re: Auto Logout

hi bruce,

try to set the TMOUT value in the .profile

Add the following line in .profile file.

TMOUT=120 ; export TMOUT

Set it in any users profile and log to system using their user ID. Let us know whether this works.

Rgds
Khairy
Esteemed Contributor

Re: Auto Logout

hi bruce,

i may overlook your question. The tip given by me and other users are for korn shells.

For /bin/sh, set the following in .profile. You can put any value you require. I think 1 is for 60 seconds but i may be wrong.

TIMEOUT=1 ; export TIMEOUT

Try it out and it should works.

Do let us know the outcome!

Rgds