LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-20-2012, 01:32 AM   #1
niharikaananth
Member
 
Registered: Aug 2011
Posts: 58

Rep: Reputation: Disabled
last, w, who commands


Hi..Everyone,
We have a transparent squid proxy server and working fine. I will be using last, w and who cammands to check the currently logged in users and though there will be only two users, one is limited user and other is root, I have also disabled the direct root login using ssh.

My question is why it is showing about 3 logged in users in uptime and w command's output, while who is showing about only one logged in user and even only one user is is logged in. Please see the below details.

Code:
#uptime
 10:31:57 up 48 days,  1:32,  3 users,  load average: 0.00, 0.01, 0.05
Code:
#last | grep still
Adm pts/0        pc43.local       Mon Feb 20 10:12   still logged in
Shows only one user.

Code:
#w
 10:32:03 up 48 days,  1:32,  3 users,  load average: 0.00, 0.01, 0.05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
Adm pts/0    pc43.local       10:12    0.00s  0.57s  0.03s sshd: Admi
Shows only one user information.

Code:
#who
Admin pts/0        2012-02-20 10:12 (pc43.local)
Showing only one, then who are those other two users?
So please help me that how to find out other 2 logged in users and to know that who are those unkown users and what they are doing.

Last edited by niharikaananth; 02-20-2012 at 08:27 AM.
 
Old 02-20-2012, 08:31 AM   #2
niharikaananth
Member
 
Registered: Aug 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
Hi..All,
Could anybody please give me some guidance for the above requested.
 
Old 02-20-2012, 08:34 AM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Admin, Adm and root ?
 
1 members found this post helpful.
Old 02-20-2012, 10:19 AM   #4
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,500

Rep: Reputation: Disabled
Try running 'top' & see if the other (system)users show up, or try 'ps aux'.
I know the 'system' runs as certain 'users' at times; could be those.
 
1 members found this post helpful.
Old 02-20-2012, 10:33 AM   #5
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
if you login via ssh as an ordinary user, there is one user.
If then "su" there is still only one user, who has logged in.
The su'ed user has no login shell running.
And that is, what "who" and "w" are showing.

And of course there are running processes from more users, than are logged in.
 
1 members found this post helpful.
Old 02-21-2012, 08:06 AM   #6
niharikaananth
Member
 
Registered: Aug 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thanks you all,
Here is the output of top command,
Code:
top - 18:27:50 up 49 days,  9:28,  3 users,  load average: 0.04, 0.03, 0.05
Tasks: 124 total,   1 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.2%sy,  0.0%ni, 99.4%id,  0.2%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   5916828k total,  4872848k used,  1043980k free,   193212k buffers
Swap: 14647292k total,   298876k used, 14348416k free,   525396k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
  743 syslog    20   0  180m 2984  420 S    0  0.1   9:24.08 rsyslogd           
 1208 root      20   0  143m 2712 1508 S    0  0.0 301:34.47 Xorg               
 1526 lightdm   20   0  366m 8196 2676 S    0  0.1 107:49.55 unity-greeter      
 2552 bind      20   0  311m  83m 1488 S    0  1.4 116:28.81 named              
12803 root      20   0 21460 1456 1084 R    0  0.0   0:00.12 top                
29324 proxy     20   0 2747m 2.4g 2180 S    0 42.8 468:35.18 squid3             
    1 root      20   0 24184 1532  780 S    0  0.0   0:01.91 init               
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd           
    3 root      20   0     0    0    0 S    0  0.0  12:54.54 ksoftirqd/0        
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0        
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1        
    9 root      20   0     0    0    0 S    0  0.0   0:36.63 ksoftirqd/1        
   11 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2        
   13 root      20   0     0    0    0 S    0  0.0   0:21.70 ksoftirqd/2        
   14 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3        
   15 root      20   0     0    0    0 S    0  0.0   3:03.49 kworker/3:0
if I wait for a while with this command, often I will be getting also about dhpcd, www-data in the user column. Then whom can I guess that other 2 real users.

Last edited by niharikaananth; 02-21-2012 at 08:08 AM.
 
Old 02-21-2012, 08:53 AM   #7
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,500

Rep: Reputation: Disabled
Apart from the commands that you have already used, those were the only others I could think of that show up system users.
(Sorry I can't help any further)
 
1 members found this post helpful.
Old 02-21-2012, 09:06 AM   #8
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
The uptime shows you the currently logged on users and anwer to your question is

there might be any chance where a user is looged on two terminals like using putty same user root can be logged on to 3 terminals so uptime is showing 3 users

make sure that the user is only logged on 1 terminal and check your uptime
 
1 members found this post helpful.
Old 02-21-2012, 09:20 AM   #9
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
or just read "man who"
This command got a lot of options and these make you understand what's going on.
Try
who -l
who -m

and again: read "man who"
 
1 members found this post helpful.
Old 02-21-2012, 11:20 PM   #10
niharikaananth
Member
 
Registered: Aug 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
Hi..Thank you all,
I did not find any other users information even from who -l, who -m, who -a commands and showing only Admin information that I am logged in into proxy remotely. So it seems no need worry and as you said it may be showing about system users.
Once again thank you all for your kind response.
 
  


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
Linux equivalent commands for all Solaris commands Harry_Linux008 Linux - Newbie 4 08-22-2010 08:21 PM
what is the similarity between linux commands and dos commands kamalkirat1 Linux - Software 6 11-21-2008 09:54 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 07:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 07:53 AM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 01:45 AM


All times are GMT -5. The time now is 05:10 AM.

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