HostedDB - Dedicated UNIX Servers

-->
Internet Security Professional Reference:Using UUCP
Previous Table of Contents Next


The L-devices File

The L-devices file contains descriptions for devices that Version 2 UUCP can use to make connections to remote systems. An L-devices entry looks like this:

    Type   Device    Call-unit  Speed
    ACU    tty000    -          1200

The Type field is usually the type of link that is being used for this device. ACU (automatic call unit or modem) and DIR (direct) are usually the only types supported. Multiple entries of the same type may be listed in the file. In fact, there may be other types supported, depending on the operating system version. For example, BSD Unix supports TCP (TCP/IP) and PAD (X.25). Very few implementations of Version 2 UUCP actually support any device types other than ACU and DIR.

The Device field is the name of the physical device that is used to establish the link. The Call-unit field is used only if you are using a Bell 801 dialer and separate modem. You would put the device for the data line in the device field, and the name of the device for the dialer. These dialers are not commonly used any longer and have been replaced with the “smart” modem.

The Speed field is the connect speed for this device. Like the entries in the BNU Devices file, the Speed field may contain a range of values, such as 1200–2400, so that connections from 1200 to 2400 baud will work.

Testing the Connection

Before you continue with the Version 2 UUCP configuration, you first need to evaluate the continuity of the connection between these systems. To do this, use the cu command. This command is in the /bin directory in Version 2 UUCP, and the /usr/bin directory in HDB. To run cu on a Version 2 UUCP system, the syntax is as follows:

cu -l tty01

Substitute the appropriate device name in the command line for tty01. If you get a connected message, you can attempt to log in to the remote system. If you receive an error message such as NO DEVICE AVAILABLE or REQUESTED DEVICE NAME UNKNOWN, you do not have the L-devices file configured properly. The following output shows a sample cu connection:

Comments are marked in []

chare@unilabs> cu -l tty21
Connected
[The Connected prompt indicates that you have connected to the DEVICE, not
necessarily to the remote system.]
>RETURN>
login: anon
Welcome to Unilabs Research

CONNECTED TO: bugs.unilabs.org

anon@bugs>
anon@bugs> date
Tue Dec 29 21:00:11 EST 1992
anon@bugs> exit

bugs!login:
~[unilabs].
[ To disconnect from the remote system after logging out, use the ~.
command of cu to terminate the connection.]

Disconnected
chare@unilabs>

In this example, the connected prompt printed by the cu command indicates that a connection has been established to the device. After the Enter key is pressed several times, a login message prints from the remote system. After providing a login name, you can establish a session successfully on the remote end. With the knowledge that the connection works, the cu connection is then terminated using the tilde period (~.) sequence.

The next step in setting up Version 2 UUCP is to configure the L.sys file to allow for automated connections.

The L.sys File

The L.sys file is essentially the same as the Systems file in HDB UUCP. The format of each entry is as follows:

System   Schedule      Device   Speed   Phone     Chat-script
xray     Wk0800-1700   ACU      1200    5551234   ogin: anon

The System field identifies what system this entry is used to contact. It must be unique to seven characters for the entries in this file. Schedule identifies when you can call the remote system, and uses a series of times and related keywords. The Schedule field can be used to control the cost of a calling system if telephone links are expensive. The contents of this field may contain the following:

Field Contents Description

start-end The starting hour and ending hour based on the 24-hour clock; 0800 is 8:00 a.m., and 2000 is 8:00 p.m.
Any No limit on calling.
Never No calling permitted.
Wk Restrict calling to weekdays: Monday to Friday.
Mo, Tu, We, Th, Fr, Sa, Su Days of the week.

These components can be combined to build a restrictive definition. For example, if you want to allow calling only between 8:00 a.m. and 11:00 a.m. on Saturday and Sunday, the appropriate entry would be as follows:

SaSu0800-1100

An optional retry subfield can be included by following the schedule with a comma and a time period in seconds. This is the delay period used after an unsuccessful call, not the amount of time after which uucico restarts automatically.

The Device type in V2 is restricted to one of the device types allowed in L-devices; either ACU or DIR. When a call is made to the remote system, the device entry is checked against device entries in the L-devices file. If multiple entries exist for a device, the first available device will be used.

The Speed field identifies the baud rate to be used when calling the remote system. A corresponding entry in the L-devices file for this speed must exist. The phone number is the actual number to call to connect with the remote system. This field contains a hyphen if it is for a direct link to a remote system.

The Chat-script field is used to negotiate the login to the remote system. This entry consists of a series of expect-send sequences. The chat script is a combination of expect-send pairs that define the login sequence to gain access to the remote computer. Each pair is separated by a space, with optional subexpect-subsend pairs separated by hyphens. Consider the following example:

login:-BREAK-login: nuucp word: loginAok

uucico expects the remote system to print login:. If you don’t see one within a predefined period of time, send a BREAK signal and expect login:. The BREAK signal is a modem break, which may wake up a getty running on the remote system, or cause the getty to switch speeds to something more reasonable for your system. When your system sees the login: prompt, your system sends nuucp, and then waits for the word: string. When you or your system sees it, send loginAok, which is your password. When the script successfully completes, you have logged in to the system.


Previous Table of Contents Next