Linux Network Administrators Guide Remote Systems
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 16. ManagingTaylor UUCP UUCP was designed in the late seventies by Mike Lesk at AT&T Bell Laboratories to provide a simple dialup network over public telephone lines. Despite the popularity of dialup PPP and SLIP connections to the Internet, many people who want to have email and Usenet News on their home machine still use UUCP because it is often cheaper, especially in countries where Internet users have to pay by the minute for local telephone calls, or where they do not have a local ISP and must pay long distance toll rates to connect. Although there are many implementations of UUCP running on a wide variety of hardware platforms and operating systems, overall, they are highly compatible. However, as with most software that has somehow become standard over the years, there is no UUCP that one would call the UUCP. It has undergone a steady evolution since the first version was implemented in 1976. Currently, there are two major species that differ mainly in their hardware support and configuration. Of these two, various implementations exist, each varying slightly from its siblings. One species is known as Version 2 UUCP, which dates back to a 1977 implementation by Mike Lesk, David A. Novitz, and Greg Chesson. Although it is fairly old, it is still frequently used. Recent implementations of Version 2 provide much of the comfort that the newer UUCP species do. The second species was developed in 1983 and is commonly referred to as BNU (Basic Networking Utilities) or HoneyDanBer UUCP. The latter name is derived from the authors' names (P. Honeyman, D. A. Novitz, and B. E. Redman) and is often shortened further to HDB, which is the term we'll use in this chapter. HDB was conceived to eliminate some of Version 2 UUCP's deficiencies. For example, new transfer protocols were added, and the spool directory was split so that now there is one directory for each site with which you have UUCP traffic. The implementation of UUCP currently distributed with Linux is Taylor UUCP 1.06, which is the version this chapter is based upon.[89] Taylor UUCP Version 1.06 was released in August 1995. Apart from traditional configuration files, Taylor UUCP can also be compiled to understand the newstylea.k.a. Taylorconfiguration files. Taylor UUCP is usually compiled for HDB compatibility, the Taylor configuration scheme, or both. Because the Taylor scheme is much more flexible and probably easier to understand than the often obscure HDB configuration files, we will describe the Taylor scheme below. This chapter is not designed to exhaustively describe the command−line options for the UUCP commands and what they do, but to give you an introduction to how to set up a working UUCP node. The first section gives a gentle introduction about how UUCP implements remote execution and file transfers. If you are not entirely new to UUCP, you might want to skip to the section Section 16.2 later in this chapter, which explains the various files used to set up UUCP. We will, however, assume that you are familiar with the user programs of the UUCP suite, uucp and uux. For a description, refer to the online manual pages. Besides the publicly accessible programs uucp and uux, the UUCP suite contains a number of commands used for administrative purposes only. They are used to monitor UUCP traffic across your node, remove old log files, or compile statistics. None of these will be described here because they are peripheral to the main tasks of UUCP. Besides, they're well documented and fairly easy to understand; refer to the manual pages for more information. However, there is a third category, which comprise the actual UUCP work horses. They are called uucico (where cico stands for copy−in copy−out), and uuxqt, which executes jobs sent from Chapter 16. ManagingTaylor UUCP 304 Linux Network Administrators Guide remote systems. We concentrate on these two important programs in this chapter. If you're not satisfied with our coverage of these topics, you should read the documentation that comes with the UUCP package. This is a set of Texinfo files that describe the setup using the Taylor configuration scheme. You can convert the Texinfo files into a dvi file using the texi2dvi (found in the Texinfo package in your distribution) and view the dvi file using the xdvi command. Guylhem Aznar's UUCP−HOWTO is another good source for information about UUCP in a Linux environment. It is available at any Linux Documentation Project mirror and is posted regularly to comp.os.linux.answers. There's also a newsgroup for the discussion of UUCP called comp.mail.uucp. If you have questions specific to Taylor UUCP, you may be better off asking them there, rather than on the comp.os.linux.* groups. Chapter 16. ManagingTaylor UUCP 305 16.1. UUCP Transfers and Remote Execution The concept of jobs is vital to understanding UUCP. Every transfer that a user initiates with uucp or uux is called a job. It is made up of a command to be executed on a remote system, a collection of files to be transferred between sites, or both. As an example, the following command makes UUCP copy the file netguide.ps to a remote host named pablo and execute the lpr command on pablo to print the file: $ uux −r pablo!lpr !netguide.ps UUCP does not generally call the remote system immediately to execute a job (or else you could make do with kermit). Instead, it temporarily stores the job description away. This is called spooling. The directory tree under which jobs are stored is therefore called the spool directory and is generally located in /var/spool/uucp. In our example, the job description would contain information about the remote command to be executed (lpr), the user who requested the execution, and a couple of other items. In addition to the job description, UUCP has to store the input file netguide.ps. The exact location and naming of spool files may vary, depending on some compile−time options. HDB−compatible UUCPs generally store spool files in a /var/spool/uucp subdirectory with the name of the remote site. When compiled for Taylor configuration, UUCP creates subdirectories below the site−specific spool directory for different types of spool files. At regular intervals, UUCP dials up the remote system. When a connection to the remote machine is established, UUCP transfers the files describing the job, plus any input files. The incoming jobs will not be executed immediately, but only after the connection terminates. Execution is handled by uuxqt, which also takes care of forwarding any jobs that are designated for another site. To distinguish between more and less important jobs, UUCP associates a grade with each job. This is a single digit ranging from 0 through 9, A through Z, and a through z, in decreasing precedence. Mail is customarily spooled with grade B or C, while news is spooled with grade N. Jobs with higher grades are transferred earlier. Grades may be assigned using the −g flag when invoking uucp or uux. You can also prohibit the transfer of jobs below a given grade at certain times. To do this we set the maximum spool grade that will be prohibited during a conversation. The maximum spool grade defaults to z, meaning all grades will be transferred every time. Note the semantic ambiguity here: a file is transferred only if it has a grade equal to or above the maximum spool grade threshold. 16.1.1. The Inner Workings of uucico To understand why uucico needs to know particular information, a quick description of how it actually connects to a remote system is helpful. When you execute uucico −s system from the command line, uucico first has to connect physically. The actions taken depend on the type of connection to open. Thus, when using a telephone line, it has to find a modem and dial out. Over TCP, it has to call gethostbyname to convert the name to a network address, find out which port to open, and bind the address to the corresponding socket. 16.1. UUCP Transfers and Remote Execution 306 Linux Network Administrators Guide A successful connection is followed by authorization. This procedure generally consists of the remote system asking for a login name and possibly a password. This exchange is commonly called the login chat. The authorization procedure is performed either by the usual getty/login suite, or on TCP sockets by uucico itself. If authorization succeeds, the remote end fires up uucico. The local copy of uucico that initiated the connection is referred to as master, and the remote copy as slave. Next follows the handshake phase: the master sends its hostname plus several flags. The slave checks this hostname for permission to log in, send, and receive files, etc. The flags describe (among other things) the maximum grade of spool files to transfer. If enabled, a conversation count or call sequence number check takes place here. With this feature, both sites maintain a count of successful connections, which are compared. If they do not match, the handshake fails. This is useful to protect yourself against impostors. Finally, the two uucicos try to agree on a common transfer protocol. This protocol governs the way data is transferred, checked for consistency, and retransmitted in case of an error. There is a need for different protocols because of the differing types of connections supported. For example, telephone lines require a safe protocol, which is pessimistic about errors, while TCP transmission is inherently reliable and can use a more efficient protocol that foregoes most extra error checking.