- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Enforcing shell timeout?
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
07-23-2007 09:05 PM
07-23-2007 09:05 PM
Enforcing shell timeout?
Currently I'm doing it by executing 'typeset -r TMOUT=
Unfortunately it also prevents them from specifying a shorter timeout, if they wish to do so. Plus, it seems to conflict with certain apps that try to modify it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 12:18 AM
07-24-2007 12:18 AM
Re: Enforcing shell timeout?
you'll have to use some scripting.
I would look for an optional config file ~/.tmout
where the user could specify something like
TMOUT=nnn
and in /etc/profile use something like this:
tmout_default=1024
if [ -s $HOME/.tmout ]
then
usrtmout=$(awk -F= '$1=="TMOUT" {print $2}' $HOME/.tmout)
[ "$usrtmout" -gt $tmout_default ] && unset usrtmout
if
typeset -r TMOUT=${usrtmout:-$tmout_default}
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 11:49 AM
07-24-2007 11:49 AM
Re: Enforcing shell timeout?
Any other ideas for how to do that?
P.S. Something that went though my mind is to compile the shell from source, but edit the source code beforehand and hard code a maximum value in there. The problem with that is that I might only be able to do it for bash & tcsh, since I'm not sure if I can find the source for the HP-UX ksh & dtksh.
Also, there's alway the possibility that I'll mess up and create bugs. Haven't done any serious coding in a while...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 11:59 AM
07-24-2007 11:59 AM
Re: Enforcing shell timeout?
> Something that went though my mind is to compile the shell from source, but edit the source code beforehand and hard code a maximum value in there. The problem with that is that I might only be able to do it for bash & tcsh, since I'm not sure if I can find the source for the HP-UX ksh & dtksh.
You won't be able to obtain the source for HP-UX released versions.
That aside, I've "been-there-done-that" in "another life" many years ago. As a then mainframe systems programmer I had source code and was used to developing patches as work-arounds and customizations. The problem was always re-engineering the patch and re-certifying it as new releases and vendor-supplied enhancements appeared.
Put your creative efforts to use in another way. Peter's suggestion is a good one.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 06:49 PM
07-24-2007 06:49 PM
Re: Enforcing shell timeout?
additionally you should check the setting of a user-timeout not being zero: This could mean NO timeout in some shells!
mfG Peter
PS: Of course you could permit this as a 'feature'...