- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: auto logout user & kill expire process
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
02-24-2005 02:17 PM
02-24-2005 02:17 PM
auto logout user & kill expire process
2) How to automate kill inactive & expire process/session, sometimes user just close the application without proper logout OR with proper logout, but certain process still runnnig with ? when i run ps -ef,
at this moment i just know how to use kill -9 to kill the inactive process
like both users in the attachment file, they already logout from application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 04:20 PM
02-24-2005 04:20 PM
Re: auto logout user & kill expire process
1. You can force a terminal to log out after a period of inactivity by setting the TMOUT and TIMEOUT parameters in the /etc/profile file. The TMOUT parameter works in the ksh (Korn) shell, and the TIMEOUT parameter works in the bsh (Bourne) shell.
The following example, taken from a .profile file, forces the terminal to log out after an hour of inactivity:
TO=3600
echo "Setting Autologout to $TO"
TIMEOUT=$TO
TMOUT=$TO
export TIMEOUT TMOUT
2. Mostly, the user's application will be exited when user session closed except if we used command like "nohub" .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 04:49 PM
02-24-2005 04:49 PM
Re: auto logout user & kill expire process
To drop idle sessioon try using the shell variables such a TMOUT.
The idle telnet session can be automatically cleared by setting the timeout value. A non-zero value specifies the number of minutes to wait before an idle telnet session is timed out. The minimum value is 1 minute, the maximum is 512640 minutes (1 year).
You can sett the TIMEOUT value to 15 minutes in the users profiles who use that application.
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 05:14 PM
02-24-2005 05:14 PM
Re: auto logout user & kill expire process
At my place it is set in /etc/profile for 5 mins.I have added the following
export TMOUT=300
If you need to set timeout only for specific users then add the same entry in .profile for those users.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 06:20 PM
02-24-2005 06:20 PM
Re: auto logout user & kill expire process
i logon with my userID with own profile that bring me to application menu, at the $, is ksh, put TMOUT into .profile, it doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 02:52 PM
03-06-2005 02:52 PM
Re: auto logout user & kill expire process
i put the TMOUT=15 in my home directory .profile, it auto logout & close the session when only i exit from application menu & get the $, refer to attach doc file.
it won't auto logout when i still inside my application menu.
(my requirement is we would like to logout ceratin IDLE users from their application menu)
As for killing inactive/expire process, someone tell my to write a script & put in cron job, does any one have the scripts ?, will it kill of those process started by root or other important users ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 10:51 PM
03-06-2005 10:51 PM
Re: auto logout user & kill expire process
TMOUT won't kill any sessions that have a sub-process (child) running for a good reason: If you're running a program/script that takes a long time, ending it prematurely could cause data corruption.
I've attached a script that I use. Among other things, it checks for old logins and kills them if they have no children, and if they are not on a list of users NOT to kill.
It's designed to be run remotely via ssh, but it also works locally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2005 10:53 PM
03-06-2005 10:53 PM