Communicate over a Network
Many commands that you can use to communicate with other users on a single computer system have been extended to work over a network. Three examples of extended utilities, all of which were introduced in Chapter 3, are electronic mail programs (such as pine), information-gathering utilities (such as finger), and communications utilities (such as talk). These utilities are examples of the UNIX philosophy: Instead of creating a new, special-purpose tool, modify an existing one.
Many utilities understand a convention for the format of network addresses: user@host (spoken as user at host). When you use an @ sign in an argument to one of these utilities, the utility interprets the text that follows as the name of a remote host. When it does not include an @ sign, a utility assumes that you are requesting information from or corresponding with someone on your LAN.
The prompts shown in the examples in this chapter include the hostname of the machine you are using. When you frequently use more than one system over a network, you may find it difficult to keep track of which system you are using at any particular moment. If you set your prompt to include the hostname of the current system, it will always be clear which system you are using. To identify the computer you are using, run hostname or uname n:
$ hostname kudos
See pages 579 and 749 for information on how you can change your prompt.
finger :Displays Information about Remote Users
The finger utility displays information about one or more users on a system. This utility was designed for local use, but when networks became popular, it was obvious that finger should be enhanced to reach out and collect information remotely. In the following examples, finger displays information about all the users logged in on the system named bravo:
[kudos]$ finger @bravo [bravo.tcorp.com] Login Name Tty Idle Login Time Office Office Phone root root *1 1:35 Oct 22 5:00 alex Alex Watson 4 Oct 22 12:23 (kudos) alex Alex Watson 5 19 Oct 22 12:33 (:0) jenny Jenny Chen 7 2:24 Oct 22 8:45 (:0) hls Helen Simpson 11 2d Oct 20 12:23 (:0)
A user's login name in front of the @ sign causes finger to display information from the remote system for the specified user only. If there are multiple matches for that name on the remote system, finger displays the results for all of them.
[kudos]$ finger alex@bravo [bravo.tcorp.com] Login Name Tty Idle Login Time Office Office Phone alex Alex Watson 4 Oct 22 12:23 (kudos) alex Alex Watson 5 19 Oct 22 12:33 (:0)
The finger utility works by querying a standard network service, the fingerd daemon, that runs on the system being queried. Although this service is supplied with Red Hat Linux, some sites choose not to run it to minimize the load on their systems, reduce security risks, or maintain privacy. When you use finger to obtain information about someone at such a site, you will see an error message or nothing at all. It is the remote fingerd daemon that determines how much information to share with your system and in what format. As a result, the report displayed for any given system may differ from the preceding examples.
SECURITY: The fingerd Daemon
The finger daemon (fingerd) gives away system account information that can aid a malicious user. Some sites disable finger or randomize user account IDs to make a malicious user's job more difficult. Disable finger by giving the following command as root: chkconfig finger off.
The information for remote finger looks much the same as it does when finger runs on your local system, with one difference: Before displaying the results, finger reports the name of the remote system that answered the query (bravo, as shown in brackets in the preceding example). The name of the host that answers may be different from the system name you specified on the command line, depending on how the finger daemon service is configured at the remote end. In some cases several hostnames may be listed if one finger daemon contacts another to retrieve the information.
Sending Mail to a Remote User
Given a user's login name on a remote system and the name of the remote system or its domain, you can use an e-mail program, such as pine (page 87), to send a message over the network or the Internet, using the @ form of an address:
Although the @ form of a network address is recognized by many GNU/Linux utilities, you may find that you can reach more remote computers with e-mail than with the other networking utilities described in this chapter. The reason for this disparity is that the mail system can deliver a message to a host that does not run IP, even though it appears to have an Internet address. The message may be routed over the network, for example, until it reaches a remote system that has a point-to-point, dial-up connection to the destination system. Other utilities, such as talk, rely on IP and operate only between networked hosts.
Mailing List Servers
A mailing list server (listserv14) allows you to create, manage, and administrate an e-mail list. An electronic mailing list provides a means for people interested in a topic to participate in an electronic discussion and for a person to disseminate information periodically to a potentially large mailing list. One of the most powerful features of most list servers is the ability to archive e-mail postings to the list, create an archive index, and allow users to retrieve postings from the archive based on keywords or discussion threads. Typically you can subscribe and unsubscribe from the list with or without human intervention. The owner of the list can restrict who can subscribe, unsubscribe, and post messages to the list. Popular list servers include LISTSERV (www.lsoft.com), Lyris (www.lyris.com), Majordomo (www.greatcircle.com/majordomo), Mailman (www.list.org), and ListProc (www.listproc.net). Red Hat maintains several mailing lists (https://listman.redhat.com) and list archives (www.redhat.com/mailing-lists). Use a browser to search on linux mailing list to find (many) other lists.