Finding Out About Users with finger


Finding Out About Users with finger

Using the finger command, you can find out who is currently logged into the Unix system as well as what they're doing, how long they've been logged in, and other snoopy, not-necessarily-your-business information (Code Listing 7.8).

To find out who is logged in using finger:

1.

finger

At the shell prompt, type finger to see who else is logged into the system and to get a little information about them (Code Listing 7.8).

2.

finger @example.com

Type finger, @, and a host name (in this case example.com) to find out who is logged into another host.

Fingering a different host doesn't always work, depending on security settings on the other host computer(s). If the host doesn't allow it, you'll get a message like the one in Code Listing 7.8.

Code Listing 7.8. The finger command often provides interesting information about who is logged onto different systems.

[ejr@hobbes ejr]$ finger Login      Name            Tty      Idle      Login Time   Office     Office Phone asr                        *4       1         Jul 24 13:32 deb                        5        1         Jul 24 13:32 ejr        Eric J. Ray     1        3:20      Jul 22 07:42 ejr        Eric J. Ray     p1       1:12      Jul 24 12:14 (calvin) ejr        Eric J. Ray     p0                 Jul 24 13:02 (calvin) root       root            *2       1d        Jul 22 15:13 [ejr@hobbes ejr]$ finger @example.com [example.com] No one logged on  [ejr@hobbes ejr]$ finger @osuunx.ucc.okstate.edu [osuunx.ucc.okstate.edu] finger: connect: Connection refused [ejr@hobbes ejr]$ 

To find out about users using finger:

1.

finger ejr

At the shell prompt, type finger followed by the userid of the person you want to know about. You'll get a ton of information, including some or all of the following: the user's name, home directory, and default shell; when, from where, and for how long they've been logged on; and whatever other information they choose to provide. Code Listing 7.9 shows two users with varying activity. deb has apparently been loafing, and ejr has been working his buns off.

2.

finger ejray@xmission.com

Using finger plus a specific user address, you can find out about users on other systems. As with generic finger requests, some-times they're blocked for security reasons.

Code Listing 7.9. The finger command can also provide in-depth information about specific users.

[ejr@hobbes ejr]$ finger deb  Login: deb                      Name:  Directory: /home/deb            Shell: /bin/bash  Never logged in.  No mail.  No Plan.  [ejr@hobbes ejr]$ finger ejr  Login: ejr                      Name:  Directory: /home/ejr            Shell: /bin/bash  On since Wed Jul 22 07:42 (MDT) on tty1     2 hours 32 minutes idle  On since Wed Jul 22 06:58 (MDT) on ttyp1 from calvin  No mail.  Project:  Working on  VQS.  Plan:  This is my planwork all day, sleep all night.  [ejr@hobbes ejr]$  [ejr@hobbes ejr]$ finger ejray@xmission.com  [xmission.com]  Login     Name         TTY         Idle         When         Where  ejray     "RayComm     pts/57      <Jul 22 09:39> calvin.raycomm.c  [ejr@hobbes ejr]$ 

Tips

  • You can also sniff out user information using who (see the next section).

  • You can provide extra information to anyone who gets your user information with finger by creating files that describe your "plan" and "project" (as ejr has done in Code Listing 7.9) Use your favorite editor to create .plan and .project files in your home directory. Then, change the protection so that the files are both world readable (chmod go+r .plan ; chmod go+r .project) and so the directory is accessible (chmod go+x .). See Chapter 5 for specifics about chmod.

  • Information you obtain through finger can be handy when diagnosing connection difficulties. In particular, system administrators or help desk personnel are likely to ask where you're connected (pts57, for ejray@xmission.com) and what kind of software you're using.





Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net