April 19, 2019

Foil Wireless Poachers and Have Fun Doing It (Part 2) - page 2

Killing and Slaying

  • January 31, 2007
  • By Carla Schroder

whowatch is usually a separate installation, so you might not have it when you need it. In that case, the venerable finger command is included on virtually all Linux distributions by default, so you don't have to install it separately. finger also displays a list of logged-in users; just run the finger command without options to see them:

$ finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
carla     carla     *:0             Jan 15 11:22
pinball             *tty2        5  Jan 15 15:02

Now use the ps command to find pinball's PID (process ID) via her tty:

$ ps auwx |grep tty2
pinball   7748  0.0  0.5   5464  3056 tty2     S+   15:02   0:00 -bash

Then run kill -9 7748 to give Pinball the heave-ho. ps is also found on every Linux, so if you find yourself on a desert island with no whowatch you can still evict bad users.

Most Popular LinuxPlanet Stories