Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to know how to catch the username of the users connected to my system? So, I've a WiFi router with a wep key setted, me and friend are making some test.

Considered that my friend has encrypted the key and use my network, is it possible to know using him IP and MAC address detecting his username?? He also use an Ubuntu.

Thanks a lot!!!

share|improve this question
up vote 3 down vote accepted

There are two different levels of authentication/connectivity involved.

  1. Authentication of users in order to connect and access your local network.
  2. Authentication of users on hosts in order to access specific services.

More specifically:

First level:
The user provides a password, based on the selected security protocol (WEP, WPA, WPA2,etc) of your wireless router, in order to become a member of your local network and access various services (e.g. file services on your Ubuntu machine, shell access, or direct outbound Internet access).

This kind of information will be provided directly from your wireless router (probably by a web-based administration page).

Second level:
The user is already connected to the local network (so the first level of authentication has completed), has a local IP address and can access the various hosts of the network. When the user connects to your Ubuntu machine through telnet or SSH, a relevant entry will be shown by using the commands w,who or users.

One - possibly - important detail:
The commands above display currently logged on users on your system; that is, users connected remotely or locally to the system through command-line (shell access) or GUI (X session). Users connected to specific services (such as FTP) will not be visible. It is up to the specific application/daemon to log/display the users accessing the relevant service.

share|improve this answer

I'm not sure I understand your question correctly, but if you want to know the user names logged on to you machine, via ssh over the network or directly in front of it, you could run the w command in a terminal:

egil@mutter:~$ w
 10:51:12 up 104 days, 20:27,  2 users,  load average: 0.16, 0.14, 0.09
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
egil     pts/0 10:51    0.00s  0.35s  0.00s w
share|improve this answer
I'm so sorry I've explained that bad. From Router WIFI is possible to see the username of the user has penetrated the wifi's system – Riccardo Magrini May 27 '11 at 10:40

Use the command users. It will output you all users currently connected to your system :

foo@example:~$ users
share|improve this answer

You have the who command which shows "Who is connected" (And its small kid w which is the abbreviated version of it) and you also have the users command which shows "Users connected".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.