Operating System - HP-UX
1833883 Members
1484 Online
110063 Solutions
New Discussion

Re: How to automate logouts for inactive users

 
radi_1
Frequent Advisor

How to automate logouts for inactive users

Hi,
I need to force logouts for users who go inactive for a certain period of time.
note the users work through unfixed ttys.
thanks.
never take simple maters for granted
9 REPLIES 9
Michael Tully
Honored Contributor

Re: How to automate logouts for inactive users

Set in each users profile 'TMOUT=3600'
This will timeout a user after one hour.
Change to suit. Be aware that this will not work for CDE users, or users within some sort of application. (use autologout for csh)
Anyone for a Mutiny ?
Steve Steel
Honored Contributor

Re: How to automate logouts for inactive users

Hi


csh

set autologout = 120


ksh and others look at TMOUT

If the TMOUT= environment variable is set to any value greater than 0, the Korn Shell windows will timeout at this specified time.

NOTE. Uses seconds

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Niraj Kumar Verma
Trusted Contributor

Re: How to automate logouts for inactive users

Hi,

you can set the

TMOUT=
Niraj.Verma@philips.com
Rainer von Bongartz
Honored Contributor

Re: How to automate logouts for inactive users

SET

TMOUT=

in /etc/profile or in individual .profiles

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Ollie R
Respected Contributor

Re: How to automate logouts for inactive users

Hi,

You can also do:

readonly TMOUT

which means that users cannot change the timeout.

Without doing this step, a user could quite simply do:

TMOUT=0

and disable the auto-logout.

Ollie.
To err is human but to not award points is unforgivable
twang
Honored Contributor

Re: How to automate logouts for inactive users

Simply set TMOUT in /etc/profile:

TMOUT=

radi_1
Frequent Advisor

Re: How to automate logouts for inactive users

Thank you all for the quick response,but I would like you to consider 2 things;
1- the users are not hp-ux users,they use an old application i.e PIOPEN.
2-the users do not have individual ID or login names,a group of them login as (finance)the other group login as (pay).So I need to force a certain inactive tty user to logout.(Actually its an application user license problem).
thanks
never take simple maters for granted
T G Manikandan
Honored Contributor

Re: How to automate logouts for inactive users

For sh and ksh you can use

TMOUT=600(in secs)
export TMOUT
Global file /etc/profile

for csh

logout=60(in min)
for all csh users /etc/csh.login
Robert Salter
Respected Contributor

Re: How to automate logouts for inactive users

Here's a script I wrote a few years back to do the same thing, we had some users that needed to be excluded, but a lot of users that would literally walk away from their terminals.

See the attached, it may be dated but it works. We set the idle time to be 30 minutes, anything after that is toast.
Time to smoke and joke