Operating System - HP-UX
1834799 Members
2809 Online
110070 Solutions
New Discussion

Timed out sessions in HP-UX

 
SOLVED
Go to solution
Srichandan T.
Occasional Advisor

Timed out sessions in HP-UX

I have one doubt. How can I set the Timedout sessions for user logins. Could you please tell me.

Regards,
Srichandan
15 REPLIES 15
Mark Grant
Honored Contributor

Re: Timed out sessions in HP-UX

Use the TMOUT variable in the users .profile.

Set it with

"export TMOUT=30" for a 30 second timeout period.
Never preceed any demonstration with anything more predictive than "watch this"
Bharat Katkar
Honored Contributor

Re: Timed out sessions in HP-UX

Hi Srichandan,
Set the TMOUT variable either in /etc/profile ( if you want it for all users) or in .profile file for that particular user in his Home Directory.

Regards,
You need to know a lot to actually know how little you know
Robert-Jan Goossens
Honored Contributor

Re: Timed out sessions in HP-UX

Hi,

Take a look at the TMOUT environment setting. you could add this to a $HOME/.profile

# TMOUT=seconds;export TMOUT

Regards,
Robert-Jan
Srichandan T.
Occasional Advisor

Re: Timed out sessions in HP-UX

Thanks a ton for your replies. I tried the same, but it did n't work. I have one login server, in this server for all the user i have to set Timed Out sessions, since they open so many processes for a such a long time and it is causing for server performance slow down.

Can you please guide me.

Regards,
Srichandan
Bharat Katkar
Honored Contributor

Re: Timed out sessions in HP-UX

Hi Srichandan,
What did you do exactly. Let us know whether you have added TMOUT variable and exported it? if so where.
Actually it should work...something wrong with the procedure followed.

Regards,
You need to know a lot to actually know how little you know
Srichandan T.
Occasional Advisor

Re: Timed out sessions in HP-UX

Bhrath,
I have added (TMOUT=900;export TMOUT) this line in $HOME/.profile file. As per this after 15 minutes user session will be closed. Can you please let me know how to do that.

Regards,
Srichandan
Naveej.K.A
Honored Contributor

Re: Timed out sessions in HP-UX

It will get disconnected only after 15 minutes of idle time, not after 15 minutes you got connected..

with best wishes
Naveej
practice makes a man perfect!!!
Naveej.K.A
Honored Contributor

Re: Timed out sessions in HP-UX

hi sri,

man leave

could be of help to you

with best wishes
Naveej
practice makes a man perfect!!!
Fabio Ettore
Honored Contributor

Re: Timed out sessions in HP-UX

Hi,

which shell are you using?

ksh
csh
sh
....

Best regards,
Ettore
WISH? IMPROVEMENT!
Bharat Katkar
Honored Contributor

Re: Timed out sessions in HP-UX

Hi Sri,
Ask that user to login. Then just minimize that windows and sit idle for 15 min. Do not do any activity in that session. Monitor this from other session may be you log in as root from somewhere else.
# w
this will show the session that user logged in. Now as soon as the User logs in check the Idle field in above output for that user. As soon as it reaches 15 min. it will get timeouted.
Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Srichandan T.
Occasional Advisor

Re: Timed out sessions in HP-UX

Hi Bharath, Naveen & fabio,
Thanks a lot.. its working fine.

Regards,
Srichandan
Naveej.K.A
Honored Contributor
Solution

Re: Timed out sessions in HP-UX

hi sri,

If its working Please assign points to the replies which helped u.

regds
naveej
practice makes a man perfect!!!
Albert Smith_2
New Member

Re: Timed out sessions in HP-UX

Just be careful, the variable TMOUT works --unless the user re-exports it to a higher value, (max being 1316134911 seconds.) The user can't simply unset TMOUT, they must actually set it higher.
So this is based on the honor system and obscurity.
Albert Smith_2
New Member

Re: Timed out sessions in HP-UX

Here's a quick perl program that you can run in root's crontab that will notify and terminate user sessions.
I run it every 5 minutes.
Albert Smith_2
New Member

Re: Timed out sessions in HP-UX

Correction to perl script above...
Remove line # 76 (unless($uname eq "asmith"...) as it is only used for testing.