UUCP (BNU) Helpful Information


Contents

About this document
    Related documentation
UUCP configuration files
Setting up UUCP
Phases of UUCP communication
Status messages and what to do about them
Parameters for chat scripts

About this document

This document is an aid to setting up UUCP (BNU) on your system. 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.

The information in this document applies to AIX Versions 4.x.

Related documentation

The AIX and product documentation library is also available:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html


UUCP configuration files

Description of files

The setup files for AIX UUCP are:

The Systems file lists remote computers with which the local system can communicate using BNU. This information is used by the uucico program to connect to the various systems. Consider this file the database of systems to which your machine can connect.

The Devices file lists each device on the local system that can dial out using BNU. The fields for each device include type, location, and speed. Only dial-out connections use the Devices file.

The Permissions file is used to create security control, with limitations, over machines attempting to communicate with your machine.

The Dialers file lists modems used by BNU and specifies the initial handshaking necessary for modem, TCP/IP, and remote communications. The most common types of dialers are "Hayes", "direct", and "TCP".

The Dialcodes file makes standardized names for certain parts of a phone number. For example, if you frequently make calls to a certain area code in San Francisco, you could create the following Dialcodes entry: "SFO9,1415".

The remote.unknown file is a shell script. The BNU program executes this file when a remote computer that is not listed in the local Permissions file attempts to communicate with that local system.

The Poll file schedules the polling of passing systems. Its format is similar to crontab. Poll format is <site name>, a tab, and the hours in which to poll (0-23) separated by spaces. Example:

   POLLDEMO   0 1 2 3 4 5 19 20 21 22 23

Correlation of files

The following diagram shows an example of the Systems, Devices, and Dialers files and shows how they relate to each other.

Systems file:
             <system_name>  Any  v32ibm  9600  555-1111
                 _______________/
Devices file:   /
             v32ibm  tty0  -  Any      ibm   \D
               ______________________/
Dialers file: /
             ibm   =, -, #" \d ATSFI\r\c#OK#AFE1SD3L2MIC0SCI\r\c#OK...

NOTE: Information in man pages gives a complete description of these files. (For example, type man Systems)

Sample setup of configuration files

The following is a sample setup for a modem connection.
The Systems file: 
 Danny Any v32ibm 9600 9,15551111 "" \d\d\d\r in:--in: uucp word: uucp 
The Devices file:
      v32ibm tty0 - Any ibm \D
The Dialers file:
      
      ibm   =,-,    "" \dAT\r\c OK \pATDT\T\r\c CONNECT
The Permissions file:
      MACHINE=Danny REQUEST=yes READ=/ WRITE=/  COMMANDS=ALL
      LOGNAME=uucp REQUEST=yes SENDFILES=yes READ=/ WRITE=/

With the above setup you could test the connection. Enter:

cu -d Danny
The cu command connects to another system, and the -d gives extra debug information.

Setting up UUCP

This section contains steps for setting up UUCP on your system. It is divided into the following parts:

Part One: Ensure UUCP is installed

Run the following command to ensure UUCP is installed on your system:
	lslpp -h bos.net.uucp

If UUCP is installed, you will see the following in the output:

	bos.net.uucp

If you do not see the preceding output, you will need to install it from the install tape.

Part Two: Add administrative and machine logins

With the following steps, edit /etc/passwd, /etc/group, /etc/security/login.cfg, and /etc/security/passwd to add the uucpadm login and other logins.

  1. In /etc/passwd, add a login with the same group and user ID as uucp. This will be helpful for several administrative tasks and for debugging. In addition, make the home directory /usr/lib/uucp, and ensure that the new user's shell is NOT /usr/lib/uucp/uucico.

    The suggested entry in /etc/passwd is:

      uucpadm:!:5:5::/usr/lib/uucp:/bin/ksh
    
  2. Add machine logins to /etc/passwd. You have the option of maintaining separate logins or having one login for all UUCP connections. If you do need to maintain complete control over access by each individual machine, you must create separate login IDs as well as combine the MACHINE and LOGNAME entries in the Permissions file. Here are a few examples from the /etc/passwd file:

    Umicrtk:!:105:5:micrtk uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico
    Ufloydl:!:106:5:floydl uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico
    Uicus:!:107:5:icus uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico
    Urisctkr:!:108:5::/usr/spool/uucppublic:/usr/lib/uucp/uucico
    

    If you want to have one set of permissions and do not want to maintain separate control for any of your UUCP connections, you can have a single login for all machines, such as the following:

       nuucp:!:6:5::/usr/spool/uucppublic:/usr/lib/uucp/uucico
    

    Field requirements: Notice that the user ID (the third colon separated field) is unique. It would be a security risk to have this ID be the same as another in the /etc/passwd file. The group ID (the fourth colon separated field) MUST be 5 - the same as group uucp. You can change the home directory (the sixth field) to any valid directory, but the login shell (the seventh field) MUST be /usr/lib/uucp/uucico.

  3. Add the new logins to /etc/group. An example of an entry in /etc/group is:
    uucp:!:5:uucp,uucpadm,nuucp,Umicrtk,Uicus,Urisctakr
    

    You may want to add any logins to group uucp that will be using modems to dial out with programs other than cu.

  4. Set up passwords for the logins. You must be logged on as root to do this. Type the following to set up the password for uucpadm.
       passwd uucpadm
    

  5. Add the login shell of your UUCP logins (/usr/lib/uucp/uucico) to the list of shells in /etc/security/login.cfg. Look for the shells = stanza and append /usr/lib/uucp/uucico to the end of the list.

  6. Modify the default herald in /u/security/login.cfg. Sometimes the default herald, with all of its control-Js, will cause a uucico process which is trying to log in to give up. (You may see the message Enough already.) You can avoid that by commenting out (with "*"s) the defport stanza and by defining a stanza for your tty; something like the example below.
       /dev/tty0:
       herald = "
    risc001 login: "
    

  7. You may need to change the flags in /etc/security/passwd. If you changed a password from the root login, the flags entry in the stanza for the user will contain the following:
      flags = ADMCHG
    

    Change it to:

      flags =
    

    Otherwise, when the remote uucico logs in, it will be prompted to enter a new password, which it cannot do. Hence the login will fail.

Part Three: Activate the cron daemon

  1. Log in as uucpadm

  2. Run the following command to gather the current crontab line entry for uucp into a temporary file:
      crontab -l > /tmp/cron.uucp
    
  3. Next, edit /tmp/cron.uucp and uncomment the entries (take out the "#"s at the beginning of the lines). The entries should look similar to:

    20,50 * * * * /bin/bsh -c "/usr/lib/uucp/uudemon.poll > /dev/null"
    25,55 * * * * /bin/bsh -c "/usr/lib/uucp/uudemon.hour > /dev/null"
    45 23 * * * /bin/bsh -c "/usr/lib/uucp/uudemon.cleanu > /dev/null"
    48 8,12,16 * * * /bin/bsh -c "/usr/lib/uucp/uudemon.admin > /dev/null"
    

    Entries can be changed to suit your needs.

  4. Now, to install the new edited version into uucp's crontab. Enter:
      crontab /tmp/cron.uucp
    
  5. Check to ensure that your changes took effect. Enter:
      crontab -l
    

Part Four: Set up the BNU configuration files

You can use the /usr/lib/uucp/uucpadm command to initially set up the files and edit them to suit your exact needs.


Phases of UUCP communication

UUCP error messages can be linked to specific phases in the conversation flow. Use the following diagram and the error descriptions in the following section to help you diagnose your UUCP problems. Some of the following messages may not be sent by the AIX version of UUCP (BNU), but they are included in case another UUCP version is in use on a different system platform.

                     U U C P   or   U U X
                              |
                              |
                            uucico
                              |
                              |
   PHASE 1:           System Verification
                              |
                              |
   PHASE 2:            Device Selection
                              |
                              |
   PHASE 3:           Link Establishment
                              |
                              |
   PHASE 4:             Login Sequence
                              |
                              |
   PHASE 5:    Data Transfer and File Execution
                              |
                              |
   PHASE 6:                Hangup

Status messages and what to do about them

The following messages are linked to specific phases in the conversation flow. See the diagram in the preceding section.

Phase 1 - System verification

Phase 2 - Device selection

Phase 3 - Link establishment

Phase 4 - Login sequence

Phase 5 - Data transfer and file execution

Phase 6 - Hangup


Parameters for chat scripts

A chat script is a login sequence - a list of expect-send sequences that a modem uses to establish a link with another modem. Chat scripts reside in the Systems file.

The following table is a list of parameters which can be edited into the chat scripts in the Systems file. The parameters listed in this table are the only parameters recognized for chat scripts in AIX.

Parameter Description
"" Null string
\N Null character
\b Backspace character
\c Suppress carriage return which is sent at end of send string
\d Delay 2 seconds
\p Pause for approximately 1/4 second
\K Send a break
\n Newline character
\r Carriage return character
\s Space character
\t Tab character
\\ Backslash character
BREAK Generate break signal (approx. 1/4 second)
EOT Send Control-D newline Control-D newline
\ddd Send octal character
\E Turn echo check on
\e Turn echo check off
WAIT=n Change to "n" seconds the timeout while waiting for the
next expect string (default is 45 sec)



[ Doc Ref: 90605225614694     Publish Date: Oct. 16, 2000     4FAX Ref: 1909 ]