UUCP (BNU) Configuration Files


Contents

About this document
The Systems file
The Permissions file
The Devices and Dialers files
Examples and notes

About this document

This document is an aid to understanding the UUCP (BNU) configuration files. Basic Networking Utilities (BNU) is the AIX version of UNIX-to-UNIX Copy Program (UUCP). The terms "BNU" and "UUCP" are used interchangeably in this document. This document applies to AIX 4.x and up.

Use the /usr/lib/uucp/uucpadm command to initially set up the files, and then edit them to suit your exact needs.

The following information describes the Systems, Permissions, Devices and Dialers files and the fields within them.


The Systems file

The /usr/lib/uucp/Systems file contains the primary information that is used by the uucico program, which will be described later in this guide, to connect to the various systems. Consider this file the database of systems to which your machine can connect. In this file, you will find entries of the format:

system_name Call_time Device speed phone_no. "login_sequence"
     |          |       |      |      |         |
     |          |       |      |      ------------> "Chat script"
     |          |       |      |
     |          |       |      --> Bits per second
     |          |       |          (for serial lines only)
     |          |       |
     |          |       ----> The name of a device found in the
     |          |             BNU "Devices" file.
     |          |
     |          ----> The "Time of Day" that calls out may be tried
     |                from your system to the system "system_name".
     |
     ----> The name that the remote system returns when the command
           "uuname -l" is issued from a shell prompt.

NOTE: The remote system will not be allowed access to your machine and your machine will not be allowed access to the remote machine if system_name does not match the output of the uuname -l command. This will be explained later.

system_name

This name is a handle that the BNU caller program, uucico, uses to associate the remote system to the dial-up and login information in your Systems file. A complete Systems file entry essentially contains all the information needed to call a specific system and log in as a specific user. When uucico calls the remote system, it will actually log in like any other user into a specially set up account that will invoke as its login shell uucico. When the remote system invokes uucico it will present its uuname to the calling host, your machine in this case. That uuname will must match the name you gave the remote system in your Systems file. If they do not match, your system will display the message WRONG MACHINE NAME and the call will fail.

Call_time

This field indicates when your machine can call out to the specified remote site. Normally for testing, this entry will simply read Any, which means this system can be called any time of the day. Other valid entries are Never, day of the week in the format MoTuWeThFrSaSu, weekdays only indicated by Wk, time of day specified by 24 hour times, such as 1800 (6:00pm) or 0800 (8:00am), and time of day specified by ranges such as 0600-1800. Ranges of times must be preceded by a day specification, such as Any0600=1800 or Mo0600-1800 . Read the IBM documentation for more specific usage information on this entry.

Device

This is the name of a device that is listed in the BNU Devices file. Only seven significant characters will be used, and the named device must exist in the Devices file. There are no other restrictions on the name. If you do not wish to use the Devices file, a hyphen (-) indicates a valid null device.

Speed

This is the connection speed for serial line communications. This field is required if you are using modem lines or a direct-connect serial line, that is, no modems, just one box connected serially to the other. If you are using a TCP connection device type, a special Devices file type, this field should be a hyphen (-).

Chat script

The phone_no and login_sequence are the heart of all BNU Systems file entries. The UUCP chat utility is what allows your machine to log in to other systems and start a BNU connection without your intervention. This sequence is broken up into send and expect fields. For every send, there is a corresponding expect until the last one. Basically, it works like this: send, the other end responds, send, the other end responds, and so on, until I am logged in. Think about it as: What would be entered, and what would the modem and/or the remote system respond if I were going to log in to the remote system? Normally, this sequence starts with the phone number of the remote system, if the remote system is to be connected over a modem, and is then followed by the sequence used to log in to the remote system. The login sequence will look something like:

  in:--in: <username> word: <password>

The login sequence usually begins with in:--in: which is the last three digits in the login: prompt separated by two hyphens (--). This sequence indicates that if login is not obtained within the default timeout period, the characters between the hyphens will return followed by a carriage return and wait for in: again. The following example, indicates to wait for in: and if it is not received, send hello and wait for howdy: in response.

  in:-hello-howdy:

The preceding example illustrates what role the -<string>- sequence plays in the expect portion of the chat sequence.

The next part of the chat sequence is usually the username of the remote site's UUCP account. This can be any login account the remote system administrator wants to set up to do UUCP but the default program that it calls must be uucico. Some sites accomplish this by creating a normal user and making the first line of the user's .profile call uucico but that is risky at best. The default directory of this user is usually /usr/spool/uucppublic but it is not a requirement.

The next part of the chat sequence is the expect word: which is the last five characters of the password: prompt. If the remote system were to say Enter your secret code: instead of prompting for the password:, this entry would be code: in the chat sequence.

The last entry in the chat sequence is usually the actual password of the account you will be using for UUCP on the remote system. This entry should result in a completed login and direct access to the uucico program. Some systems have two or more passwords per account, so you would simply add more expect - send entries onto the chat sequence to account for the difference.

NOTE: For quickest setup, it is suggested to copy the existing sample entry in the Systems file and to replace the system name, phone number, and account specific information, such as login name and password, from this default entry.


The Permissions file

The /usr/lib/uucp/Permissions file is used to create security control over machines attempting to communicate with your machine. There are some limitations. This file has two distinct entries, each accomplishing a different task. They are not related to each other.

The MACHINE= Line

The first entry in the Permissions file is the MACHINE= entry. This entry is used to establish the base permissions for a given site name. It will follow the format:

MACHINE=system_name REQUEST=yes READ=/ WRITE=/  COMMANDS=cmd:cmd
          |              |       |       |               |    |
          |              |       |       |        -------------
          |              |       |       |        |
          |              |       |       |        v
          |              |       |       |
          |              |       |       |        The commands that the
          |              |       |       |        remote uucico program
          |              |       |       |        may execute on your
          |              |       |       |        system.
          |              |       |       |
          |              |       |       --> The directories, 
          |              |       |           separated by ":"s, that
          |              |       |           the remote system may write
          |              |       |           to on your system.
          |              |       |
          |              |       --> The directories, separated by ":"s, 
          |              |           that the remote system may read on
          |              |           your system.
          |              |
          |              --> A yes/no toggle that indicates whether the
          |                  remote system may REQUEST that work files
          |                  be transfered (REQUEST=yes) or if it must wait
          |                  for your local system to initiate the request
          |                  (REQUEST=no).
          |
          --> The names of systems, separated by ":"s, that will have the
              same dial in/out parameters as listed by the rest of that
              line.  This name must match a name in the Systems file.

  1. The MACHINE= field on this line indicates the remote systems that are allowed to access your machine. This entry must have a corresponding system_name listed in the /usr/lib/uucp/Systems file; otherwise it is ignored. Several system names may be separated by colons (:) on one entry. All systems entered this way will have the same permissions, as dictated by the rest of the entry's fields.
  2. The REQUEST= field on this line indicates whether or not the users from remote systems may initiate requests to perform BNU jobs on your system. If you indicate yes then you must also indicate yes in the REQUEST= field for the LOGNAME= entry in this file. This line will be discussed later. An answer of yes means that remote users may spool jobs for your system and may request that files be transferred to and from your system. For secure systems, it is usually recommended that REQUEST=no be set so that only your machine can initiate job requests.
  3. The READ= field on this line indicates the directories and their subdirectories, separated by colons, that the remote system may have read access on your system. If you give the remote system access to / (root) then it will be able to read all directories on your machine, subject only to the normal AIX/UNIX permissions.

    NOTE: Giving the remote system read access to the root directory will allow it to read only those directories that the UUCP account can read. If your intention is to restrict access to only the uucppublic directory and the tmp directory, your READ= field would look like this:

       READ=/usr/spool/uucppublic:/tmp
    
  4. The WRITE= field on this line indicates which directories including their subdirectories, separated by colons, that the remote system may write to on your system. This works the same as the preceding READ= field but determines write access instead.
  5. The COMMANDS= field on this line indicates the commands, separated by colons, that the remote system may execute on your system. These commands can be the command name or the complete path to the command. This field also does not override normal file permissions to permit execution on your system. For the command to be executed, the UUCP user account on your machine must have permission to allow execution.

The LOGNAME= line

The other type of line in the Permissions file is used to establish the permissions for the login account that the remote system is using. Several of the fields for this line are the same as the MACHINE= fields of the same name. The primary difference is that these entries are specific to the login account that the remote system is using, where the MACHINE= fields are specific to the remote system's uuname. The LOGNAME= line has the format:

LOGNAME=username REQUEST=yes SENDFILES=yes READ=/ WRITE=/
           |              |             |       |       |
           |              |             |       ---------> Same as the MACHINE
           |              |             |                  entry from this
           |              |             |                  file.
           |              |             |
           |              |             --> Can be "yes" or "call" and is used
           |              |                 to indicate when the local system
           |              |                 is allowed to send files to the
           |              |                 remote system.
           |              |
           |              --> Same as the MACHINE entry for this file.
           |
           --> The user names separated by colons that remote systems will
               use to login on your machine.

  1. The LOGNAME= field on this line indicates the user names, separated by colons, that remote systems will use when logging into your machine. When a remote system logs into your machine, its user name will be checked against the Permissions file for an entry that has LOGNAME= as the first characters on the line. After uucico checks the LOGNAME= line, the permissions for that remotely logged in system will be set to the the permissions defined on the rest of the LOGNAME= line.
  2. The REQUEST= field is exactly the same as the MACHINE= line entry of the same name but it sets permissions based on the login name as opposed to the system name.
  3. The SENDFILES= field is only used on the LOGNAME= line and can be set to either yes or call. This field indicates when the local system may send files to a remote system. When the field is set to yes, the local system may send files or jobs to the remote system when either system initiates the call. When the field is set to call, the local system may only send files or jobs when the local system initiates the call. This means that with SENDFILES= set to call, when the remote system calls you, you can only receive files from the remote system when it calls your system but you can send and receive files from the remote system when you call the remote system.
  4. The READ= field is the same as the MACHINE= line entry of the same name but it sets permissions based on the login name as opposed to the system name.
  5. The WRITE= field is the same as the MACHINE= line entry of the same name but it sets permissions based on the login name, as opposed to the system name.

The Devices and Dialers files

The /usr/lib/uucp/Devices file is used by several programs including uucico to determine which device on your system to use for a given connection attempt. The cu program uses entries in this file for direct access to the tty port, Serial Line IP (SLIP) uses the Devices file for determining access to a tty for TCP/IP connections over serial line, and ECS, the IBMLINK connection facility, uses the Devices file to make modem connections to IBMLINK. As you can see, this file is very useful for many programs across the system. Its basic purpose is to define the device type, location, speed, and other basic communication parameters for the dial-out programs. It is only used for dial-out connections. In this file, you will see lines of the format:

device_name connection_port - speed dialer token
      |           |         |  |     |     |
      |           |         |  |     |     --> Determines whether the
      |           |         |  |     |         /usr/lib/uucp/Dialcodes file
      |           |         |  |     |         will be used with the phone
      |           |         |  |     |         number string that is in the
      |           |         |  |     |         Systems file.  Possible
      |           |         |  |     |         entries are "\T" and "\D"
      |           |         |  |     |         or blank which defaults to
      |           |         |  |     |         "\D".
      |           |         |  |     |
      |           |         |  |     --> The name of the entry from the
      |           |         |  |         /usr/lib/uucp/Dialers file to use.
      |           |         |  |         Normally set to "hayes" for modern
      |           |         |  |         modem use.
      |           |         |  |
      |           |         |  --> The speed of serial connections (in bits-
      |           |         |      per-second).  Will be "-" if the connection
      |           |         |      is through TCP and can be  "Any" if any
      |           |         |      speed is supported by the communication
      |           |         |      device.
      |           |         |
      |           |         --> Usually called "line2", this is the entry that
      |           |             was used (in the old days) for the Automatic
      |           |             Calling Unit (ACU).  The old style modems
      |           |             could not dial the telephone, so they had an
      |           |             ACU dial for them and then connect the phone
      |           |             line to the connection_port.
      |           |
      |           --> The physical port name of the outgoing connection.  This
      |               will be "-" for a TCP connection but is usually the
      |               tty name of the port with the modem attached.
      |
      --> The name you have chosen for the dial-out device.  For modems, a
          semi-standard has evolved to call this "ACU", but you can call the
          device by any name.  This name is the same one that you used in the
          3rd field of the Systems file entry, called Device_name earlier
          in this document.

  1. The device_name field is a user-specified name for the device you will be dialing out on. Except for a few reserved names, this name can be anything you choose. By convention, the name ACU is usually used for modem dial-out connections. The name ACU stands for Automatic Calling Unit. An ACU device used to be required for auto-dialing the telephone numbers for modems. The device would be attached to a second line and would dial the phone for the modem and then attach the telephone line to the modem for communication with the remote modem/system. Reserved device names are Direct and TCP. \ These two device names are used for direct connect serial connections (hard-wired, no modems) and connections using TCP/IP over a network. The cu program uses the Direct device to determine whether a device is available for dialing out when a phone number or system is specified that is not listed in the Systems file. Serial Line Internet Protocol (SLIP) also uses the Direct device to make a connection through a serial port.
  2. The connection_port field is used to specify the physical device that the named UUCP device will use. Normally, for serial communication, this is a tty device such as tty2. If the device_name specified is TCP, this field will be a - (hyphen) to indicate no physical tty will be used.
  3. The - (hyphen) field, or line2, is not usually used for anything other than a place holder. This field was once used for indicating the tty to which the auto-dialer was attached. In most modern setups, the modem does the dialing itself so the auto-dialer is not needed.
  4. The speed field is used to indicate the speed in bits per second of a serial line connection. If the device_name is TCP this field will be "-". If you do not wish to limit the speed of this device to a specific speed, you can specify the speed for a given connection in the Systems file, and use the keyword Any in this field. This will allow the same device to be used for several different systems that need to connect at different speeds.
  5. The dialer field is used to indicate the type of dialer that this device will normally use, as specified in the /usr/lib/uucp/Dialers file. Several default dialers are specified in the Dialers file. They are:
      hayes, penril, ventel, rixon, vadic, micom, TCP, and direct
    

    Each dialer specifies a different command set to use when attempting to dial the modem. In general, you will only be interested in three dialers: hayes, direct, and TCP. The hayes dialer is the standard command set used by most modems. If they have their own command set, they will usually also recognize the hayes AT command set. The direct dialer is essentially a dummy dialer, in that it does not specify any command set because it is used for connections that do not usually have a modem attached. The TCP dialer is effectively the same as the direct dialer but it is a keyword that the TCP/IP UUCP connections look for when making a call.

  6. The token indicates whether the Devices file should send the phone number as it is listed in the Systems file or whether it should interpret the number through the /usr/lib/uucp/Dialcodes file first. A \D indicates that the number should be checked with the Dialcodes file first, and a \T indicates that the number should be passed straight through to the Dialers file without interpretation. The Dialcodes file is used to make standardized names for certain parts of a phone number. For example, if you made frequent calls to a certain area code in San Francisco, you could create a Dialcodes entry that reads SFO 9,1415, which would be used in the phone number dial-string like this: SFO5551212 instead of 9,14155551212. The SFO would be changed by the Dialcodes file for you. Most people never use this feature of UUCP but for security reasons, it is usually recommended to make your token a \D.

Examples and notes

Sample entries for the BNU configuration files


Correlation of configuration files

Systems file:
            <System_name/i>>  Any  ACU 9600  9,1512-555-1111
Devices file:     _______________/
                 /
                ACU  tty0  -  Any      hayes   \D
Dialers file:      ______________________/
                  /
               hayes   =, -, "" \dAt\r\c OK ATDT\T\r\c CONNECT.... 

A note on bidirectional ports

With bidirectional ports, when the remote port is set for delay or getty -r and the chat script expects key input, in some cases, ports set for delay are expecting one or more carriage returns before proceeding with the login. If this is the case, try beginning the chat script on the dialing system with the following:

   ""\r\d\r\d\r\d\r in:--in: ...

Interpreted, the above reads: expect nothing, send return, delay, return, delay, return, delay, return.


[ Doc Ref: 90605226014696     Publish Date: Apr. 06, 2001     4FAX Ref: 8259 ]