Users Logged Into Server

This article explains on how to identify those who you do not know that are on your server. This can definitely eliminate the curiosity that people can have when taking care of your server. I can relate to you guys, because I, myself have a server. It is IMPORTANT always monitor your server in case someone gets int your server ‘though the backdoor.’

Note: The commands below can also work with Linux

Display who is on the server

You can display whoever is on the server by the commands below:

$ who

$ who | less 

In case you know specifically who is on, use a grep command below:

$ who | grep renriquez


Once Identified, you are able to see what they are doing below:
$ w
The w command is very helpful to identify who has logged into a server.

After you inserted the w command, a list will appear. The w command is very useful because it views specifically who has logged in, what time, what date, and what did they log in as.

Code is below:

12:56PM up 38 days, 20:21, 3 users, load averages: 0.03, 0.03, 0.00
root v0 – 12Dec14 38days -bash (bash)
root pts/0 Mon06PM 1:59 -bash (bash)
root pts/1 12:56PM – w


The last utility command to display a list the sessions for:USERS, TTYS
and HOST, in reverse time order, OR list USERS that are logged in included with the date and time.

$ last
$ last root

Related Articles

  • Get CPU Information

    You can use the dmesg utility to display the contents of the system message buffer when FreeBSD comes up. For accuracy I recommend querying /var/run/dmesg.boot file. Usually a snapshot of...
  • Extract Tar Files to a Different Directory

    Syntax Typical Unix tar syntax: tar -xf -C /path/to/directory GNU/tar syntax: tar xf file.tar -C /path/to/directory tar xf file.tar --directory /path/to/directory Example: Extract files to another directory In this...
  • Scanning for rootkits and possible exploits – RKHunter

    Rootkits are malicious softwares that are installed by intruders to gain access to your server once the security of the server has been breached.  Intruders can leave some malicious softwares...
  • SSH: Whitelist IPs for Your Server

    If you wish to whitelist certain IP’s for your server for any reason, you can easily go into your Webair Ezpanel for this. When whitelisting an IP, please provide the specific...