1836768 Members
2246 Online
110109 Solutions
New Discussion

Re: TMOUT

 
C.I.S
Frequent Advisor

TMOUT

I am using the variable TMOUT to disconnect inactive users. But, the TMOUT counter suspends if the users are running vi or other utilities or applications. In this situation, Is there a way to disconnect inactive users?
and is there a way to activate TMOUT while the user is running an application using
# exec program
7 REPLIES 7
Santosh Nair_1
Honored Contributor

Re: TMOUT

How about setting up idled...you can get it from:

http://www.darkwing.com/idled

it logs out idle users and has loads of other neat functions like the ability to restrict login hours, etc.

-Santosh
Life is what's happening while you're busy making other plans
Eugen Cocalea
Respected Contributor

Re: TMOUT

Hi,

Add a timeout on the terminal, with getty -t.

E.
To Live Is To Learn
C.I.S
Frequent Advisor

Re: TMOUT

I downloaded idled. How to install, configure and use it.
Regarding the getty -t, getty exits if the open on the line succeeds and no one types anything within timeout seconds, i.e before loging. What I need is to logout telnet sessions, users already loged in but idled for a long time
A. Clay Stephenson
Acclaimed Contributor

Re: TMOUT

The TMOUT variable only comes into play when the user is in the foreground of the shell. Being able to knock users off the system is rather tricky. While vi may be safe suppose that the user is running a batch database application?

Regards, Clay
If it ain't broke, I can fix that.
C.I.S
Frequent Advisor

Re: TMOUT

In our case, we have no problems if we kill the idled sessions, and this will cause no harm on the applications
C.I.S
Frequent Advisor

Re: TMOUT

Are there Any replies Please?
It's critical
Roger Baptiste
Honored Contributor

Re: TMOUT



What you can probably do is to set up
a script which checks the users logged in
who |grep -v root |grep -v oracle (and so on)

Pick users who are logged in more than a day.
(a grep on the Month would be sufficient)

From this list, do a ps -u $userid on
each user. If it lists valid processes,
then skip the user, otherwise kill the
shell/login pid of the user.

Then, run this job through cron at periodic
intervals. I used this method in the past.

But, be sure about it, since you dont
want to knock of valid users .
HTH
raj
Take it easy.