- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disconnect user idles
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
10-10-2002 12:32 PM
10-10-2002 12:32 PM
Disconnect user idles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 12:34 PM
10-10-2002 12:34 PM
Re: Disconnect user idles
One way is to set the TMOUT environment variable. If they have no activity after the number of seconds specified in TMOUT they will be disconnected. Here is a snippet from the sh-posix man page:
TMOUT If set to a value greater than zero, the shell will
terminate if a command is not entered within the
prescribed number of seconds after issuing the PS1
prompt. (Note that the shell can be compiled with a
maximum bound for this value which cannot be exceeded.)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 12:34 PM
10-10-2002 12:34 PM
Re: Disconnect user idles
There's several ways to do this. The easiest way & the way I prefer is to put
TMOUT=1800
in the users .profile
This will terminate their shell after 30 minutes of inactivity.
If you put this in the /etc/profile file it will apply to ALL users.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 12:35 PM
10-10-2002 12:35 PM
Re: Disconnect user idles
Use TMOUT for non c-shells and autologout for c-shell.
Edit /etc/profile and keep an entry at the end like
TMOUT=1800
export readonly TMOUT
this will time out the shells after 30 mins of idle time.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 12:37 PM
10-10-2002 12:37 PM
Re: Disconnect user idles
export TMOUT
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 12:37 PM
10-10-2002 12:37 PM
Re: Disconnect user idles
For kshell users TMOUT parameter will do the same.
In /etc/profile define
TMOUT=1800
readonly TMOUT
This way all shell prompts will get terminated after 30 min. of inactivity.
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 01:25 PM
10-10-2002 01:25 PM
Re: Disconnect user idles
Naturally you'll want to export the TMOUT variable from each users' .profile or selectively from the /etc/profile. This takes care of those idle and jobless login shells.
However, this problem extends beyond the login shell. We also need to address how to deal with users who login to an application and walk away. If the application itself doesn't timeout, how do we gracefully terminate it and the login. Now the problem isn't so easy. The solutions depend on how well behaved are the applications and login profiles.