- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Politely telling a user to log off ...
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
05-28-2002 10:19 AM
05-28-2002 10:19 AM
Is there a way to do this politely? Or more politely than killing telnetd per session? More politely than killing shells?
I suspect that you security folks will be better equiped to answer this than the general admin forum ... Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:32 AM
05-28-2002 10:32 AM
Solution-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:36 AM
05-28-2002 10:36 AM
Re: Politely telling a user to log off ...
Send them a 'wall' message (see man pages) with the text of your choice. Let them know a couple of times that n-minutes remain and then 'kill -15'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:38 AM
05-28-2002 10:38 AM
Re: Politely telling a user to log off ...
Best way is to send wall mesage and if the users dont respond then execute a kill -15
If the users are not on their seat then kill -15 and then kill -9 command.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:38 AM
05-28-2002 10:38 AM
Re: Politely telling a user to log off ...
1) Display some message about the "maximum allowed operating time" while the user logs in ( in the profile file ? echo ?), if the time has been pre-determined for that user.
2) Display the message to the user/users using write(1) or wall(1m)
3) Find out the processes running by the user
4) Kill those starting from the *child* processes (kill -15)
5) Kill the session at the last
my 2 cents ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:39 AM
05-28-2002 10:39 AM
Re: Politely telling a user to log off ...
Give them a a warning on login and also via their .profile echo back to them time remaining with a 15, 10 and 5 min countdown.
If you can give them an extension option, i.e. if they enter a specific command then that is logged and it would allow a further 30 min.
Fun to script but not impossible.
Just an idea
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:54 AM
05-28-2002 10:54 AM
Re: Politely telling a user to log off ...
1) I don't see kill -4 in the kill man page. What signal is this?
2) kill -15 appears to be the default kill level.
3) Is there a quick script or kill option which will do the 'child first' killing? I am reminded of pstree. What happens if the telnetd session is killed with -15? Do the children not get time to clean up?
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 12:36 PM
05-28-2002 12:36 PM
Re: Politely telling a user to log off ...
there was a tool named "idled" in the past which checked for inactive users and logged them off - automatically...
Something for you?
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 12:44 PM
05-28-2002 12:44 PM
Re: Politely telling a user to log off ...
By the way, I would NEVER routinely kill with kill -9 as part of a routine watchdog daemon. With kill -9, you might very well find that the cure is worse than the disease of idle processes. You stand a very great risk of leaving shared memory segments, message queues, and temp files in place using kill -9.
My preference would be to send the signals in this order: 15,1,2,3,11. Use kill -0 PID after a brief sleep to see if the process is still active before sending the next signal. I think that you will find that kill -11 is almost as sure a kill as kill -9 but does cleanup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 02:06 AM
05-29-2002 02:06 AM
Re: Politely telling a user to log off ...
The script I use however also ensures that no one can login from the first wall message until the reason for them being off the system has gone. You would probably not be surprised at the number of users that will log straight back in after being killed (The living dead !). I also do a selective kill - You may not want/need to kill any other root type logins to do what you want to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 02:36 AM
05-29-2002 02:36 AM
Re: Politely telling a user to log off ...
After that, I asked all users to log off in 5 minutes and after this period I checked the users that is still logged on with "who -u" and use the commands that the others collaboraters said: "kill -15" and "kill -9" if the session is not finished.
T??nia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 03:14 AM
05-29-2002 03:14 AM
Re: Politely telling a user to log off ...
Use the command whodo to find out who's logged in, how long, and what they're doing at the time.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 02:35 PM
06-13-2002 02:35 PM
Re: Politely telling a user to log off ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 01:14 AM
06-14-2002 01:14 AM
Re: Politely telling a user to log off ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 06:48 AM
06-14-2002 06:48 AM
Re: Politely telling a user to log off ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 08:55 AM
06-14-2002 08:55 AM
Re: Politely telling a user to log off ...
There are several ways to disable logins. The following in /etc/profile will stop most users:
echo "Logins are disabled - please try again later"
exit
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 08:59 AM
06-14-2002 08:59 AM
Re: Politely telling a user to log off ...
Er, account ... nothing personal.
I'll consider the implications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 12:45 PM
06-14-2002 12:45 PM
Re: Politely telling a user to log off ...
Ameet