- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Kill dead login
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
Discussions
Discussions
Forums
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
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
тАО11-04-2007 07:06 PM
тАО11-04-2007 07:06 PM
Kill dead login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2007 08:11 PM
тАО11-04-2007 08:11 PM
Re: Kill dead login
First, try setting the parameter TMOUT in the user profile. This will time out idle sessions not in any application.
Second your limit script can provide the user the choice of terminating the old session. User larry for example hung. His session is active. User larry is perfectly empowered to issue a kill on his previous process under all circumstances.
So.
echo "You are already logged in. Do you want to close your previous session?:"
read yesno
If the user answers yes, issue a kill for the process ID the script that limits logins has clearly identified.
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
тАО11-04-2007 08:25 PM
тАО11-04-2007 08:25 PM
Re: Kill dead login
"Second your limit script can provide the user the choice of terminating the old session. User larry for example hung. His session is active. User larry is perfectly empowered to issue a kill on his previous process under all circumstances" ,
can advise the script to terminating the old session ?
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2007 09:14 PM
тАО11-04-2007 09:14 PM
Re: Kill dead login
PID=(ps -ef | grep $username awk '{print $2}')
kill $PID
On its simplest level.
Show me the code you use (not the whole script) to determine how many logins a user has.
ps -ef | grep is inferior to:
UNIX95=1
ps -C $username
But the new code takes time to test.
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
тАО11-04-2007 09:54 PM
тАО11-04-2007 09:54 PM
Re: Kill dead login
I hv modified the /etc/profile to check the no. of user login and control the user login , but the coding is not good , so can advise is there any existing function in Redhat or linux system to control the no. of user login ? if yes , is it OK to merge the function with your script ? thx in advance.