************* BACK AND FORTH PAGING SUBROUTINE ************

PAGEFLOP

If they want to quit, do so
 If They want to quit subsession, Do SO!
  Decrement LOCAL and GLOBAL Page Counters

FORWARD

  Increment LOCAL and GLOBAL Page Counters
   *************** END PAGEFLOP *********************
  ****** CHAPTER INTERNAL SELECTOR ALGORITHM ******

SELECTOR

   Reset Local Page Counter

SELAGAIN

 CHECK IF ONLY A <CR>

WRONGSEL

YOUR SELECTION IS NOT IN THE 0 - #SELIMIT  RANGE  Please try again

AANVANG

Copyright CourseWare Technologies Inc. 1985-88


 Lesson - 5


  UUCP COMMUNICATIONS 

MENU

UUCP Communications|Topics to Learn|5-0|15,56
      #                    Topic
     ---                  -------
      1    -    Communication Using uucp
      2    -    Administering the UUCP System
      3    -    Locating UUCP Software
      4    -    Scheduling in the /usr/lib/crontab File
      5    -    Access Control
      6    -    The L.sys File
      7    -    The L-devices File
      8    -    The L-dialcodes File
      9    -    Setting up the Calling Port
     10    -    Cleanup with /etc/rc
     11    -    Conclusion
     12    -    Lesson Review
      0    -    Return to the Main Menu

P1

UUCP Communications|Communication Using uucp|5-1.1|9,55
      Sending mail to a system is just one of many 
functions in the UUCP command family.  uucp is one 
of most reliable, portable, and cheapest means for 
data transfer between UNIX systems.


      UUCP family commands perform file transfers 
between systems as well as system calls, maintain 
usage statistics, and insure security.

P2

UUCP Communications|Communication Using uucp|5-1.2|16,55
      The uucp command is used to copy files between
systems.  


      uucp copies each source file to the named
destination-file.  A filename may be a pathname on 
your machine, or may have the form system-name!pathname 
where the system name is taken from a list of system 
names that uucp knows about. 


      For example, to transfer the file admin to 
the directory /usr/learn on the system dual, the
command (under the C-Shell) would be:

uucp  admin  dual\!/usr/learn

P3

UUCP Communications|Communication Using uucp|5-1.3|8,55
      uucp has some built-in knowledge, especially 
when it comes to the home directories.  When a user's 
login name is prefixed with ~ in the uucp command line,
uucp will substitute the user's home directory.  For 
example, the command:

uucp  dual!~yori,

replaces ~yori with yori's HOME directory, /usr/yori.

P4

UUCP Communications|Communication Using uucp|5-1.4|11,57
     Often when you are transferring data that is not 
sensitive, you may send it to the UUCP PUBLIC directory,

/usr/spool/uucppublic


     For the uucp account, the HOME directory is:

/usr/spool/uucppublic

so when an absolute pathname is prefixed with ~, uucp
interprets ~ as /usr/spool/uucppublic.

P5

UUCP Communications|Communication Using uucp|5-1.5|7,44
     If the command is:

uucp  admin  cti!~/yori/learn/admin,

uucp will copy the admin file into the

/usr/spool/uucppublic/yori/learn/ directory.

P6

UUCP Communications|Communication Using uucp|5-1.6|11,56
     Your safest bet for a successful uucp transfer
is through the /usr/spool/uucppublic directories on 
both systems.  For example,

uucp  cti!~/yori/admin  ~/miked/admin

will copy the file admin from the directory 
/usr/spool/uucppublic/yori on the remote system cti 
into the file admin on the host system in the directory:

/usr/spool/uucppublic/miked

P7

UUCP Communications|Communication Using uucp|5-1.7|5,54
      The command for forward only copying of files 
from your host system to another system to which your 
system has a direct wire or a telephone connection is:

uuto
UUCP Communications|Communication Using uucp|5-1.7|3,54
      The -nuser option to the uucp command will
notify user, that is, send user mail that the
file was sent.

P8

UUCP Communications|Communication Using uucp|5-1.8|12,54
      Often you wish to use another system's resources 
such as tape drives, plotters, or printers.


      You may do this by transferring files first, then 
logging in remotely with cu, and executing the necessary 
commands; or you can accomplish all this by using the 
powerful UUCP-family command:

uux

the execute command on a UNIX system.

P9

UUCP Communications|Communication Using uucp|5-1.9|15,52
      The command that lets you check the status of 
UUCP activity on your system is uulog.  uulog allows 
you to obtain per user and per system uucp activity 
information.


      To obtain the status of UUCP activities for
the user david use:

uulog  -udavid


      To obtain the status of UUCP activities of the 
host system with the system cti use the command:

uulog  -scti

P10

UUCP Communications|Administering the UUCP System|5-2.1|13,57
      The actual usage of the communication commands 
is rather simple.  Because mail, cu and uucp are
themselves part of the network, it is important that 
the supporting UUCP files are set up properly.


      As a system administrator, you will have the task
of setting up the UUCP system, if someone else has not 
done so already.


      It is the intention of this section to guide you 
painlessly through the UUCP setup procedure!

P11

UUCP Communications|Administering the UUCP System|5-2.2|11,60
     Provided you follow this lesson closely, you
should have a sufficient background to start using
and, if necessary, to set up the required UUCP 
software.


     Remember that after you set up the first UUCP 
system, the second one will be infinitely easier.


     You will see examples in the next section. 

P12

UUCP Communications|Locating UUCP Software|5-3.1|5,54
     If you're lucky, everything for UUCP transfer is 
set up and the only thing you need to do is to type 
in the uucp command.  If you're not lucky, then you
have an even better reason to learn the "unmystical" 
procedure for setting up and managing the UUCP system.

P13

UUCP Communications|Locating UUCP Software|5-3.2|10,54
     Support for uucp is located in three major 
directories:

     *  /usr/bin         (user commands)
     *  /usr/lib/uucp    (operational commands)
     *  /usr/spool/uucp  (the spooling area)


     First, you should make sure these directories 
contain all of the programs and files that uucp needs.

P14

UUCP Communications|Locating UUCP Software|5-3.3|6,50
     In the /usr/bin directory you should find:

                *  uucp, 
                *  uux, 
                *  uulog, and 
                *  uuname.
UUCP Communications|Locating UUCP Software|5-3.3|12,50
     In the /usr/bin directory you should find:

??talk about encode decode poll send snap somewhere
                *  uucp, 
                *  uudecode,
                *  uuencode,
                *  uulog,
                *  uuname,
                *  uupoll,
                *  uuq,
                *  uusend,
                *  uusnap, and
                *  uux.

P15

UUCP Communications|Locating UUCP Software|5-3.4|9,54
     Check the /usr/lib/uucp directory for the 
programs:

                *  uucico, 
                *  uuclean, and 
                *  uuxqt.  

If these are missing, check your distribution kit,
or call your UNIX system sales office.

P16

UUCP Communications|Locating UUCP Software|5-3.5|9,54
     Next, check the /etc/passwd file for the login 
name uucp, and verify that the home directory is
/usr/spool/uucppublic.


     Also make sure that the login shell for UUCP is 
/usr/lib/uucp/uucico.  uucico is the copy in, copy 
out program that performs actual data transfer for 
UUCP.  Therefore, when uucp logs in, uucico is invoked 
to perform data transfer.

P17

UUCP Communications|Scheduling in the crontab File|5-4.1|8,54
     To assure that a constant attempt is being made 
to transfer the queued files, enter uucico into 
your /usr/lib/crontab file.  (If you don't have
one, now is a good time to create one.)

The line should look something like this:

1 * * * *   su - uucp -c /usr/lib/uucp/uucico -r1

P18

UUCP Communications|Scheduling in the crontab File|5-4.2|11,54
     As uucp operates, it creates and/or expands 
many files in the UUCP directories.  The uuclean 
program will clean up these files for you.  Thus 
/usr/lib/uucp/uuclean should also be placed into 
the /usr/lib/crontab file.

The line should look something like this:

  1 * * * *   su - uucp -c /usr/lib/uucp/uuclean -p

(This says that an attempt is made every minute.)

P19

UUCP Communications|Access Control|5-5.1|13,55
     The file that contains the information about 
who can access the files on your system is 
/usr/lib/uucp/USERFILE.


     USERFILE specifies four types of constraints:

1.  files that can be accessed by a user of the host 
    machine,
2.  files that can be accessed from a remote computer,
3.  login name used by a particular remote computer, 
4.  whether a remote computer should be called back 
    to confirm its identity.

P20

UUCP Communications|Access Control|5-5.2|7,54
     Each line in the file USERFILE has the format:

login,sys [c] pathname [pathname]

where:
        login is the login name,
          sys is the system name for the remote computer,
            c is the optional call-back flag.

P21

UUCP Communications|Access Control|5-5.3|9,52
     Rather than going into a more theoretical 
discussion, let's look at some examples of the 
information that goes into the USERFILE.


a,b /usr/admin 

allows machine b to log in with the name a and 
request the transfer of all files whose pathnames 
begin with /usr/admin.

P22

UUCP Communications|Access Control|5-5.4|15,54
     In /usr/lib/uucp/USERFILE, the line

paul, /usr/paul

allows the user paul to issue commands for files 
whose names start with /usr/paul while the lines:

a,b /usr/paul /usr/spool
a, /usr/spool

mean that any remote machine can login with the login 
name a.  However, if the system name is not b, then the
system can ask for transfer of files beginning with
with /usr/spool.  If the system is b, it can also
read files from /usr/paul.

P23

UUCP Communications|Access Control|5-5.5|6,54
     The lines that allow any user to transfer files 
beginning with /usr, and the lines that allow the 
user root to transfer any file are:

root, /
, /usr

P24

UUCP Communications|The L.sys File|5-6.1|3,50
     The L.sys file contains the phone numbers
and login sequences required to establish a 
connection with a UUCP daemon on another machine.

P25

UUCP Communications|The L.sys File|5-6.2|12,54
     The fields of each line in the L.sys file are 
as follows:

     name  -  name of the remote system,
     time  -  time when the remote system may be called,
   device  -  local device that can be used for calling 
              the remote system,
    speed  -  baud rate for the call,
    phone  -  phone number,
    login  -  login sequence ended with a password that 
              uucp uses to establish a login on the 
              remote system.

P26

UUCP Communications|The L-devices File|5-7.1|8,54
     The /usr/lib/uucp/L-devices file contains the 
list of all lines that are directly connected to other 
systems or are available for calling other systems.


     The format of this file is:

device  line  call-device  speed  protocol

P27

UUCP Communications|The L-devices File|5-7.2|11,53
     Some of the possible entries in your L-devices 
file, which you may need to modify include:

            DIR  serial  0     2400
            ACU  cul0    cua0  1200
            DIR  x25.s0  0      300 x

where DIR means direct connection; ACU stands for 
automatic calling unit; serial, cu10, x25.s0 are 
various lines; 0 means any call unit; 300, 1200 and 
2400 are speeds, and x25 is the X25 protocol!

P28

UUCP Communications|The L-dialcodes File|5-8.1|11,52
     The /usr/lib/uucp/L-dialcodes file contains a
listing of the dial-codes and any possible abbreviations 
used by the system.  The format of an entry is:

abbreviation   dial-sequence

The line:                 py 165-

would establish that entry py would send 165- to the 
dial unit.

P29

UUCP Communications|Setting up the Calling Port|5-9.1|10,54
     You must turn off the login capability from the 
port that you plan to use for calling another system.  
You do this by changing a line in /etc/inittab to 
hold back the getty process, that is, change

getty ttya3 ....

to

getty ttya3 ...
UUCP Communications|Setting up the Calling Port|5-9.1|10,54
     You must turn off the login capability from the 
port that you plan to use for calling another system.  
You do this by changing a line in /etc/ttys to hold 
back the getty process, that is, change:

1mttya3

to

0mttya3
UUCP Communications|Setting up the Calling Port|5-9.1|15,50
     You must create the appropriate device for your
modem (connected, for example, to ttya) with the 
following series of commands:

          # cd /dev
          # mknod cua0 c 12 128
          # chmod 600 cua0
          # chown uucp cua0
          # mv ttya ttyd0


     Then edit /etc/ttys to include an entry 
for ttyd0: 

13ttyd0

P30

UUCP Communications|Cleanup with /etc/rc|5-10.1|10,60
     Periodically you will need to clean up the UUCP
status files to which uucp writes every time it processes
a command.  Similarly, you need to delete various lock 
files.  So please put the following lines into your 
/etc/rc file:

rm -f /usr/spool/uucp/LCK*     (locks up port)
rm -f /usr/spool/uucp/LOGFILE  (log of UUCP activity)
rm -f /usr/spool/uucp/SYSLOG   (log of UUCP file transfers)
rm -f /usr/spool/uucp/STS*     (locks access to named system)

P31

UUCP Communications|Cleanup with /etc/rc|5-10.2| 6,54
     The LCK* files lock up the port, and the 
STST.sysname file locks up the access to the system 
sysname while the transmission is in progress.  These
lock files remain if communication fails for any reason.  
The LOGFILE and SYSLOG are UUCP statistical files.

P32

UUCP Communications|Conclusion|5-11.1|10,60
     To review, when setting up the UUCP software you
may have to:

 *  modify the login sequence more than once in the L.sys 
    file, 
 *  verify that the dial out port is disabled, 
 *  verify that the protections in the USERFILE and the 
    devices in the L-devices file are properly set up, and
 *  use the /usr/spool/uucp/LOGFILE and /usr/spool/uucp/ERRLOG 
    files to diagnose errors if any do occur.