- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User logon session doesn’t expire, even if left th...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 07:37 AM
06-16-2009 07:37 AM
I am using Hpux and linux (redhat and suse).
How to make expiring the system automatically for terminal login [hpux (rlogin / telnet) and linux (ssh)] and xmanger / vnc login (GUI).
how to solve this problem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 07:48 AM
06-16-2009 07:48 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
set the TMEOUT paramter.
This will work for terminal sessions.
But if you run an application after that it will not time out because most applications keep the terminal session thinking there is activity unless they themselves have idle time outs.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 07:58 AM
06-16-2009 07:58 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
posix, ksh and bash have the TMOUT variable. Note this only works when the the user is sitting at a "PS1" prompt. If they've left something open, say "vi" or an app, I don't believe this works.
sh and csh don't have that ability at all as far as I can tell.
CDE / graphical sessions, see:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1254173
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 08:06 AM
06-16-2009 08:06 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
Our network team has a more drastic solution to this problem. I can not say I like the way they do it but security guidelines force them to kill any sessions which are inactive for more than 3600 seconds, by killing the connection between the server and the client. It caused a lot of headaches for long running installations and such, but a necessary evil in my opinion. It is all done at the firewall level and we, as sysadmins, have no control over it. If you have an audit requirement for doing this, talk to your firewall people.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 08:40 AM
06-16-2009 08:40 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
sh == posix shell on HP-UX.
Hmm, I thought the scummy C shell has a similar variable but I can't find it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 08:44 AM
06-16-2009 08:44 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
For that scummy C-shell the equivalent of the Posix TMOUT is 'autologout'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 08:51 AM
06-16-2009 08:51 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
I am using following shells
sh - for HP-Unix
bash - for linux (redhat / suse).
How, where (which file) and what parameter to be set for above mentioned OS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 08:57 AM
06-16-2009 08:57 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
export TMOUT=3600 (* in seconds, always. 3600 = one hour *)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 09:01 AM
06-16-2009 09:01 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
If you use the following you don't have to document it: ;-)
export TMOUT=$(( 1 * 60 * 60 ))
If you are feeling really evil, you can make the variable readonly so users can't change it.
readonly TMOUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 09:06 AM
06-16-2009 09:06 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
For your 'bash' shell, 'TMOUT' should also apply. Set it as you see fit in your '${HOME}/.bashrc'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 09:08 AM
06-16-2009 09:08 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
I had to set the database timeout to 30 minutes by fiat from cranky users.
Then I had to set the natural timeout, which didn't run concurrently to 5 minutes.
Then the user got dumped to a command line and the TMOUT paramter started to work.
As the saying goes. Your mileage may vary.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 09:19 AM
06-16-2009 09:19 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 12:46 PM
06-16-2009 12:46 PM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
yeah, but I'm used to 11.0 and earlier, where "old" sh and posix-sh were installed...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 12:51 PM
06-16-2009 12:51 PM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
I've seen similar. There used to be a script floating around called "idleout" which would find all non-root processes and sort them by user and idle time(descending).
it looked at a config file, and if it found the longest idle time for a given user exceeded the limit set for that user in the config, it would start killing processes.
did wonderful things the first time they put it on a server supporting xwindow apps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 01:02 PM
06-16-2009 01:02 PM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
> OldSchool: yeah, but I'm used to 11.0 and earlier, where "old" sh and posix-sh were installed...
Yes, the old Bourne shell lives (lived) as '/usr/old/bin/sh' whereas the Posix shell is (of course) '/usr/bin/sh' and '/sbin/sh'.
The old Bourne shell was (last) available in 11.11.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 10:51 AM
06-17-2009 10:51 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
I am using HPUX 10.20, 11.00, 11.11.
I have enter following in /root/.profile
TMOUT=10
readonly TMOUT
export TMOUT
I used rlogin session. my session is not disconnecting automatically.
But the above variables is working fine in linux (/root/.bashr).
How to solve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 10:57 AM
06-17-2009 10:57 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
> I used rlogin session. my session is not disconnecting automatically.
And as OldSchool said, are you sitting at the PS1 prompt?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 11:30 AM
06-17-2009 11:30 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
I can not understand your comments.
for your reference.
root@lgsna:/etc/skel > who
opsmgr pts/ta Jun 17 14:23
root pts/0 Jun 17 13:39
root@lgsna:/etc/skel > echo $PS1
root@lgsna:$PWD >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 01:38 PM
06-17-2009 01:38 PM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
Any reason to _export_ this thing which the
"man" page calls a "parameter" (that is, a
shell variable, not an environment variable)?
Who other than the shell would care what it
might be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 12:45 AM
06-18-2009 12:45 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
might be?
A subshell? Otherwise you could easily defeat it by typing ksh or sh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 06:22 AM
06-18-2009 06:22 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
Still i am not able to set the time out variable.
Pls look at my configurations.
1) # vi /root/.profile
export TMOUT=[10]
2) root@lgsna:/root > echo $SHELL
/sbin/sh
3) root@lgsna:/root > env | grep -i TMOUT
No Output.
How to solve this problem
It is very urgent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 06:32 AM
06-18-2009 06:32 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
could you provide the output of
#echo $TMOUT
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 06:54 AM
06-18-2009 06:54 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
1) check the password file to see which shell is actually being run
2) check the "man" page for that shell to see if TMOUT is supported.
3) which is it, as you wrote:
"export TMOUT=[10]" one place
and
"TMOUT=10
readonly TMOUT
export TMOUT"
another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 08:46 AM
06-18-2009 08:46 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
root@lgsna:/root > echo $TMOUT
0
I have tried both the entries in /root/.profile file.
"export TMOUT=[10]" one place
and
"TMOUT=10
readonly TMOUT
export TMOUT"
But it is not working fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 08:55 AM
06-18-2009 08:55 AM
Re: User logon session doesn’t expire, even if left the system logged on for a long time.
Do
TMOUT=10 or [10]
export TMOUT
echo $TMOUT
and post the output.
Regards
Sunny