- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Set session timeout for console / remote access
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-21-2006 02:24 PM
06-21-2006 02:24 PM
I have HPUX 11.11 and 11.00 systems.
1. If a person login directly to the console, how do i set a session timeout if the person left the console for a long period of time. This practice to 'cut off' the session is a must in our IT security guidelines.
2. I am using puTTY (ssh) and winscp (sftp) to remotely telnet and ftp files from the HPUX system. If a person ssh / sftp to the system from the remote PC, how do i set the session time out for it?
Appreciate your guys advise. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 02:45 PM
06-21-2006 02:45 PM
SolutionUNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 02:46 PM
06-21-2006 02:46 PM
Re: Set session timeout for console / remote access
By setting the TMOUT environment variable to a non-zero number of seconds after the ${PS1} is last displayed , the shell will automatically terminate. This will not terminate processes which run under the shell --- which is a good thing. It is state of the art dumb to have a watchdog daemon which will automatically terminate seemingly idle because you may be doing a very important task (such as a restore of a large filesystem) that output nothing and yet is actually far from idle. Such daemons have their place but they must be very carefully designed and carefully adminisitered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 01:40 PM
06-22-2006 01:40 PM
Re: Set session timeout for console / remote access
export TMOUT=600
readonly TMOUT
Now, not even root can change the value of TMOUT.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2006 03:07 PM
06-25-2006 03:07 PM
Re: Set session timeout for console / remote access
thanx for the response. I've checked the /etc/profile but couldn't find any TMOUT= or readonly enttry. Should I just vi /etc/profile and put somewhere TMOUT=300 or something is missing in the profile? PLease guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2006 05:46 PM
06-25-2006 05:46 PM
Re: Set session timeout for console / remote access
You need to add the entries to the /etc/profile.
# vi /etc/profile
Add the following lines:
export TMOUT=300
readonly TMOUT
Darrel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2006 06:21 PM
06-25-2006 06:21 PM
Re: Set session timeout for console / remote access
Ok i will try to put the entry
export TMOUT=300
readonly TMOUT
But my other concern is, what if during a specific of time, a remote PC that can sftp (im using winscp) to the HPUX 11.11/00 system is transfering a huge file that may take 1-2 hours to complete, is this TMOUT will terminate the file transfer as well as the session after 5 minutes the PC is left out ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2006 11:22 PM
06-26-2006 11:22 PM
Re: Set session timeout for console / remote access
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 12:50 PM
06-27-2006 12:50 PM
Re: Set session timeout for console / remote access
What a crystal clear answer.
Guys, I've put entry export TMOUT=300
readonly TMOUT and yes the time out session is fully kicking.
Thanx guys for the support. Have a nice day ahead ! Till then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2006 08:33 PM
08-07-2006 08:33 PM
Re: Set session timeout for console / remote access
Clay, what do you means by all the shell command wont terminate? Did you mean the process still running even thr root id has been kick out from the console?
Is any other way to be stay in console too?
Fauziah Mahdan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2006 01:14 AM
08-08-2006 01:14 AM
Re: Set session timeout for console / remote access
HP-UX doesn't really have sessions, just processes that are running, some with a connection to a terminal. When you login, you get a login shell process and that is what TMOUT affects.
> What about tar and restore and fbackup command...
If you start any command (vi, tar, fbackup, etc) the shell stops running and therefore the TMOUT value has no meaning. When the command (actually, a child process of the shell), then the shell starts counting again (from zero).
> Did you mean the process still running even thr root id has been kick out from the console?
The shell will not terminate due to TMOUT until it has been running for that length of time. Waiting for other processes means the shell is not running at that time. So you won't get kicked out.
Now it's important to note that if someone turns off the console or terminates a remote connection like telnet, HP-UX will signal the login shell that a hangup has occured (like hanging up the telephone) so the shell is signaled to terminate using the SIGHUP signal. Normally, the shell will then terminate all subprocesses.
To protect a long process like tar or fbackup from being terminated due to a connection problem, start the process in the background with & and protect the process from SIGHUP using the nohup program like this:
nohup tar cvf /dev/rmt/0m /var /opt &
Now if you remove the power from the console or a remote session is disconnected, the tar process will be transferred to init to continue running.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2006 02:51 PM
08-08-2006 02:51 PM
Re: Set session timeout for console / remote access
Yesterday I run tar command from console, but still after 5 minutes the console log out. TIMEOUT set to 300. Why it still kick me out even I run tar command. I will need to run fbackup for full backup next 18 August which may takes few hrs and I don't want to be kick out from the console but with this timeout setting. How?
Fauziah Mahdan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2006 02:15 PM
08-09-2006 02:15 PM
Re: Set session timeout for console / remote access
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2006 04:09 PM
08-09-2006 04:09 PM
Re: Set session timeout for console / remote access
Sorry after read again your msg I get it.
Sorry.
Will try afterwards.
Thanks
Fauziah Mahdan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2006 03:24 PM
08-31-2006 03:24 PM
Re: Set session timeout for console / remote access
My servers run some applications with licenses limited to a determined number of simultaneous client sections. Since I know some people still connected and goes take a coffe and bla bla bla for a while... Can I drop this connection using some kind of timeout/idletime in terminal (pty), telnetd (server) or network configs?
Ok, I don't want to run a external utility like Watcher (http://www.madgoat.com/watcher.html) showed on other posts. This machine work in very high loads and run extra monitors could stablish a real trouble situation to menage before.
When the user login (through telnetd) your .profile defines the environment and starts the application, so the shell process cannot be used to "TMOUT"...
The system terminals could monitor idleness too?
Best regards,
Eduardo Ribeiro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 02:30 AM
09-01-2006 02:30 AM
Re: Set session timeout for console / remote access
No, the application has control of the terminal session. You must ask the manufacturer of the software how to configure a session timeout. If there is no timeout feature, consider finding another product.
> Ok, I don't want to run a external utility like Watcher (http://www.madgoat.com/watcher.html) showed on other posts. This machine work in very high loads and run extra monitors could stablish a real trouble situation to menage before.
There is nothing in the OS that will accomplish what you want. One way or another, you have to monitor the connections and determine if there is any activity. who -u will indicate how long the terminal has been idle.
> When the user login (through telnetd) your .profile defines the environment and starts the application, so the shell process cannot be used to "TMOUT"...
> The system terminals could monitor idleness too?
Well, first you have to define idleness. Does it mean that the user has not pressed a key on the keyboard? Or does it mean that active data is not flowing in either direction? For example, the application might print to an attached printer and the report takes 2 hours to print. who -u will show no keyboard activity for 2 hours but you would not want to kill that session before the report was finished.
To accomplish what you want will require a fairly complicated program to monitor each copy of your licensed program. The Watcher program appears to only run on VMS, but the principle is still the same -- your program will have to look at some internal pieces of information.
Bill Hassell, sysadmin