Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
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