- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Logout a user
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
тАО08-20-2002 11:26 AM
тАО08-20-2002 11:26 AM
I wanna know how can I logout a user???
I'm logged on a workstation with root vi a rlogin. On that station there's a user who has stay connected and I need to log it out...
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 11:28 AM
тАО08-20-2002 11:28 AM
SolutionYou can kill that session, if you have the rights to do that. Make sure you are not throwing out somebody who is working now:
# who
# whodo
# ps -aef | grep user_name
get the PID and process lists and issue kill command:
# man kill
# kill -15 (or, -13,5,9 etc)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 11:29 AM
тАО08-20-2002 11:29 AM
Re: Logout a user
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 11:32 AM
тАО08-20-2002 11:32 AM
Re: Logout a user
You can also find the PID (to kill) through who -u
Good luck,
Kel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 11:32 AM
тАО08-20-2002 11:32 AM
Re: Logout a user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 11:32 AM
тАО08-20-2002 11:32 AM
Re: Logout a user
Please be sure that the user's session is idle. The following command will kill the user's connection which in turn, should terminate all processes spawn within the session.
# kill -9 `who -u | grep
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 01:38 PM
тАО08-20-2002 01:38 PM
Re: Logout a user
Only use the kill -9 as a last resort as you could end up with zombie processes.
Also if the user is connected to a database such as Informix and I guess Oracle its good practice to drop the connection to the database first using the database engines commands. If you are using Informix then let me know on this link and i'll post up my kill script which checks for Informix database connections,logs the SQL, drops the connection and then kills any shell processes with a -15 then waits and if still active will then prompt for an ok to kill -9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2002 01:42 PM
тАО08-20-2002 01:42 PM
Re: Logout a user
To kill the user, just find the user's process ID and then use the kill -9 or 15. You might know to use the 'who' commnad
who -u
kill -9 or kill -15
but what u might not know if that is u use
who -m
this would give u the PID for ur login. So kill every user except the one which come from who -m. I hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2002 07:16 AM
тАО08-21-2002 07:16 AM
Re: Logout a user
/sbin/init.d/dtlogin.rc stop
Then:
/sbin/init.d/dtlogin.rc start
I kept an eye on things afterwards and there were no problems. Maybe someone here in the forums knows a reason why this should not be done, all I know is that it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2002 08:10 AM
тАО08-21-2002 08:10 AM
Re: Logout a user
I would go for the PID form "who -u" for that user's shell, and for sending SIGHUP (that's no 1), ie.e "kill -1", as that signal is used to tell a process that is has been logged off...
Just my $0.02,
Wodisch