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

x
?
Solved

logout problem

Posted on 1999-07-19
6
Medium Priority
?
328 Views
Last Modified: 2010-08-05
hi,

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
0
Comment
Question by:qazaka
[X]
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
6 Comments
 

Expert Comment

by:JadeFang68
ID: 1635577
gazaka:

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
0
 

Author Comment

by:qazaka
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'?
0
 
LVL 1

Expert Comment

by:tinsi
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)


0
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.

 
LVL 2

Expert Comment

by:EatEmAndSmile
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' *
0
 

Author Comment

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

0
 
LVL 19

Accepted Solution

by:
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!!


0

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