The WHOIS Internet service represents another implementation in the long tradition of programs, usually not quite adequate, that strive to help users to answer the question, "If I know a person's name, how can I find that person's electronic mail address?"
In very simple terms, if a user knows, for example, Vaclav Klaus has an account on the computer moneyman.castle.cz, the user can access the WHOIS server program on that computer to determine the exact electronic mail address for Mr.Klaus. Specifically, the WHOIS server program on moneyman.castle.cz will search its database until it finds Mr.Klaus's record.
However, the preceding example makes two assumptions that highlight the fundamental shortcomings of the WHOIS service. First, the computer moneyman.castle.cz must run the WHOIS server program; if not, then users cannot employ this approach to determine Mr.Klaus's electronic mail address. In fact, very few computers in the world actually run the WHOIS server program. Second, assuming that the computer moneyman.castle.cz does run the WHOIS server program, administrators of this computer must keep the database records as current as possible. If not, users may find information about Klement Gottwald rather than Mr.Klaus.
A user can telnet directly to a WHOIS server program. For example, to access the WHOIS server program at InterNIC Registration Services, which maintains the largest database in the world, a user would follow these steps:
telnet rs.internic.net |
InterNIC > |
whois |
However, the preferred access method entails running a WHOIS client program on the user's computer. This method will be discussed throughout the remainder of the article (the same principles apply to accessing a WHOIS server program via telnet). Of course, the user's computer must have a WHOIS client program installed to employ this approach.
To read the manual page for the WHOIS client program, enter the following command:
man whois |
Unfortunately, unlike most programs, the whois man page provides only minimal information. Users can obtain more detailed documentation from the WHOIS server program itself by entering one of the following commands:
whois ? (detailed) whois help (very detailed) |
To invoke the WHOIS client program to query a WHOIS server program, users should rely on the following command syntax:
whois [-h host] "keywordsforthequery" |
For example, to determine Mr.Klaus's electronic mail address, a user might enter the command:
whois -h moneyman.castle.cz "Klaus" |
The results of this query depend upon the number of records found in the WHOIS server program's database. If only one record exists for Klaus, then the WHOIS server program will return the detailed contents of this record. However, if several records exist for more than one person named Klaus, the WHOIS server program will return a summary line for each record.
Spelling-impaired users, who might prefer Klouse or Klowse or Klause, can enter a partial search string containing as many definite characters as possible followed by a period "."
whois -h moneyman.castle.cz "Kl." |
In fact, when the user enters, for example, the command:
whois "Klaus" |
the WHOIS client program usually queries the WHOIS server program at InterNIC Registration Services (rs.internic.net).
whois "Klaus SUM" |
an error message would result. Keywords must precede the search string; thus, only the following command would produce a summary line for Mr.Klaus:
whois "SUM Klaus" |
WHOIS provides several additional keywords.
$ | Same as the SUM keyword | |||
Full | Always return the full entry. Usually, if a query finds more than one record, the WHOIS server program will return a summary line for each record. However, if the query contains the keyword Full, the WHOIS server will return the detailed contents of each record. | |||
= | Same as the Full keyword | |||
PA | Partial search. For example, instead of specifying the partial search string Kl. as described above, the user could alternatively format the query as PA Kl | |||
HA | Handle. Every record in the WHOIS server program's database has a unique identifier referred to as a handle. If a query finds more than one record, each summary line that the WHOIS server returns contains the record's handle in capital letters between parentheses, for example (ODSKING). Therefore, the user can submit a second query, specifying the handle of the desired record, and the WHOIS server will return the detailed contents of that record. | |||
NA | Name. Usually, if the user submits a general query such as Klaus, the WHOIS server program will search every field in every record (e.g. the name field, the post address field, the mailbox field). However, when the user specifies the NA keyword, the WHOIS server program limits its search to the Name field of every record. | |||
Mailbox | In some unusual situations, the user may know a person's
computer account name, but not know the person's name. The
Mailbox keyword will limit the WHOIS server program's
search to the Mailbox field of every record. Note: The Mailbox field only contains a person's computer account name, not the full electronic mail address. Thus, for example, given the electronic mail address:
|
To obtain documentation that includes a list of WHOIS server programs for telnet access, get the following file via ftp:
Site: | ftp.csd.uwm.edu | ||
Directory: | pub | ||
File: | inet.services.txt |
To determine where source code for WHOIS server and WHOIS client programs exist, get the following file via ftp:
Site: | sipb.mit.edu | ||
Directory: | pub/whois | ||
File: | whois-servers.source |
Finally, to determine if the computer moneyman.castle.cz actually exists and, more importantly, whether it runs a WHOIS server program, get the following file, which lists all known computers that run a WHOIS server program, via ftp:
Site: | sipb.mit.edu | ||
Directory: | pub/whois | ||
File: | whois-servers.list |