UUCP (BNU) Helpful Information


Contents

About This Document
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 RS/6000. BNU (Basic Networking Utilities) is the AIX version of UUCP (UNIX-to-UNIX Copy Program). The terms "BNU" and "UUCP" are used interchangeably in this document. This document applies to AIX 3.1 and 3.2. It is divided into the following sections:


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 is used to make 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. It is executed by the BNU program when a remote computer that is not listed in the local Permissions file attempts to communicate with that local system.

The Poll file is used to schedule 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 with

 
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: Make Sure UUCP is Installed

Run the following command to make sure UUCP is installed on your system:
 
   lslpp -h bosext1.uucp.obj 

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

 
  bosext1.uucp.obj 

If you do not see this 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. Make sure that the new user's shell is not /usr/lib/uucp/uucico, and make the home directory /usr/lib/uucp.

    The suggested entry in /etc/passwd is:

     
      uucpadm:!:5:5::/usr/lib/uucp:/bin/ksh 
    
  2. Now, add machine logins to /etc/passwd. You have the option of maintaining separate logins or having one login for all UUCP connections. The rule of thumb here is that if you 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 4th 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 the 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 this:
     
       /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 read the current crontab 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. Then read the edited version into uucp's crontab with this command:
     
      crontab /tmp/cron.uucp 
    
  5. Check to make sure your changes took effect by running this command:
     
      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. Then 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 including 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)


UUCP (BNU) Helpful Information: uucp.total.32-41.zap ITEM: FAX
Dated: 99/01/13~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:03
Comments or suggestions? Contact us