📄 ch44.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<UL>
<LI><A HREF="#Heading1">- 44 -</A>
<UL>
<LI><A HREF="#Heading2">UUCP</A>
<UL>
<LI><A HREF="#Heading3">UUCP Configuration</A>
<UL>
<LI><A HREF="#Heading4">Taylor UUCP Configuration</A>
</UL>
<LI><A HREF="#Heading5">NOTE</A>
<LI><A HREF="#Heading6">NOTE</A>
<UL>
<LI><A HREF="#Heading7">HDB UUCP Configuration</A>
</UL>
<LI><A HREF="#Heading8">A UUCP Connection</A>
<LI><A HREF="#Heading9">Direct Connections</A>
<LI><A HREF="#Heading10">Login Scripts</A>
<LI><A HREF="#Heading11">Changing Access Times</A>
<LI><A HREF="#Heading12">UUCP Security</A>
<LI><A HREF="#Heading13">Using UUCP</A>
<LI><A HREF="#Heading14">NOTE</A>
<LI><A HREF="#Heading15">CAUTION</A>
<UL>
<LI><A HREF="#Heading16">Sending E-Mail with UUCP</A>
<LI><A HREF="#Heading17">Transferring Files with UUCP</A>
<LI><A HREF="#Heading18">Checking on Transfers</A>
</UL>
<LI><A HREF="#Heading19">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 44 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">UUCP</FONT></H2>
<P><I>by Tim Parker</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>UUCP Configuration
<P>
<LI>A UUCP Connection
<P>
<LI>Direct Connections
<P>
<LI>Login Scripts
<P>
<LI>Changing Access Times
<P>
<LI>UUCP Security
<P>
<LI>Using UUCP
</UL>
<P>UUCP (UNIX to UNIX CoPy) was developed to provide a simple dial-up networking
protocol for UNIX systems. It is most often used today as an e-mail transfer system,
allowing non-networked machines to transfer e-mail easily over a modem connection.
It can also be used for Usenet news and access to similar services that do not require
a dedicated connection. UUCP is a two-machine connection, between your Linux machine
and another machine running UUCP. UUCP cannot be used as a remote system access system
(like FTP or Telnet), nor can it be used as a standard login because the protocols
do not support this type of interactive behavior. UUCP does have security features
that are adequate for most purposes, but UUCP is the primary source of break-ins
for many systems because most system administrators don't bother to set the security
system up properly.</P>
<P>Linux can run any of several different versions of UUCP, most of which are compatible
with each other to a reasonable extent, except when it comes to configuration and
installation procedures. Many Linux versions offer you a choice between the Taylor
UUCP version and the HDB (HoneyDanBer) UUCP. You can use whichever single version
came with your Linux software, or if you have both, you can choose between the two
(or use both versions as the mood strikes you). Many Linux users prefer the Taylor
UUCP implementation, while users who have worked on other UNIX systems prefer HDB
because it is more recent. We'll look at both versions in this chapter. (There are
even more UUCP versions, but we will ignore them because they are seldom used under
Linux.) The first part of the chapter deals with configuring UUCP, while the rest
covers using it.
<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">UUCP Configuration</FONT></H3>
<P>Most of the configuration required for UUCP takes place under the <TT>/usr/lib/uucp</TT>
directory. There are several files used by UUCP, most of which need direct administrator
modification to set up properly. While the configuration process can seem awfully
complex to someone who has never done it before, there are really only a few files
that need changing, and only one or two entries in each file.</P>
<P>The configuration process for Taylor UUCP and HDB UUCP are completely different,
so we will look at them separately. However, you don't have to worry which version
of UUCP is being run at the remote end of the connection because both can talk to
each other (at least that's usually the case), as long as the configuration files
are set up properly.</P>
<P>Some versions of Linux have semiautomated UUCP configuration scripts. These are
more common with HDB UUCP than Taylor UUCP, but a few helpful scripts are also available
for the latter. If you have one of these scripts, by all means use it, but do check
the files manually afterwards.</P>
<P>For the configuration processes discussed in the following section, we will assume
that our host machine's name is <TT>merlin</TT>, and we want to connect via UUCP
to another Linux system called <TT>arthur</TT>. As you go through the process, take
care to enter the information in the same format as the examples, but don't mix Taylor
and HDB UUCP information.
<H4 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">Taylor UUCP Configuration</FONT></H4>
<P>We can begin with a quick look at the configuration files involved in the Taylor
UUCP system. These are the filenames and their primary purposes:
<UL>
<LI><TT>/usr/lib/uucp/config</TT>--Defines the local machine name.
<P>
<LI><TT>/usr/lib/uucp/sys</TT>--Defines the remote systems and how to call them.
<P>
<LI><TT>/usr/lib/uucp/port</TT>--Describes each port for calling out and its parameters.
<P>
<LI><TT>/usr/lib/uucp/dial</TT>--Describes the dialers for calling out.
<P>
<LI><TT>/usr/lib/uucp/dialcodes</TT>--Used to contain expansions for symbolic dialcodes,
but is rarely used when a straight-out telephone connection exists.
<P>
<LI><TT>/usr/lib/uucp/call</TT>--Can contain the login name and password for remote
systems, but it is rarely used now.
<P>
<LI><TT>/usr/lib/uucp/passwd</TT>--Contains the login names and passwords used when
remote systems connect to your local machine. Used only when <TT>uucico</TT> is password
checking instead of using the login process.
</UL>
<P>To make the configuration process easier, we will ignore all the theory and background
information and proceed with a sample configuration. You need only modify the entries
to suit your own names, telephone numbers, device files, and so on, and the configuration
process will be the same. It can then be repeated for as many systems as you want
to connect to.</P>
<P>The first file to modify holds your system name and other general parameters.
The file <TT>/usr/lib/uucp/config</TT> needs a single-line entry for your system
name such as this one:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">nodename merlin
</FONT></PRE>
<P>The keyword <TT>nodename</TT> must be first on the line followed by whitespace
(spaces or tabs), then your machine name. The information in this file may have been
completed when you installed Linux, but you should manually check the contents to
make sure. If your system's name isn't set correctly, the connection to the remote
system won't work properly.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading5<FONT COLOR="#000077"><B>NOTE: </B></FONT>To use UUCP, you
must have a system name. For compatibility with most versions of UUCP, keep the name
to seven characters or less. Ideally, the UUCP name is the same name you assigned
to your host during configuration. The name doesn't have to follow a convention (such
as the system name used by TCP/IP for Internet access), but if you use other network
protocols, keep a consistent name. If you have a domain name (for TCP/IP access)
use the first component of the machine's full TCP/IP name as the UUCP name. For example,
if your full domain name is <TT>merlin.wizards.com</TT>, use the UUCP name <TT>merlin</TT>.
<HR>
</DL>
<P>You also need information about the remote system you want to connect to. The
<TT>/usr/lib/uucp/sys</TT> file holds all the information about remote systems. This
file usually has a few sample entries in it, which you can copy or modify. Make sure
you don't leave comment marks (pound or hash marks) in the first column or the entries
will be ignored. A <TT>/usr/lib/uucp/sys</TT> entry for the remote machine <TT>merlin</TT>
looks like this:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF"># system: arthur (Bill Smallwood's Linux system)
system arthur
time Any
phone 555-1212
port com1
speed 9600
chat login: merlin password: secret1
</FONT></PRE>
<P>The first line in the preceding extract is a comment line. Most system administrators
like to put a comment line in to identify each system. The next lines identify the
different aspects of the remote system, including its name (<TT>arthur</TT>), times
at which it can be called (<TT>Any</TT> in this case, meaning no restrictions), the
telephone number (including any area code or special digits that have to be dialed),
the serial port to be used for the connection (in this case, <TT>com1</TT>), the
speed at which to connect (9600 baud), and the chat script or login process. In this
case, the chat script tells UUCP to wait until it sees the string <TT>login:</TT>
then to send <TT>merlin</TT>, then wait for the prompt <TT>password:</TT> and then
to send <TT>secret1</TT>.</P>
<P>Most login scripts will require a login and password, and they must be placed
in the configuration file because UUCP doesn't allow interactive sessions. This can
be a bit of a problem because it allows other users on your system to see the login
password for the remote machine, but since it can be used only by UUCP, this is not
a major concern. Also, the file permissions on the UUCP configuration files can be
set to prevent any system users (other than root) from looking into the file.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading6<FONT COLOR="#000077"><B>NOTE:</B> </FONT>Not all remote sites
need a password for entry through UUCP. For example, some public archives let you
log in and retrieve files using the <TT>uucp</TT> login with no password. Some sites
use readily available passwords, such as <TT>uucp</TT>.
<HR>
</DL>
<P>The port name used in the <TT>/usr/lib/uucp/sys</TT> entry does not have to match
a device name on the Linux system, because another file is used to match the entry
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -