As with TCP/IP-based networking, your host has to have a name for UUCP networking. As long as you simply want to use UUCP for file transfers to or from sites you dial up directly, or on a local network, this name does not have to meet any standards. [92] The only limitation is that it shouldn't be longer than seven characters, so as to not confuse UUCP implementations that run on an operating system that imposes a narrow limit on filenames. Names that are longer than seven characters are often truncated by UUCP. Some versions even limit the name to six characters.
However, if you use UUCP for a mail or news link, you should think about having the name registered with the UUCP Mapping Project. [93] The UUCP Mapping Project registers all UUCP hostnames worldwide and makes sure they are unique.
The UUCP Mapping Project is described in Chapter 17, Electronic Mail. Even if you participate in a domain, you might consider having an official UUCP name for your site.
Frequently, people choose their UUCP name to match the first component of their fully qualified domain name. Suppose your site's domain address is swim.twobirds.com ; then your UUCP hostname would be swim . Think of UUCP sites as knowing each other on a first-name basis. Of course, you can also use a UUCP name completely unrelated to your fully qualified domain name.
However, make sure not to use the unqualified site name in mail addresses unless you have registered it as your official UUCP name. At the very best, mail to an unregistered UUCP host will vanish in some big black bit bucket. If you use a name already held by some other site, this mail will be routed to that site and cause its postmaster a lot of headaches.
By default, the UUCP suite uses the name set by hostname as the site's UUCP name. This name is commonly set by a command on the boot time rc scripts, and is usually stored in the /etc/hostname . If your UUCP name is different from what you set your hostname to, you have to use the hostname option in the config file to tell uucico about your UUCP name. This is described next.
Taylor Configuration Files
We now return to the configuration files. Taylor UUCP gets its information from the following files:
config
This is the main configuration file. You can define your site's UUCP name here.
sys
This file describes all known sites. For each site, it specifies its name, what times to call it, which number to dial (if any), what type of device to use, and how to log on.
port
This file contains entries describing each available port, together with the line speed supported and the dialer to be used.
dial
This file describes dialers used to establish a telephone connection.
dialcode
This file contains expansions for symbolic dial codes.
call
This file contains the login name and password to be used when calling a system. Rarely used.
passwd
This file contains login names and passwords that systems may use when logging in. It is used only when uucico does its own password checking.
Taylor configuration files are generally made up of lines containing keyword-value pairs. A hash sign introduces a comment that extends to the end of the line. To use a hash sign to mean itself, escape it with a backslash like this: \#.
There are quite a number of options you can tune with these configuration files. We can't go into all the parameters, but we will cover the most important ones here. Then you should be able to configure a modem-based UUCP link. Additional sections describe the modifications necessary if you want to use UUCP over TCP/IP or over a direct serial line. A complete reference is given in the Texinfo documents that accompany the Taylor UUCP sources.
When you think you have configured your UUCP system completely, you can check your configuration using the uuchk tool (located in /usr/lib/uucp ). uuchk reads your configuration files and prints out a detailed report of the configuration values used for each system.
General Configuration Options Using the config File
You won't generally use this file to describe much beside your UUCP hostname. By default, UUCP will use the name you set with the hostname command, but it is generally a good idea to set the UUCP name explicitly. Here's a sample config file:
# /usr/lib/uucp/config - UUCP main configuration file
hostname vstout
A number of miscellaneous parameters can be set here too, such as the name of the spool directory or access rights for anonymous UUCP. The latter will be described later in this chapter in the section "Anonymous UUCP."
How to Tell UUCP About Other Systems Using the sys File
The sys file describes the systems that your machine knows about. An entry is introduced by the system keyword; the subsequent lines up to the next system directive detail the parameters specific to that site. Commonly, a system entry defines parameters such as the telephone number and login chat.
Parameters before the very first system line set default values used for all systems. Usually, you set protocol parameters and the like in the defaults section.
The most prominent fields are discussed in detail in the following sections.
The system command names the remote system. You must specify the correct name of the remote system, not an alias you invented, because uucico will check it against what the remote system says it is called when you log on. [94] Older Version 2 UUCPs don't broadcast their name when being called; however, newer implementations often do, and so does Taylor UUCP.
Each system name can appear only once. If you want to use several sets of configurations for the same system (such as different telephone numbers uucico should try in turn), you can specify alternates , which we'll describe after the basic configuration options.
If the remote system is to be reached over a telephone line, the phone field specifies the number the modem should dial. It may contain several tokens interpreted by uucico 's dialing procedure. An equal sign (=) means wait for a secondary dial tone, and a dash (-) generates a one-second pause. Some telephone installations choke when you don't pause between dialing a special access code and the telephone number. [95] For instance, most companies' private installations require you to dial a 0 or 9 to get a line to the outside.
It is often convenient to use names instead of numbers to describe area dialing codes. The dialcode file allows you to associate a name with a code that you may subsequently use when specifying telephone numbers for remote hosts. Suppose you have the following dialcode file:
# /usr/lib/uucp/dialcode - dialcode translation
Bogoham 024881
Coxton 035119
With these translations, you can use a phone number such as Bogoham7732 in the sys file, which will probably make things a little more legible and a whole lot easier to update should the dialing code for Bogoham ever change.
The port and speed options are used to select the device used for calling the remote system and the maximum speed to which the device should be set. [96] The bit rate of the tty must be at least as high as the maximum transfer speed.
A system entry may use either option alone or both options in conjunction. When looking up a suitable device in the port file, only ports that have a matching port name and/or speed range are selected.
Читать дальше