LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2012, 12:58 AM   #1
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Rep: Reputation: 21
user not logged in but still "who -a" shows a record


Hi All
I have script in my server to inform whoever logged in except me and root. Recently a user had logged in but i killed the session by informing the user. But somehow, the script still alerting me that he is logged in. When i check, the command to filter the user name "who" shows his name though his session was killed.
Code:
[root@server1 ~]# w
 11:14:43 up 228 days, 21:16,  2 users,  load average: 15.48, 11.90, 7.11
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
kinved  pts/0    einbalx0014.in.a 11:00    0.00s  0.08s  0.02s sshd: xkinved [priv]
[root@server1 ~]# who -a
                        May  5 13:59               678 id=si    term=0 exit=0
           system boot  May  5 13:59
           run-level 3  May  5 13:59                   last=S
                        May  5 14:00              4050 id=l3    term=0 exit=0
LOGIN      tty1         May  5 14:00             31737 id=1
LOGIN      tty2         May  5 14:00             31738 id=2
LOGIN      tty3         May  5 14:00             31739 id=3
LOGIN      tty4         May  5 14:00             31740 id=4
LOGIN      tty5         May  5 14:00             31741 id=5
LOGIN      tty6         May  5 14:00             31742 id=6
                        May  5 14:00             31743 id=uags  term=0 exit=0
                        May  5 14:00             31744 id=uvss  term=0 exit=0
                        May  5 14:00             31745 id=dtds  term=0 exit=0
kinved  + pts/0        Dec 20 11:00   .         20781 (testing.com)
           pts/1        Nov 12 16:07              8430 id=ts/1  term=0 exit=0
asapav ? pts/1        Dec  6 18:17   ?         11807
How to kill his (asapav) session (which is dead but may be exist in the process table) as to avoid receiving alerts? Ofcourse, there is no zombie processes too in process table.

Help me
 
Old 12-20-2012, 01:55 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Kill all processes of that user, and then check again, as
Code:
pkill -9 -u asapav
ps -ef | grep asapav
 
Old 12-20-2012, 08:24 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,665
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Code:
sudo pkill -KILL -u asapav
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rkhunter hangs, "another user" logged in when I go to shut down. Please evaluate. moxieman99 Linux - Security 2 09-12-2010 07:49 AM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 06:56 AM
How do I "kick" a user who is logged in? LinuxSeeker Linux - General 11 06-03-2005 08:47 AM
"finger" shows logged out users. webboss Linux - Networking 1 06-11-2004 02:19 PM
"who" shows logged in users that are not there... shadow.blue Linux - General 3 05-17-2004 07:33 AM


All times are GMT -5. The time now is 02:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration