Finger: A Simple Directory Service

Finger and WHOIS are good examples of simple directory services. Finger exists primarily to provide read-only information about the users of a machine (although we’ll see some more creative uses shortly). Later versions of Finger, like the GNU Finger server and its derivatives, expanded upon this basic functionality by allowing you to query one machine and receive information back from all of the machines on your network.

Finger was one of the first widely deployed directory services. Once upon a time, if you wanted to locate a user’s email address at another site, or even within your own, the finger command was the best option. finger would tell you whether Harry’s email address was harry, hpotter, or something more obscure (along with listing all of the other Harrys at that school). Though it is still in use today, Finger’s popularity has waned over time as web home pages became prevalent and the practice of freely giving out user information became problematic.

Using the Finger protocol from Perl provides another good example of TMTOWTDI. When I first looked on CPAN for something to perform Finger operations, there were no modules available for this task. If you look now, you’ll find Dennis Taylor’s Net::Finger module, which he published six months or so after my initial search. We’ll see how to use it in a moment, but in the meantime, let’s pretend it doesn’t exist and take advantage of this opportunity to learn how to use ...

Get Perl for System Administration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.