Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


logout problem

Posted on 1999-07-19
Medium Priority
Last Modified: 2010-08-05

how to 'kick' a user out from server?

by the way, after my connection to server down, i telnet one more time, and i found that (the previous)
i stil in the server
Question by:qazaka
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1635577

try the following from a shell, as the root operator:

# ps aux | grep username

Substitute username for the actual account you want to monitor. You should get a listing of all the current processes being run by this particular user. The number that comes out next to the username in the actual listing, is the process ID number.

With this number, you could issue commands like:

# kill -9 IDnumber1 IDnumber2.....etc

This kills the processes the user may be running on your server, effectively "kicking" the user out.

Let me know if this helps! I'll research the connection you say you are leaving behind

Author Comment

ID: 1635578
ps aux | grep username ..nothing coming out

when i 'w' the user stil there.

so how ?

by the way , what is the functionality for 'grep'?

Expert Comment

ID: 1635579
who -u should give you a listing of the users currently logged in _and_ their process ID. Once you have found the relevant PID, you can kick him out saying:

kill -9 9328

(Where 9328 is the relevant PID, of course)

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.


Expert Comment

ID: 1635580
grep is a command that searches for lines that contain strings among a text file or the standard out. You can use it to search for words in files. For example, do:

cd /usr/doc/Linux-HOWTOs

grep 'grep' *

Author Comment

ID: 1635581
i m using freebsd , so who -u doesn't work.

LVL 19

Accepted Solution

jools earned 0 total points
ID: 1635582
Try this...
You will need to have root access to do this...

Find the user in question by listing the processes and grep for the userid.
$ ps auf | grep gaie
gaie     21932  0.1  0.2  1384   896  p2 S    11:48   0:00          \_ -bash

Kill the process (murder!) you can specify more than one process id.
$ kill -9 21932

Note that "w" can become inconsistent if the utmp/wtmp file is corrupt or the information in /proc is incorrect. Doesn't happen often but does happen!!


Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question