formatting glitches
[unix-history] / usr / src / usr.bin / uucp / SMM.doc / uucpimpl / implement.ms
CommitLineData
a9073747
KM
1.\" Copyright (c) 1986 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)implement.ms 6.2 (Berkeley) %G%
10bd7bb5 6.\"
10bd7bb5 7.TL
a9073747
KM
8Installation and Operation of UUCP
9.br
104.3BSD Edition
11.AU
12D. A. Nowitz
13.AI
14.MH
15.AU
16Ross Green
17.AI
18Computer Systems Research Group
19Computer Science Division
20Department of Electrical Engineering and Computer Science
21University of California, Berkeley
22Berkeley, CA 94720
10bd7bb5 23.AB
10bd7bb5
KM
24Uucp is a series of programs designed to permit communication between
25.UX
26systems using either dial-up or
27hardwired communication lines.
28It is used for file transfers and remote command execution.
29The first version of the system was designed and implemented
a9073747
KM
30by M. E. Lesk (SMM:21).
31.LP
32There have been many changes to the implementation of UUCP
33since the release of 4.2BSD.
34Many problems been fixed,
35and several improvements to provide greater throughput have been incorporated.
36A number of new features and facilites have been added,
37these include:
38.IP \(bu 3
39Improved administration.
40.IP \(bu 3
41Extended modem support.
42.IP \(bu 3
43New transfer protocols
44.IP \(bu 3
45Security enhancements.
46.PP
47The first part of this document gives a detailed
48description of the use of UUCP.
49The rest of the document indicates the changes that have been made to UUCP,
50and provides an update on the installation and implementation details.
51It is for use by an administrator/installer of the system;
52it is not meant as a user's guide.
53.sp
54.LP
55Revised
56.AE
10bd7bb5 57.LP
a9073747
KM
58.OH 'Installation and Operation of UUCP''SMM:9-%'
59.EH 'SMM:9-%''Installation and Operation of UUCP'
60.NH
61Uucp Implementation Description
62.PP
10bd7bb5
KM
63Uucp is a batch type operation.
64Files are created in a spool directory for processing
65by the uucp demons.
66There are three types of files used for the execution
67of work.
68.I Data\ files
69contain data for transfer to remote systems.
70.I Work\ files
71contain directions for file transfers between systems.
72.I Execution\ files
73are directions for
74.UX
75command executions which
76involve the resources of one or more systems.
77.LP
a9073747 78The uucp system consists of ten primary and four
10bd7bb5 79secondary programs.
a9073747
KM
80These programs are summaried in section 9.
81The three most important primary programs are:
10bd7bb5
KM
82.RS
83.IP uucp 10
84This program creates work and gathers data files in the spool directory
85for the transmission of files.
86.IP uux
87This program creates work files, execute files and gathers data files for the remote execution of
88.UX
89commands.
a9073747
KM
90.IP uulog
91This program updates the log file with new entries
92and reports on the status of uucp requests.
93.RE
94.ne 10
95.LP
96The three most important secondary programs are:
97.RS
98.IP uucico 10
10bd7bb5
KM
99This program executes the work files for data transmission.
100.IP uuxqt
101This program executes the execution files for
102.UX
103command execution.
10bd7bb5
KM
104.IP uuclean
105This program removes old files from the spool directory.
10bd7bb5 106.RE
a9073747
KM
107.LP
108The next six sections of this paper will describe the operation
109of each program.
110the installation of the system,
10bd7bb5
KM
111the security aspects of the system,
112the files required for execution,
113and the administration of the system.
114.NH
115Uucp - UNIX to UNIX File Copy
116.LP
117The
118.I uucp
119command is the user's primary interface with the system.
120The
121.I uucp
122command was designed to look like
123.I cp
124to the user.
125The syntax is
126.IP
127.I uucp\ \
128.B [
129option
130.B ]
131\ ...\ \ source\ ...\ \ destination
132.LP
133where the source and destination
134may contain the prefix
135.I system-name!
136which indicates the system on which the file
137or files reside
138or where they will be copied.
139.LP
140The options interpreted by
141.I uucp
142are:
143.RS
144.IP \-d 10
145Make directories when necessary for copying the file.
146.IP \-c
147Don't copy source files to the spool directory,
148but use the specified source when the actual
149transfer takes place.
150.IP \-g\fIletter\fR
151Put
152.I letter
153in as the grade in the name of the work file.
154(This can be used to change the order of work for a particular
155machine.)
156.IP \-m
157Send mail on completion of the work.
158.LP
159The following options are used primarily for debugging:
160.IP \-r 10
161Queue the job but do not start
162.I uucico
163program.
164.IP \-s\fIdir\fR
165Use directory
166.I dir
167for the spool directory.
168.IP \-x\fInum\fR
169.I Num
170is the level of debugging output desired.
171.RE
172.LP
173The destination may be a directory name,
174in which case the file name is taken from the last part of the
175source's name.
176The source
177name may contain special shell characters
178such as ``\fI?*[]\fR''.
179If a source argument has a
180.I system-name!
181prefix for a remote system,
182the file name expansion will be done on the remote system.
183.LP
184The command
185.IP "" 12
186uucp\ \ *.c\ \ usg!/usr/dan
187.LP
188will set up the transfer of all files whose names end with ``.c''
189to the ``/usr/dan'' directory on the``usg'' machine.
190.LP
191The source and/or destination names may also contain a
192.I ~user
193prefix.
194This translates to the login directory on
195the specified system.
196For names with partial path-names,
197the current directory is prepended to the file name.
198File names with
199.I ../
200are not permitted.
201.LP
202The command
203.IP "" 12
204uucp\ \ usg!~dan/*.h\ \ ~dan
205.LP
206will set up the transfer of files whose names end with ``.h''
207in dan's login
208directory on system ``usg'' to dan's local
209login directory.
210.LP
211For each source file,
212the program will check the source and destination
213file-names
214and the system-part of each to
215classify the work into one of five types:
216.RS
217.IP [1]
218Copy source to destination on local system.
219.IP [2]
220Receive files from other systems.
221.IP [3]
222Send files to a remote systems.
223.IP [4]
224Send files from remote systems
225to another remote system.
226.IP [5]
227Receive files from remote systems when the source
228contains special shell characters as
229mentioned above.
230.RE
231.LP
232After the work has been set up in the spool directory,
233the
234.I uucico
235program is started to try to contact the other
236machine to execute the work (unless the \-r option
237was specified).
238.SH
239Type 1
240.LP
241A
242.I cp
243command is used to do the work.
244The
245.I \-d
246and the
247.I \-m
248options are not honored in this case.
249.SH
250Type 2
251.LP
252A one line
253.I "work file"
254is created for each file requested and put in the spool directory
255with the following fields, each separated by a blank.
256(All
257.I "work files"
258and
259.I "execute files"
260use a blank as the field separator.)
261.RS
262.IP [1]
263R
264.IP [2]
265The full path-name of the source or a ~user/path-name.
266The
267.I ~user
268part will be expanded on the remote system.
269.IP [3]
270The full path-name of the destination file.
271If the
272.I ~user
273notation is used, it will be immediately
274expanded to be the login directory for the user.
275.IP [4]
276The user's login name.
277.IP [5]
278A ``\-'' followed by an option list.
279(Only the \-m and \-d options will appear in this list.)
280.RE
281.KS
282.SH
283Type 3
284.LP
285For each source file, a
286.I "work file"
287is created and the source file is copied into a
288.I "data file"
289in the spool directory.
290(A ``\-c'' option on the
291.I uucp
292command will prevent the
293.I "data file"
294from being made.)
295In this case, the file will be transmitted from
296the indicated source.)
297The fields of each entry are given below.
298.RS
299.IP [1]
300S
301.IP [2]
302The full-path name of the source file.
303.IP [3]
304The full-path name of the destination or
305~user/file-name.
306.IP [4]
307The user's login name.
308.IP [5]
309A ``\-'' followed by an option list.
310.IP [6]
311The name of the
312.I "data file"
313in the spool directory.
314.IP [7]
315The file mode bits of the source file
316in octal print format
317(e.g. 0666).
318.RE
319.KE
320.SH
321Type 4 and Type 5
322.LP
323.I Uucp
324generates a
325.I uucp
326command and sends it to the remote machine;
327the remote
328.I uucico
329executes the
330.I uucp
331command.
332.NH
333Uux - UNIX To UNIX Execution
334.LP
335The
336.I uux
337command is used to set up the execution of a
338.UX
339command
340where the execution machine and/or some of the
341files are remote.
342The syntax of the uux command is
343.IP
344.I uux\ \
345.B [
346\-
347.B "] ["
348option
349.B ]
350\ ...\ \ command-string
351.LP
352where the command-string is made up of one or more arguments.
353All special shell characters such as ``<>|^'' must be quoted
354either by quoting the entire command-string
355or quoting the character as a separate argument.
356Within the command-string, the command and file names may
357contain a
358.I system-name!
359prefix.
360All arguments which do not contain a ``!'' will not
361be treated as files.
362(They will not be copied to the execution machine.)
363The ``\-'' is used to indicate that the standard input
364for
365.I command-string
366should be inherited from the standard input
367of the
368.I uux
369command.
370The options, essentially for debugging, are:
371.RS
372.IP \-r 10
373Don't start
374.I uucico
375or
376.I uuxqt
377after queuing the job;
378.IP \-x\fInum\fR
379Num is the level of debugging output desired.
380.RE
381.LP
382The command
383.IP "" 12
384pr\ \ abc\ \ |\ \ uux\ \ \-\ \ usg!lpr
385.LP
386will set up the output of ``pr abc''
387as standard input to an lpr command
388to be executed on system ``usg''.
389.LP
390.I Uux
391generates an
392.I "execute file"
393which contains the
394names of the files required
395for execution (including standard input),
396the user's login name, the destination
397of the standard output, and the command to be executed.
398This file is either put in the spool directory
399for local execution or sent to the remote system using
400a generated send command (type 3 above).
401.LP
402For required files which are not on the execution machine,
403.I uux
404will generate receive command files (type 2 above).
405These command-files will be put on the execution machine and
406executed by the
407.I uucico
408program.
409(This will work only if the local system has permission
410to put files in the remote spool directory as controlled
411by the remote
412.I USERFILE .
413)
414.LP
415The
416.I "execute file"
417will be processed
418by the
419.I uuxqt
420program on the execution machine.
421It is made up of several lines,
422each of which contains an identification character
423and one or more arguments.
424The order of the lines in the file is not relevant
425and some of the lines may not be present.
426Each line is described below.
427.RS
428.SH
429User Line
430.IP
431U\ \ user\ \ system
432.LP
433where the
434.I user
435and
436.I system
437are the requester's login name and system.
438.SH
439Required File Line
440.IP
441F file-name real-name
442.LP
443where the
444.I file-name
445is the generated name of a file for the execute machine
446and
447.I real-name
448is the last part of the actual file name (contains no
449path information).
450Zero or more of these lines may be present in the
451.I "execute file" .
452The
453.I uuxqt
454program will check for the existence of all required
455files before the command is executed.
456.SH
457Standard Input Line
458.IP
459I\ \ file-name
460.LP
461The standard input is either specified by a ``<'' in the
462command-string or inherited from the standard input of the
463.I uux
464command if the ``\-'' option is used.
465If a standard input is not specified,
466``/dev/null'' is used.
467.SH
468Standard Output Line
469.IP
470O\ \ file-name\ \ system-name
471.LP
472The standard output is specified by a ``>'' within the
473command-string.
474If a standard output is not specified,
475``/dev/null'' is used.
476(Note \- the use of ``>>'' is not implemented.)
477.SH
478Command Line
479.IP
480C\ \ command\ \
481.B [
482arguments
483.B ]
484\ ...
485.LP
486The arguments are those specified in the command-string.
487The standard input and standard output will not appear on this
488line.
489All
490.I "required files"
491will be moved to the execution directory (a subdirectory
492of the spool directory)
493and the
494.UX
495command is executed using the Shell specified in the
496.I uucp.h
497header file.
498In addition, a shell ``PATH'' statement is prepended
499to the command line as specified in the
500.I uuxqt
501program.
502.LP
503After execution, the standard output is copied or set up to be
504sent to the proper place.
505.RE
506.NH
a9073747
KM
507Uulog - Uucp Log Inquiry
508.LP
509The
510.I uucp
511programs create individual
512log files for each program invocation.
513Periodically,
514.I uulog
515may be executed to prepend these files to the
516system logfile.
517This method of logging was chosen to minimize file
518locking of the logfile during program execution.
519.LP
520The
521.I uulog
522program merges the individual
523log files and outputs specified log entries.
524The output request is specified by the use of the
525following options:
526.RS
527.IP \-s\fIsys\fR 9
528Print entries where
529.I sys
530is the remote system name;
531.IP \-u\fIuser\fR
532Print entries for user
533.I user.
534.RE
535.LP
536The intersection of lines satisfying the two options is output.
537A null
538.I sys
539or
540.I user
541means all system names or users respectively.
542.NH
10bd7bb5
KM
543Uucico - Copy In, Copy Out
544.LP
545The
546.I uucico
547program will perform the following major functions:
548.RS
549.IP -\ \ 3
550Scan the spool directory for work.
551.IP -\ \
552Place a call to a remote system.
553.IP -\ \
554Negotiate a line protocol to be used.
555.IP -\ \
556Execute all requests from both systems.
557.IP -\ \
558Log work requests and work completions.
559.RE
560.LP
561.I Uucico
562may be started in several ways;
563.RS
564.IP a) 5
565by a system daemon,
566.IP b)
567by one of the
568.I
569uucp, uux, uuxqt
570.R
571or
572.I uucico
573programs,
574.IP c)
575directly by the user (this is usually for testing),
576.IP d)
577by a remote system.
578(The uucico program should be specified as the ``shell''
579field in the ``/etc/passwd'' file for the ``uucp'' logins.)
580.RE
581.LP
582When started by method a, b or c, the program is considered to
583be in
584.I MASTER
585mode.
586In this mode, a connection will be made to a remote system.
587If started by a remote system (method d),
588the program is considered to be in
589.I SLAVE
590mode.
591.LP
592The
593.I MASTER
594mode will operate in one of two ways.
595If no system name is specified
596(\-s option not specified)
597the program will scan the spool directory for
598systems to call.
599If a system name is specified, that system will be called,
600and work will only be done for that system.
601.LP
602The
603.I uucico
604program is generally started by another program.
605There are several options used for execution:
606.RS
607.IP \-r1 10
608Start the program in
609.I MASTER
610mode.
611This is used when
612.I uucico
613is started by a program or ``cron'' shell.
614.IP \-s\fIsys\fR
615Do work only for system
616.I sys.
617If
618.I \-s
619is specified,
620a call to the specified system
621will be made even if there is no work for system
622.I sys
623in the spool directory.
624This is useful for polling systems which do not have
625the hardware to initiate a connection.
626.LP
627The following options are used primarily for debugging:
628.IP \-d\fIdir\fR
629Use directory
630.I dir
631for the spool directory.
632.IP \-x\fInum\fR
633.I Num
634is the level of debugging output desired.
635.RE
636.LP
637The next part of this section will describe the major steps within
638the
639.I uucico
640program.
641.SH
642Scan For Work
643.LP
644The names of the work related files in the spool directory have format
645.IP
646type . system-name grade number
647.LP
648where:
649.IP
650.I Type
651is an upper case letter,
652(
653.I C
654-\ copy command file,
655.I D
656-\ data file,
657.I X
658-\ execute file);
659.IP
660.I System-name
661is the remote system;
662.IP
663.I Grade
664is a character;
665.IP
666.I Number
667is a four digit, padded sequence number.
668.LP
669The file
670.IP "" 12
671C.res45n0031
672.LP
673would be a
674.I "work file"
675for a file transfer between the local
676machine and the ``res45'' machine.
677.LP
678The scan for work is done by looking through the
679spool directory for
680.I "work files"
681(files with prefix ``C.'').
682A list is made of all systems to be called.
683.I Uucico
684will then call each system and process all
685.I "work files" .
686.SH
687Call Remote System
688.LP
689The call is made using information from several
690files which reside in the uucp program directory.
691At the start of the call process, a lock is
692set to forbid multiple conversations
693between the same two systems.
694.LP
695The system name is found in the
696.I L.sys
697file.
a9073747
KM
698The precise format of the
699.I L.sys
700file is described in section 10, ``System File Details''.
10bd7bb5
KM
701The information contained for each system is;
702.RS
703.IP [1]
704system name,
705.IP [2]
706times to call the system
707(days-of-week and times-of-day),
708.IP [3]
709device or device type to be used for call,
710.IP [4]
711line speed,
712.IP [5]
713phone number if field [3] is
714.I ACU
715or the device name (same as field [3])
716if not
717.I ACU,
718.IP [6]
719login information (multiple fields),
720.RE
721.LP
722The time field is checked against the present time to see
723if the call should be made.
724.LP
725The
726.I
727phone number
728.R
729may contain abbreviations (e.g. mh, py, boston) which get translated into dial
730sequences using the
731.I L-dialcodes
732file.
733.LP
734The
735.I L-devices
736file is scanned using fields [3] and [4] from the
737.I L.sys
738file to find an available device for the call.
739The program will try all devices which satisfy
740[3] and [4] until the call is made, or no more
741devices can be tried.
742If a device is successfully opened, a lock file
743is created so that another copy of
744.I uucico
745will not try to use it.
746If the call is complete, the
747.I
748login information
749.R
750(field [6] of
751.I L.sys )
752is used to login.
753.LP
754The conversation between the two
755.I uucico
756programs begins with a handshake started by the called,
757.I SLAVE ,
758system.
759The
760.I SLAVE
761sends a message to let the
762.I MASTER
763know it is ready to receive the system
764identification and conversation sequence number.
765The response from the
766.I MASTER
767is
768verified by the
769.I SLAVE
770and if acceptable, protocol selection begins.
771The
772.I SLAVE
773can also reply with a ``call-back required''
774message in which case, the current conversation
775is terminated.
776.SH
777Line Protocol Selection
778.LP
779The remote system sends a message
780.IP "" 12
781P\fIproto-list\fR
782.LP
783where proto-list is a string of characters, each
784representing a line protocol.
785.LP
786The calling program checks the proto-list
787for a letter corresponding to an available line
788protocol and returns a
789.I use-protocol
790message.
791The
792.I use-protocol
793message is
794.IP "" 12
795U\fIcode\fR
796.LP
797where code is either a one character
798protocol letter or
799.I N
800which means there is no common protocol.
801.SH
802Work Processing
803.LP
804The initial roles (
805.I MASTER
806or
807.I SLAVE
808) for the work processing are
809the mode in which each program starts.
810(The
811.I MASTER
812has been specified by the ``\-r1'' uucico option.)
813The
814.I MASTER
815program does a work search similar to the
816one used in the ``Scan For Work'' section.
817.LP
818There are five messages used during the
819work processing, each specified by the first
820character of the message.
821They are;
822.IP "" 12
823.RS
824.IP S 3
825send a file,
826.IP R
827receive a file,
828.IP C
829copy complete,
830.IP X
831execute a
832.I uucp
833command,
834.IP H
835hangup.
836.RE
837.LP
838The
839.I MASTER
840will send
841.I R ,
842.I S
843or
844.I X
845messages until all work from the spool directory is
846complete, at which point an
847.I H
848message will be sent.
849The
850.I SLAVE
851will reply with
852\fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR,
a9073747 853\fIXY\fR, \fIXN\fR,
10bd7bb5
KM
854corresponding to
855.I yes
856or
857.I no
858for each request.
859.LP
860The send and receive replies are
861based on permission to access the
862requested file/directory using the
863.I USERFILE
864and read/write permissions of the file/directory.
865After each file is copied into the spool directory
866of the receiving system,
867a copy-complete message is sent by the receiver of the file.
868The message
869.I CY
870will be sent if the
871file has successfully been moved from the
872temporary spool file to the actual destination.
873Otherwise, a
874.I CN
875message is sent.
876(In the case of
877.I CN ,
878the transferred file will be in the spool
879directory with a name beginning with ``TM'.)
880The requests and results are logged on both systems.
881.LP
882The hangup response is determined by the
883.I SLAVE
884program by a work scan of the spool directory.
885If work for the remote system exists in the
886.I SLAVE's
887spool directory, an
888.I HN
889message is sent and the programs switch roles.
890If no work exists, an
891.I HY
892response is sent.
893.SH
894Conversation Termination
895.LP
896When a
897.I HY
898message is received by the
899.I MASTER
900it is echoed back to the
901.I SLAVE
902and the protocols are turned off.
903Each program sends a final ``OO'' message to the
904other.
905The original
906.I SLAVE
907program will clean up and terminate.
908The
909.I MASTER
910will proceed to call other systems
911and process work as long as possible
912or terminate if a
913.I \-s
914option was specified.
915.LP
916.NH
917Uuxqt - Uucp Command Execution
918.LP
919The
920.I uuxqt
921program is used to execute
922.I
923execute files
924.R
925generated by
926.I uux.
927The
928.I uuxqt
929program may be started by either the
930.I uucico
931or
932.I uux
933programs.
934The program scans the spool directory for
935.I
936execute files
937.R
938(prefix ``X.'').
939Each one is checked to see if all the required files are available and
940if so, the command line or send line is executed.
941.LP
942The
943.I
944execute file
945.R
946is described in the ``Uux''
947section above.
948.SH
949Command Execution
950.LP
951The execution is accomplished by executing a
952.I
953sh \-c
954.R
955of the command line after appropriate
956standard input and standard output have been opened.
957If a standard output is specified, the program
958will create a send command or copy the output
959file as appropriate.
960.NH
10bd7bb5
KM
961Uuclean - Uucp Spool Directory Cleanup
962.LP
963This program is typically started by the daemon, once a day.
964Its function is to remove files from the spool directory which
965are more than 3 days old.
966These are usually files for work which can not be completed.
967.LP
968.LP
969The options available are:
970.RS
971.IP \-d\fIdir\fR 10
972The directory to be scanned is
973.I dir .
974.IP \-m
975Send mail to the owner of each file being removed.
976(Note that most files put into the spool directory
977will be owned by the owner of the
978uucp programs since the setuid bit will be set on these
979programs.
980The mail will therefore most often go to the owner
981of the uucp programs.)
982.IP \-n\fIhours\fR
983Change the aging time from 72 hours to
984.I hours
985hours.
986.IP \-p\fIpre\fR
987Examine files with prefix
988.I pre
989for deletion.
990(Up to 10 file prefixes may be specified.)
991.IP \-x\fInum\fR
992This is the level of debugging output desired.
993.RE
994.NH
a9073747
KM
995Changes to the UUCP Implementation
996.PP
997The demands placed on UUCP networking,
998and new technology,
999have prompted several changes and improvements to the UUCP software.
1000Such things as low cost, autodial, autoanswer, high speed modems,
1001and the availability of X.25 and TCP/IP as carriers,
1002have encouraged new facilities in UUCP to be developed.
1003.PP
1004The following areas have been changed between the 4.2 and 4.3 BSD releases.
1005.IP \(bu 3
1006General fixes and performance improvements.
1007.IP \(bu 3
1008Administration control facilites.
1009.IP \(bu 3
1010Modem and autodialer support has been extended.
1011.IP \(bu 3
1012New protocols for different transport media.
1013.IP \(bu 3
1014Security enhancements.
1015.SH
1016Fixes and performance improvements.
1017.PP
1018Many of the fixes related to portability considerations,
1019and improvements as provided by the USENET community.
1020.PP
1021The \fIsitename\fR truncation length as been extended to 14 characters from
1022the original 7 characters.
1023This maintains compatibility with the current System V version of UUCP.
1024.PP
1025An effort as been made to improve the overall performance of the UUCP system
1026by organizing its workload in a more sensible way.
1027For example the program \fIuucico\fR will not resend files it has already sent,
1028when the files are specified in one ``C.'' file.
1029.SH
1030Administration and control facilities.
1031.PP
1032There is a new program, \fIuuq\fR,
1033to give more descriptive information on status of jobs in the UUCP spool queue.
1034It also allows the user to delete spooled requests,
1035still in the queue.
1036.PP
1037In the past, on large UUCP sites,
1038the spool directory could grow large with many files
1039within the ``/usr/spool/uucp'' directory.
1040To help the UUCP administrator control the system,
1041a number of subdirectories have been created to easy this congestion.
1042.PP
1043The system status ``STST'' files are kept in a subdirectory.
1044.PP
1045Corrupted ``C.'' and ``X.'' files,
1046that could not be processed,
1047are placed in the ``CORRUPT'' subdirectory,
1048instead of just exiting.
1049.PP
1050Lock files may be kept in a subdirectory,
1051``LCK'',
1052if desired.
1053.PP
1054If an ``X.'' request fails,
1055the notification is returned to the originator of the request,
1056instead of ``uucp'' on the previous system.
1057.PP
1058There is a new \fIsystem\fR file, ``L.aliases'',
1059that may be used when a site changes it's name.
1060All the utilities,
1061\fIuucp\fR, \fIuux\fR, \fIuucico\fR, etc.,
1062all check ``L.aliases''.
1063.SH
1064Modem and autodialer support:
1065.PP
1066In a short period of time,
1067there has been a big increase in the transfer rates and capabilites
1068that are being provided with modern modems.
1069Most modems will allow several combinations of baud rate,
1070and provide autodial and autoanswer facilites as well.
1071.PP
1072Most sites will have but a few modems,
1073they are therefore a precious resource an effort has been made to use them
1074to maximum potential.
1075The \fIuucico\fR program now has code to dial in and out on the same device,
1076if that modem as both autodial and autoanswer provision.
1077.PP
1078There is a new dialing facility \fIacucntrl\fR that has been built to handle
1079some of the changes in modem technology.
1080There are a number of new modems and autodialers that can now be handled.
1081Here is a list of some of the new devices:
1082Racal Vadic 212,
1083Racal Vadic 811 dialer with 831 adaptor,
1084Racal Vadic 820 dialer with 831 adaptor,
1085Racal Vadic MACS 811 dialer with 831 adaptor,
1086Racal Vadic MACS 820 dialer with 831 adaptor,
1087Dec DF112,
1088Novation,
1089Penril,
1090Hayes 2400 Smartmodem,
1091Concord Data Systems CDS 224,
1092ATT 2224 2400 baud modem.
1093.PP
1094It now correctly does the closing hangup sequence.
1095.PP
1096It will try up to TRYCALLS to dial a site
1097instead of one try for each dialer.
1098.SH
1099New protocols for different transportation mediums
1100.PP
1101The UUCP software has had provision for different protocols
1102to be used in the sending and receiving of data,
1103but originaly only one was implemented
1104and this is the one that is largely used throughout the UUCP community.
1105The standard `g' protocol,
1106has a maxium throughput around 9000 baud,
1107regardless of the physical medium.
1108The use of checksums and the like are of little use when the protocol
1109is bounded within another protocol such as TCP or X.25.
1110It is a waste of time and cpu resources to calculate CRC's
1111when the carrier already provides error free transmissions.
1112The UUCP system did not utilize LAN's and high speed carriers well.
1113Two new protocols have been added
1114to provide for efficient use of new carrier facilities.
1115The protocols now available to UUCP are:
1116.DS
1117`t' protocol, optimised for use on TCP/IP carriers.
1118`f' protocol, optimised for use on X.25 PAD carriers.
1119`g' protocol, standard UUCP protocol used for dialup or hardwired lines.
1120.DE
1121.PP
1122The `t' protocol presumes an error free channel,
1123and is essentially the `g' protocol without the checksumming and packetizing.
1124Other changes where necessary to run UUCP on top of a TCP carrier,
1125the code could not do ioctl's on sockets that are connections to remote hosts.
1126.PP
1127The `f' protocol relies on flow control of the data stream.
1128It is meant for working over links that can be guaranteed to be errorfree,
1129specifically X.25/PAD links.
1130A checksum is calculated over a whole file only.
1131If a transport fails the receiver can request retransmissions.
1132This protocol uses a 7-bit datapath only,
1133so it may be used on carriers that are not 8-bit transparent.
1134.PP
1135As well as adding new protocols,
1136the existing `g' protocol code has been cleaned up.
1137.SH
1138Changes to \fIuucico\fR
1139.PP
1140You can specify a maximum grade to send either
1141on the command line using (-gX)
1142or in the ``L.sys'' file
1143.DS
1144Any/C|Evening will only send grade C,
1145.DE
1146usually mail,
1147or higher during the day and will send everything in the evening
1148See Figure 5.
1149.SH
1150UUCP System files.
1151.PP
1152The \fIsystem\fR files in the ``/usr/lib/uucp'' directory can contain comments,
1153by putting a `#' as the first character on a line.
1154Lines may be continued by placing a `\\' as the last character of a line.
1155This is helpful in making an understandable \fIL.sys\fR file.
1156.PP
1157Some new options are available to \fIuucico\fR, these include:
1158.RS
1159.IP -R
1160This flag reverses \fIuucico\fR role.
1161Let the remote system be master first instead of being the slave.
1162.IP -L
1163\fIuucico\fR will only call ``local'' sites.
1164Local sites are those sites having one of
1165\fBLOCAL\fR, \fBTCP\fR or \fBDIRECT\fR in the CALLER field of ``L.sys''.
1166.RE
1167.PP
1168If ``/etc/nologin'' is present,
1169usually created by \fIshutdown\fR,
1170\fIuucico\fR and \fIuuxqt\fR will gracefully exit,
1171instead of getting killed off when the system goes down.
1172.PP
1173Does an exponential backoff on retry time if call fails
1174instead of always waiting the default 5 minutes.
1175The default may be overridden by adding ",TIME" to the time field in ``L.sys''.
1176.DS
1177ucbvax Any,2
1178.DE
1179will use a default retry time of 2 minutes.
1180.PP
1181If \fIuucico\fR receives a SIGFPE while running,
1182it will toggle debugging on and off.
1183.PP
1184It will not send files to remote system if the remote system
1185is returning an out of temp space error.
1186.PP
1187Add ABORT sequence to the expect/send sequence so it does not have
1188to wait for timeout if cannot get through a dataswitch.
1189See figure X.
1190This example will only call noao in the evening.
1191It will expect nothing,
1192then wait 1 second (\ed),
1193and then send a carriage return.
1194Look for CLASS, then send NOAOUUCP.
1195From then on,
1196if it sees the word Down before finishing logging in,
1197it will hang up immediately.
1198In the mean time,
1199it looks for GO,
1200when received,
1201delay 1 second and then send a CR.
1202Look for ``ogin:'', etc.
1203This abort sequence is useful
1204if you must go through a dataswitch to get to the computer.
1205.PP
1206The time field in the ``L.sys'' file now handles
1207"Evening" and "Night" in addition to:
1208.DS
1209Any, Mo, Tu, We, Th, Fr, Sa, Su.
1210.DE
1211Evening and Night are defined to be:
1212.DS
1213Evening = Wk1700-0800|Sa|Su
1214Night = Any2300-0800|Sa|Su0800-1700
1215.DE
1216.PP
1217The expect/send code now handles '\e' sequences:
1218.RS
1219.IP "s"
1220indicates a space
1221.IP "d"
1222indicates a delay 1 second
1223.IP "r"
1224indicates a carriage return with no linefeed
1225.IP "b"
1226indicates a break
1227.IP "c"
1228indicates do not send a CR after these characters
1229.IP "xxx"
1230the octal character xxx (e.g. \es == \e040
1231.RE
1232.PP
1233The file \fIL-devices\fR now handles "chat" scripts,
1234to help get through local port selectors and smart modems.
1235This helps keep \fIL.sys\fR readable but increases functionality.
1236See figure 4.
1237.PP
1238For compatibility with System V UUCP system,
1239in the Date fields of ``L.sys'':
1240.DS
1241`|' was changed to `,' (| is supported, but not encouraged)
1242`,' was changed to `;' (to allow , to be the date seperator)
1243.DE
1244.PP
1245For Honey DanBer compatibility,
1246the Grade flag is now passed as:
1247.DS
1248-vgrade=X
1249.DE
1250instead of the old -pX
1251.PP
1252You can specify a time for the expect send sequences with ~ instead
1253of getting the default MAXMSGTIME.
1254For example:
1255.DS
1256system Any ACU 1200 1234567 ogin~20--ogin~10--ogin user password pw
1257.DE
1258will look for ``ogin'' for 20 seconds,
1259then send CR,
1260look for ``ogin'' for 10 seconds,
1261send a CR and look for ``ogin'' for MAXMSGTIME seconds
1262.PP
1263Added code to support GTEs PC Pursuit service.
1264It's mainly the handling of the dialback they use.
1265.PP
1266Added time "NonPeak" for Tymnet/Telenet services that charge lower rates
1267from 6pm-7am M-F and Sat & Sun.
1268.SH
1269Security enhancements.
1270.PP
1271Running \fIuucico\fR with debugging turned on,
1272requires ``L.sys'' to have read access.
10bd7bb5 1273.NH
a9073747
KM
1274The UUCP system.
1275.SH
1276Names
1277.PP
1278The naming of a site is important since it provides a means of
1279identifying a machine,
1280and consequently,
1281that machine's users.
1282There are two names used within the UUCP system,
1283these are the \fIloginname\fR and the \fIsitename\fR.
1284.PP
1285It is important that the \fIloginname\fR used by a remote machine
1286to call into a local machine
1287is not the same as that of a normal user of the local machine.
1288It is common for many remote machines to have the same \fIloginname\fR,
1289such as uucp or nuucp.
1290.PP
1291Each machine in a UUCP network is given a unique \fIsitename\fR.
1292The \fIsitename\fR identifies the calling machine to the called machine.
1293A \fIsitename\fR can be up to 14 characters in length.
1294It is useful to have a \fIsitename\fR that is unique in the first 7 characters,
1295to be compatible with earlier implementaions of UUCP.
1296It is desirable that the \fIsitename\fR will convey this uniqueness
1297and perhaps a real world identity to the rest of the network.
1298.PP
1299The \fIsitename\fR and the \fIloginname\fR are not the same thing!
1300They may have the same values,
1301but this is purely a decision of the UUCP administrators
1302when the network connections are set up.
1303.SH
1304The UUCP system organization.
1305.PP
1306There are several directories that are used by the UUCP system as distributed.
1307These are:
10bd7bb5 1308.RS
a9073747
KM
1309.IP src 12
1310(/usr/src/usr.bin/uucp)
1311This directory contains the source files for generating the UUCP system.
1312.IP system 12
10bd7bb5 1313(/usr/lib/uucp)
a9073747
KM
1314This is the directory where system binaries,
1315and system control files reside.
1316.IP spool 12
10bd7bb5 1317(/usr/spool/uucp)
a9073747
KM
1318This is the spool directory used to store transfer requests and data.
1319.IP commands 12
1320(/usr/bin)
1321This is the directory where the programs used by users will be kept.
10bd7bb5 1322.RE
10bd7bb5 1323.SH
a9073747
KM
1324The system directory
1325.PP
1326The following files are required for execution,
1327and should reside in the \fIsystem\fR directory,
1328/usr/lib/uucp.
1329.RS
1330.IP L-devices 15
1331This file contains entries for all devices that are to be used by UUCP.
1332.IP L-dialcodes 15
1333This file contains dialing abbreviations.
1334.IP L.aliases 15
1335Used to provide sitename aliases.
1336.IP L.cmds 15
1337This file contains commands that can be used by a remote site.
1338.IP L.sys 15
1339Contains site connection information for each system that can be called.
1340.IP SEQF 15
1341The sequence numbering and check file.
1342.IP USERFILE 15
1343Remote system access rights.
1344.IP acucntrl 15
1345The program used to control calling remote systems.
1346.IP uucico 15
1347The actual transfer program.
1348.IP uuclean 15
1349A utility to cleanup after UUCP.
1350.IP uuxqt 15
1351Allows UUCP to execute commands.
1352.RE
10bd7bb5 1353.SH
a9073747
KM
1354The command directory
1355.PP
1356The \fIcommand\fR directory, /usr/bin,
1357contains the following user available commands:
10bd7bb5 1358.RS
a9073747
KM
1359.IP uucp 15
1360spools a UNIX to UNIX file-copy request.
1361.IP uux 15
1362spools a request for remote execution.
1363.IP uusend 15
1364provides a facility to transfer binary files using mail.
1365.IP uuencode 15
1366binary file encoder (for \fIuusend\fR)
1367.IP uudecode 15
1368binary file decoder (for \fIuusend\fR)
1369.IP uulog 15
1370reports from log files.
1371.IP uusnap 15
1372provides a snap-shot of \fIuucp\fP activity.
1373.IP uupoll 15
1374polls remote system until an answer is received.
1375.IP uuname 15
1376prints a list of known remote UUCP hosts.
1377.IP uuq 15
1378reports information from the UUCP spool queue.
10bd7bb5
KM
1379.RE
1380.SH
a9073747
KM
1381The spool directory
1382.PP
1383The \fIspool\fR directory,
1384/usr/spool/uucp,
1385contains the following files and directories:
1386.RS
1387.IP C. 15
1388A directory for command, ``C.'' files.
1389.IP D. 15
1390A directory for data, ``D.'', files.
1391.IP X. 15
1392A directory for command execution, ``X.'', files.
1393.IP D.\fImachine\fP 15
1394A directory for local ``D.'' files.
1395.IP D.\fImachine\fPX 15
1396A directory for local ``X.'' files.
1397.IP CORRUPT 15
1398A directory for corrupted ``C.'' and ``X.'' files.
1399.IP ERRLOG 15
1400A file where internal error messages are collected.
1401.IP LCK 15
1402A directory for device and site lock files.
1403.IP LOG 15
1404A directory for individual site LOGFILE's.
1405.IP LOGFILE 15
1406the log file of UUCP activity.
1407.IP STST 15
1408A directory for site STST files.
1409.IP SYSLOG 15
1410the log file of UUCP file transfers.
1411.IP TM. 15
1412A directory for temporary, ``TM.'', files.
1413.RE
1414.PP
1415There is an additional directory,
1416/usr/spool/uucppublic,
1417that is used as a general Public accecs directory for UUCP.
1418It is not used by UUCP directly
1419but it is normally the home directory for the UUCP system owner.
1420Most importantly this directory is owned by uucp,
1421and the access permissions are 0777,
1422this usually garrantees a place that files can be sent to,
1423and retrieved from,
1424on any site.
1425.NH
1426System file details.
10bd7bb5
KM
1427.SH
1428L-devices
a9073747 1429.PP
10bd7bb5 1430This file contains entries for the call-unit devices and
a9073747
KM
1431hardwired connections which are to be used by UUCP.
1432The special device files are assumed to be in the /dev directory.
1433.PP
1434The format for each entry is:
1435.DS
1436\fIType Device Useful Class Dialer\fR [\fIChat\fR ...]
1437.DE
10bd7bb5
KM
1438.LP
1439where;
a9073747
KM
1440.IP \fIType\fR 10
1441is the type of calling to use.
1442There are several different calling types.
10bd7bb5 1443.RS
a9073747
KM
1444.br
1445\fBACU\fR indicates a dialing devices.
1446.br
1447\fBDIR\fR is used when a direct connection is used.
1448.br
1449\fBDK\fR an AT&T Datakit.
1450.br
1451\fBMICOM\fR Micom terminal switch.
1452.br
1453\fBPAD\fR X.25 PAD connection.
1454.br
1455\fBPCP\fR GTE Telenet PC Pursuit.
1456.br
1457\fBSYTEK\fR Sytek high-speed dedicated modem port.
1458.br
1459\fBTCP\fR TCP/IP connection.
1460.RE
1461.IP \fIDevice\fR 10
1462is the entry in ``/dev'' corresponding to a real device,
1463the owner should be uucp.
1464.IP \fIUseful\fR 10
1465information to be used by the device,
1466such as the name of the callunit to be used,
1467or maybe ``unused''.
1468.IP \fIClass\fR 10
10bd7bb5 1469is the line speed.
a9073747
KM
1470.IP \fIDialer\fR 10
1471is either \fBdirect\fR,
1472or from the list of available dialers.
1473The list of available dialers includes:
1474.RS
1475.IP \fBDF02\fR 10
1476DEC DF02 or DF03 modems.
1477.IP \fBDF112\fR 10
1478Dec DF112 modems.
1479Use a \fIDialer\fR field of \fBDF112T\fR to use tone dialing,
1480or \fBDF112P\fR for pulse dialing.
1481.IP \fBatt\fR 10
1482AT&T 2224 2400 baud modem.
1483.IP \fBcds224\fR 10
1484Concord Data Systems 224 2400 baud modem.
1485.IP \fBdn11\fR 10
1486DEC DN11 Unibus dialer.
1487.IP \fBhayes\fR 10
1488Hayes Smartmodem 1200 and compatible autodialing modems.
1489Use a \fIDialer\fR field of \fBhayestone\fR to use tone dialing,
1490or \fBhayespulse\fR for pulse dialing.
1491It is also permissible to include the letters `T' and `P' in the phone number
1492(in \fIL.sys\fR)
1493to change to tone or pulse midway through dialing.
1494(Note that a leading `T' or `P' will be interpreted as a dialcode!)
1495.IP \fBhayes2400\fR 10
1496Hayes Smartmodem 2400 and compatible modems.
1497Use a \fIDialer\fR field of \fBhayes2400tone\fR to use tone dialing,
1498or \fBhayes2400pulse\fR for pulse dialing.
1499.IP \fBnovation\fR 10
1500Novation ``Smart Cat'' autodialing modem.
1501.IP \fBpenril\fR 10
1502Penril Corp ``Hayes compatible'' modems.
1503.IP \fBrvmacs\fR 10
1504Racal-Vadic 820 dialer with 831 adapter in a MACS configuration.
1505.IP \fBva212\fR 10
1506Racal-Vadic 212 autodialing modem.
1507.IP \fBva811s\fR 10
1508Racal-Vadic 811s dialer with 831 adapter.
1509.IP \fBva820\fR 10
1510Racal-Vadic 820 dialer with 831 adapter.
1511.IP \fBvadic\fR 10
1512Racal-Vadic 3450 and 3451 series autodialing modems.
1513.IP \fBventel\fR 10
1514Ventel 212+ autodialing modem.
1515.IP \fBvmacs\fR 10
1516Racal-Vadic 811 dialer with 831 adapter in a MACS configuration.
10bd7bb5 1517.RE
a9073747
KM
1518.IP \fIChat\fR
1519is a send/expect sequence that can be used to talk through dataswitches,
1520or issue special comands to a device such as a modem.
1521The syntax is identical to that of the Expect/Send script of \fIL.sys\fR.
1522The difference is that,
1523the \fIL-devices\fR script is used before the connection is made,
1524while the \fIL.sys\fR script is used after.
10bd7bb5
KM
1525.SH
1526L-dialcodes
a9073747 1527.PP
10bd7bb5 1528This file contains entries with location abbreviations used
a9073747
KM
1529in the ``L.sys'' file (e.g. py, mh, boston).
1530The entry format is:
1531.DS
10bd7bb5 1532abb\ \ dial-seq
a9073747 1533.DE
10bd7bb5
KM
1534.LP
1535where;
1536.RS
1537.IP abb 12
1538is the abbreviation,
1539.IP dial-seq
1540is the dial sequence to call that location.
1541.RE
a9073747 1542.PP
10bd7bb5
KM
1543The line
1544.IP "" 12
1545py\ \ 165\-
1546.LP
1547would be set up so that entry py7777 would
1548send 165\-7777 to the dial-unit.
1549.SH
a9073747
KM
1550L.aliases.
1551.PP
1552The \fIL.aliases\fR file provides a mapping facility of \fIsitenames\fR.
1553This facility is useful when \fIsitenames\fR are changed,
1554and the change is only temporary,
1555or the change is permanent but it is not widely known by the users of the net.
1556The format of the file is:
1557.DS
1558real_name alias_name
1559.DE
1560The ``L.aliases'' file may be used to map hosts with longer names in ``L.sys''
1561to 7 character names that some hosts send.
1562This provides a mechanism to handle those sites,
1563entries should be:
1564.DS
1565 fullname 7-char-name
1566.DE
10bd7bb5 1567.SH
a9073747
KM
1568L.cmds
1569.PP
1570The L.cmds file contains a list of commands that are permitted
1571for remote execution with \fIuux\fR.
1572The commands are listed one per line.
1573Most sites L.cmds will be something like:
1574.DS
1575rmail
1576ruusend
1577.DE
1578A line of the form:
1579.DS
1580PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin
1581.DE
1582can be used to set a search path.
10bd7bb5
KM
1583.SH
1584L.sys
a9073747 1585.PP
10bd7bb5 1586Each entry in this file represents one system
a9073747 1587which can be called by the local UUCP programs.
10bd7bb5 1588The fields are described below.
a9073747
KM
1589.DS
1590\fISitename Times Caller Class Device\fR [\fIExpect Send\fR]....
1591.DE
1592.IP \fISitename\fR 10
1593is the name of the remote system.
1594Every machine with which this system communicates via UUCP should be listed,
1595regardless of who calls whom.
1596Systems not listed in ``L.sys'' will not be permitted a connection.
1597.PP
1598.IP \fITimes\fR 10
1599is a comma-separated list of the times of the day and week that
1600calls are permitted to this site.
1601This can be used to restrict long distance telephone calls
1602to those times when rates are lower.
1603List items are constructed as:
1604.DS
1605\fIkeyword\fPhhmm\fB-\fPhhmm\fB/\fP\fIgrade\fP\fB;\fP\fIretry_time\fP
1606.DE
1607\fIKeyword\fR is required, and must be one of:
10bd7bb5 1608.RS
a9073747
KM
1609.IP \fBAny\fR 8
1610Any time, any day of the week.
1611.IP \fBWk\fR 8
1612Any weekday. In addition,
1613\fBMo, Tu, We, Th, Fr, Sa,\fR and \fBSu\fR
1614can be used for Monday through Sunday, respectively.
1615.IP \fBEvening\fR 8
1616When evening telephone rates are in effect,
1617from 1700 to 0800 Monday through Friday,
1618and all day Saturday and Sunday.
1619.B Evening
1620is the same as
1621.B Wk1700-0800,Sa,Su .
1622.IP \fBNight\fR 8
1623When nighttime telephone rates are in effect,
1624from 2300 to 0800 Monday through Friday,
1625all day Saturday, and from 2300 to 1700 Sunday.
1626.B Night
1627is the same as
1628.B Any2300-0800,Sa,Su0800-1700 .
1629.IP \fBNonPeak\fR 8
1630This is a slight modification of
1631.B Evening .
1632It matches when the USA X.25 carriers have their lower rate period. This
1633is 1800 to 0700 Monday through Friday, and all day Saturday and Sunday.
1634.B NonPeak
1635is the same as
1636.B Any1800-0700,Sa,Su .
1637.IP \fBNever\fR 8
1638Never call;
1639calling into this site is forbidden or impossible.
1640This is intended for polled connections,
1641where the remote system calls into the local machine periodically.
1642This is necessary when one of the machines is lacking
1643either dial-in or dial-out modems.
1644.PP
1645The optional \fIhhmm-hhmm\fR
1646subfield provides a time range that modifies the keyword.
1647.I hhmm
1648refers to
1649.I hours
1650and
1651.I minutes
1652in 24-hour time (from 0000 to 2359).
1653The time range is permitted to "wrap" around midnight,
1654and will behave in the obvious way.
1655It is invalid to follow the \fBEvening\fR, \fBNonPeak\fR,
1656and \fBNight\fR keywords with a time range.
1657.PP
1658The \fIgrade\fR subfield is optional; if present,
1659it is composed of a `/' (slash) and single character denoting the \fIgrade\fR
1660of the connection.
1661Grades are in the range [\fB0-9A-Za-z\fR].
1662This specifies that only requests of grade \fIgrade\fR
1663or better will be transferred during this time.
1664(The grade of a request or job is specified
1665when it is queued by \fIuucp\fR or \fIuux\fR).
1666By convention, mail is sent at grade \fBC\fR,
1667news is sent at grade \fBd\fR,
1668and uucp copies are sent at grade \fBn\fR.
1669Unfortunately, some sites do not follow these conventions,
1670so it is not 100% reliable.
1671.PP
1672The \fIretry_time\fR subfield is optional;
1673it must be preceded by a `;' (semicolon) and
1674specifies the time, in minutes,
1675before a failed connection may be tried again.
1676By default,
1677the retry time starts at 10 minutes and gradually increases at each failure,
1678until after 26 tries \fIuucico\fR gives up completely (MAX RETRIES).
1679If the retry time is too small,
1680\fIuucico\fR may run into MAX RETRIES too soon.
1681.RE
1682.IP \fICaller\fR 10
1683is the type of device used.
1684It may be one of the following:
1685.DS
1686\fBACU DIR MICOM PAD PCP SYTEK TCP\fR
1687.DE
1688the derscriptions in L-devices apply here.
1689If several alternate ports or network connections should be tried,
1690use multiple
1691.I L.sys
1692entries.
1693.IP \fIClass\fR 10
1694is usually the speed (baud) of the device,
1695typically 300, 1200, or 2400 for \fRACU\fR devices and 9600 for direct lines.
1696Valid values are device dependent,
1697and are specified in the ``L-devices'' file.
1698.PP
1699On some devices,
1700the speed may be preceded by a non-numeric prefix.
1701This is used in ``L-devices''
1702to distinguish among devices that have identical \fICaller\fR and baud,
1703but yet are distinctly different.
1704For example,
17051200 could refer to all Bell 212-compatible modems,
1706V1200 to Racal-Vadic modems,
1707and C1200 to CCITT modems,
1708all at 1200 baud.
1709.PP
1710On TCP connections,
1711.I Class
1712is the port number (an integer number) or a port name from ``/etc/services''
1713that is used to make the connection.
1714For standard Berkeley TCP/IP,
1715UUCP normally uses port number 540.
1716.IP \fIDevice\fR 10
1717varies based on the \fICaller\fR field.
1718For \fBACU\fR devices,
1719this is the phone number to dial.
1720The number may include: digits \fB0\fR through \fB9\fR;
1721.B #
1722and
1723.B *
1724for dialing those symbols on tone telephone lines;
1725.B -
1726(hyphen) to pause for a moment, typically two to four seconds;
1727.B =
1728(equal sign) to wait for a second dial tone
1729(implemented as a pause on many modems).
1730Other characters are modem dependent;
1731generally standard telephone punctuation characters
1732(such as the slash and parentheses) are ignored, although
1733.I uucico
1734does not guarantee this.
1735.PP
1736The phone number can be preceded by an alphabetic
1737string; the string is indexed and converted through the ``L-dialcodes'' file.
1738.PP
1739For \fBDIR\fR devices, the
1740.I Device
1741field contains the name of the device in /dev
1742that is used to make the connection.
1743There must be a corresponding line in ``L-devices'' with identical
1744\fICaller, Class\fR, and \fIDevice\fR fields.
1745.PP
1746For \fBTCP\fR and other network devices,
1747.I Device
1748holds the true network name of the remote system,
1749which may be different from its UUCP name
1750(although one would hope not).
1751.PP
1752The
1753.I Expect
1754and
1755.I Send
1756refer to an arbitrarily long set of strings that
1757alternately specify what to
1758.I expect
1759and what to
1760.I send
1761to login to the remote system once a physical connection has
1762been established. A complete set of expect/send strings is referred
1763to as an
1764.IR "expect/send script" .
1765The same syntax is used in the
1766.I L\-devices
1767file to interact with the dialer prior to making a connection;
1768there it is referred to as a \fIchat script\fR.
1769The complete format for one
1770.I expect/send
1771pair is:
1772.PP
1773.DS
1774\fIexpect\fP\fB~\fP\fItimeout\fP\fB-\fP\fIsend\fP\fB-\fP\fI\
1775expect\fP\fB~\fP\fItimeout send\fP
1776.DE
1777.PP
1778.I Expect
1779and
1780.I Send
1781are character strings.
1782.I Expect
1783is compared against in coming text from the remote host;
1784.I send
1785is sent back when
10bd7bb5 1786.I expect
a9073747 1787is matched. By default, the
10bd7bb5 1788.I send
a9073747 1789is followed by a `\er' (carriage return). If the
10bd7bb5 1790.I expect
a9073747
KM
1791string is not matched within
1792.I timeout
1793seconds (default 45), then it is assumed that the match failed.
1794The `\fIexpect\fP\fB-\fP\fIsend\fP\fB-\fP\fIexpect\fP' notation
1795provides a limited loop mechanism; if the first
1796.I expect
1797string fails to match, then the
10bd7bb5 1798.I send
a9073747
KM
1799string between the hyphens is transmitted, and
1800.I uucico
1801waits for the second
10bd7bb5 1802.I expect
a9073747
KM
1803string. This can be repeated indefinitely. When the last
1804.I expect
1805string fails,
1806.I uucico
1807hangs up and logs that the connection failed.
1808.PP
1809The timeout can (optionally) be specified by appending the parameter
1810`\fB~\fP\fInn\fP' to the expect string, when \fInn\fR is the timeout
1811time in seconds.
1812.PP
1813Backslash escapes that may be imbedded in the
10bd7bb5 1814.I expect
a9073747 1815or
10bd7bb5 1816.I send
a9073747
KM
1817strings include:
1818.PP
1819.DS
1820\eb Generate a 3/10 second BREAK.
1821\eb\fIn\fP Where \fIn\fP is a single-digit number;
1822 generate an \fIn\fP/10 second BREAK.
1823\ec Suppress the \er at the end of a \fIsend\fP string.
1824\ed Delay; pause for 1 second. (\fISend\fR only.)
1825\er Carriage Return.
1826\es Space.
1827\en Newline.
1828\exxx Where \fIxxx\fP is an octal constant;
1829 denotes the corresponding ASCII character.
1830.DE
1831.PP
1832As a special case, an empty pair of double-quotes \fB""\fP in the
1833.I expect
1834string is interpreted as ``expect nothing'';
1835that is, transmit the \fIsend\fR string regardless of what is received.
1836Empty double-quotes in the \fIsend\fR string
1837cause a lone `\er' (carriage return) to be sent.
1838.PP
1839One of the following keywords may be substituted for the
1840.I send
1841string:
1842.DS
1843BREAK Generate a 3/10 second BREAK
1844BREAK\fIn\fP Generate an \fIn\fP/10 second BREAK
1845CR Send a Carriage Return (same as "").
1846EOT Send an End-Of-Transmission character, ASCII \e004.
1847 Note that this will cause most hosts to hang up.
1848NL Send a Newline.
1849PAUSE Pause for 3 seconds.
1850PAUSE\fIn\fP Pause for \fIn\fR seconds.
1851P_ODD Use odd parity on future send strings.
1852P_ONE Use parity one on future send strings.
1853P_EVEN Use even parity on future send strings. (Default)
1854P_ZERO Use parity zero on future send strings.
1855.DE
1856.PP
1857Finally, if the
1858.I expect
1859string consists of the keyword
1860.BR ABORT ,
1861then the string following is used to arm an abort trap. If that string
1862is subsequently received any time prior to the completion of the entire
1863.I expect/send
1864script, then
1865.I uucico
1866will abort, just as if the
1867script had timed out. This is useful for trapping error messages from
1868port selectors or front-end processors such as ``Host Unavailable'' or
1869``System is Down.''
1870.PP
1871For example:
1872.PP
1873.DS
1874"" "" ogin:--ogin: nuucp ssword: ufeedme
1875.DE
1876.PP
1877This is executed as, ``When the remote system answers,
1878.I expect
1879nothing.
1880.I Send
1881a carriage return.
1882.I Expect
1883the remote to transmit the string `ogin:'. If it doesn't
1884within 45 seconds, send another carriage return. When it finally does,
1885.I send
1886it the string `nuucp'. Then
1887.I expect
1888the string `ssword:'; when that is received,
1889.I send
1890`ufeedme'.''
1891.SH
1892USERFILE
1893.PP
1894This file contains user accessibility information.
1895It specifies the file system directory trees that are accessible to
1896local users and to remote systems via UUCP
1897.PP
1898Each line in
1899.I USERFILE
1900is of the form:
1901.DS
1902[\fIloginname\fP]\fB,\fP[\fIsitename\fP] [ \fBc\fP ] \fIpathname\fP \c
1903[\fIpathname\fP] [\fIpathname\fP]
1904.DE
1905.PP
1906The first two items are separated by a comma;
1907any number of spaces or tabs may separate the remaining items.
1908.PP
1909The \fIloginname\fR
1910is a login name (from ``/etc/passwd'')
1911on the local machine.
1912.PP
1913The \fIsitename\fR
1914is the name of a remote machine,
1915this is the same name used in ``L.sys''.
1916.PP
1917The \fIc\fR denotes the optional \fIcallback\fR field.
1918If a \fBc\fP appears here,
1919a remote machine that calls in will be told that callback is requested,
1920and the conversation will be terminated.
1921The local system will then immediately call the remote host back.
1922.PP
1923The \fIpathname\fR
1924is a pathname prefix that is permissible for this \fIloginname\fR
1925and/or \fIsitename\fR.
1926.PP
1927It accepts the pathnames on the first line that has a null
1928.I system
1929field.
1930.PP
1931A line with both \fIloginname\fR and \fIsitename\fR are null,
1932for example
1933.DS
1934, /usr/spool/uucppublic
1935.DE
1936can be used to conveniently specify the paths for both "no match" cases
1937if lines earlier in ``USERFILE'' did not define them.
1938.NH
1939Installing the UUCP system.
1940.PP
1941There are several source modifications that may be required
1942before the system programs are compiled.
1943.PP
1944Two files which may require modification,
1945the ``Makefile'' file and the ``uucp.h'' file.
1946The following paragraphs describe some of the options
1947available at build time.
1948.SH
1949Uucp.h modifications
1950.PP
1951The installer of UUCP may wish to change some of the defines in ``uucp.h'',
1952some of the interesting defines are mentioned below.
1953.PP
1954if \fBDIALINOUT\fR is defined then \fIacucntrl\fR will allow modems to be
1955used in both directions.
1956.PP
1957If \fBDONTCOPY\fR is defined in ``uucp.h'',
1958\fIuucp\fR will not make a copy of the source file by default.
1959.PP
1960if \fBLOCKDIR\fR is defined then lock files
1961will be stored in the ``/usr/spool/uucp/LCK'' directory.
1962.PP
1963If \fBLOGBYSITE\fR is defined,
1964\fIuucp\fR logging is done with a log file per site,
1965instead of one LOGFILE.
1966.PP
1967If \fBNOSTRANGERS\fR is defined in ``uucp.h'',
1968the remote site must be in your ``L.sys'' or the call will be rejected.
1969.SH
1970Makefile modification
1971.PP
1972There are several
1973.I make
1974variable definitions which may need modification.
1975.RS
1976.IP DESTDIR 12
1977where all the system will end up,
1978normal from the root.
1979.IP LIBDIR 12
1980${DESTDIR}/usr/lib/uucp, low level binaries, site information, and dialing
1981information resides here.
1982.IP BIN 12
1983${DESTDIR}/usr/bin, the user utilities reside here.
1984.IP ETC 12
1985${DESTDIR}/etc
1986.IP PUBDIR 12
1987${DESTDIR}/usr/spool/uucppublic, uucp owns this directory.
1988A place where files can almost always be sent.
1989.IP SPOOL 12
1990${DESTDIR}/usr/spool/uucp,
1991where all commands and data is held until transfers can take place.
1992.IP XQTDIR 12
1993${SPOOL}/XTMP, a place where UUCP executeable commands will be kept.
1994.IP CORRUPT 12
1995${SPOOL}/CORRUPT, where corrupted ``C.'' and ``D.'' files end up.
1996.IP AUDIT
1997${SPOOL}/AUDIT, an audit trail.
1998.IP LCK 12
1999${SPOOL}/LCK, a place to keep lock files.
2000LOG= ${SPOOL}/LOG
2001.IP STST 12
2002${SPOOL}/STST, a place to keep ``STST'' files for different systems.
2003.IP HOSTNAME 12
2004the machines name.
2005.IP SUBDIRS 12
2006There are six subdirs,
2007not counting XTMP, that may be built under SPOOL,
2008these are,
2009``C.'', ``D.\fIHOSTNAME\fRX'', ``D.\fIHOSTNAME\fR'', ``D.'', ``X.'', and ``TM.''.
10bd7bb5 2010.RE
a9073747
KM
2011.SH
2012Building the system
2013.PP
2014The command
2015.DS
2016make
2017.DE
2018will compile the entire system.
2019.PP
2020The command
2021.DS
2022make makedirs
2023.DE
2024will build all the directories needed for the system,
2025giving them appropriate owners and permissions.
2026.PP
2027The command
2028.DS
2029make install
2030.DE
2031.PP
2032will install the commands in the correct directories,
2033setting ownership and permissions.
2034.NH
2035Connecting new systems to the network.
2036.PP
2037When first connecting a new machine to a UUCP network,
2038it is advisable to try and establish a connection with
2039\fItip\fR or \fIcu\fR first.
2040The administrator should then be aware of any special facilities
2041that are going to be required,
2042things like;
2043What lines and modems are to be used?
2044or
2045is the connection through different hardware and carriers?
2046Does the remote system care about parity?
2047What speed lines are being used and do they cycle through several speeds?
2048Is there a line switch front end that will require special Chat dialogue in
2049``L.sys''?
2050.PP
2051Once a \fIlogin\fR connection can be completed the Admisitrator should
2052have enough information to allow the correct setup of the \fIsystem\fR files
2053in /usr/lib/uucp.
2054.PP
2055The UUCP administrator should then
2056negociate with the remote site UUCP administrator
2057as to when and who will do polling.
2058The relevant accounts and passwords must be set up.
2059Decide on what permissions and security precausions are to be observed.
2060Arrange testing time and facilites to complete initial connection to the system.
2061.NH
2062Security
2063.PP
2064The uucp system, left unrestricted,
2065will let any outside user execute any commands
2066and copy in/out any file which is readable/writable
2067by the uucp login user.
2068It is up to the individual sites to be aware of this and
2069apply the protections that they feel are necessary.
2070.PP
2071There are several security features available aside from the
2072normal file mode protections.
2073These must be set up by the installer of the
2074.I uucp
2075system.
2076.IP - 3
2077The login for uucp does not get a standard shell.
2078Instead, the
2079.I uucico
2080program is started.
2081Therefore, the only work that can be done is through
2082.I uucico .
2083.IP -
2084A path check is done on file names that are to be sent
2085or received.
2086The
2087.I USERFILE
2088supplies the information for these checks.
2089The
2090.I USERFILE
2091can also be set up to require call-back
2092for certain login-ids.
2093(See the ``Files required for execution'' section
2094for the file description.)
2095.IP -
2096A conversation sequence count can be set up so
2097that the called system
2098can be more confident that the caller
2099is who he says he is.
2100.IP -
2101The
2102.I uuxqt
2103program comes with a list of commands that it
2104will execute.
2105A ``PATH'' shell statement is prepended to the command
2106line as specifed in the
2107.I uuxqt
2108program.
2109The installer may modify the list or remove the
2110restrictions as desired.
2111.IP -
2112The
2113.I L.sys
2114file should be owned by uucp and have mode 0400
2115to protect the phone numbers and login information
2116for remote sites.
2117(Programs uucp, uucico, uux, uuxqt should be also
2118owned by uucp and have the setuid bit set.)
10bd7bb5
KM
2119.NH
2120Administration
a9073747 2121.PP
10bd7bb5
KM
2122This section indicates some events and files which must be
2123administered for the
2124.I uucp
2125system.
2126Some administration can be accomplished by
2127.I "shell files"
2128which can be initiated by
2129.I crontab
2130entries.
2131Others will require manual intervention.
2132Some sample
2133.I "shell files"
2134are given toward the end of this section.
2135.SH
2136SQFILE \- sequence check file
a9073747 2137.PP
10bd7bb5
KM
2138This file is set up in the
2139.I program
2140directory and contains an entry for each remote
2141system with which you agree to perform conversation
2142sequence checks.
2143The initial entry is just the system name of
2144the remote system.
2145The first conversation will add two items to the line,
2146the conversation count, and the date/time of the most
2147resent conversation.
2148These items will be updated with each conversation.
2149If a sequence check fails, the entry will have to
2150be adjusted.
2151.SH
2152TM \- temporary data files
a9073747 2153.PP
10bd7bb5
KM
2154These files are created in the
2155.I spool
2156directory while files are being copied
2157from a remote machine.
2158Their names have the form
2159.IP "" 12
2160\fBTM\fR.pid.ddd
a9073747 2161.PP
10bd7bb5
KM
2162where
2163.I pid
2164is a process-id and
2165.I ddd
2166is a sequential three digit number starting at zero
2167for each invocation of
2168.I uucico
2169and incremented for each file received.
2170
2171After the entire remote file is received, the
2172.I TM
2173file is moved/copied to the requested destination.
2174If processing is abnormally terminated or the
2175move/copy fails, the file will remain in the
2176spool directory.
a9073747 2177.PP
10bd7bb5
KM
2178The leftover files should be periodically removed;
2179the
2180.I uuclean
2181program is useful in this regard.
2182The command
2183.IP "" 12
2184uuclean\ \ \-pTM
2185.LP
2186will remove all
2187.I TM
2188files older than three days.
2189.SH
2190LOG \- log entry files
a9073747 2191.PP
10bd7bb5
KM
2192During execution of programs, individual
2193.I LOG
2194files are created in the
2195.I spool
2196directory with information about
2197queued requests, calls to remote systems,
2198execution of
2199.I uux
2200commands and file copy results.
2201These files should be combined into the
2202.I LOGFILE
2203by using the
2204.I uulog
2205program.
2206This program will put the new
2207.I LOG
2208files at the beginning of the existing
2209.I LOGFILE.
2210The command
2211.IP "" 12
2212uulog
2213.LP
2214will accomplish the merge.
2215Options are available to print some or all the
2216log entries after the files are merged.
2217The
2218.I LOGFILE
2219should be removed periodically
2220since it is copied each time new LOG
2221entries are put into the file.
a9073747 2222.PP
10bd7bb5
KM
2223The
2224.I LOG
2225files are created initially with mode 0222.
2226If the program which creates the file terminates normally,
2227it changes the
2228mode to 0666.
2229Aborted runs may leave the files with mode
22300222 and the
2231.I uulog
2232program will not read or remove them.
2233To remove them, either use
2234.I rm ,
2235.I uuclean ,
2236or change the mode to 0666 and let
2237.I uulog
2238merge them with the
2239.I LOGFILE .
2240.SH
2241STST \- system status files
a9073747 2242.PP
10bd7bb5
KM
2243These files are created in the spool directory by the
2244.I uucico
2245program.
2246They contain information of failures such as login, dialup or
2247sequence check and will contain a
2248.I TALKING
2249status when to machines are conversing.
2250The form of the file name is
2251.IP
2252\fBSTST\fR.sys
a9073747 2253.PP
10bd7bb5
KM
2254where
2255.I sys
2256is the remote system name.
a9073747 2257.PP
10bd7bb5
KM
2258For ordinary failures (dialup, login), the file will prevent
2259repeated tries for about one hour.
2260For sequence check failures, the file must be removed before
2261any future attempts to converse with that remote system.
a9073747 2262.PP
10bd7bb5
KM
2263If the file is left due to an aborted run, it may contain a
2264.I TALKING
2265status.
2266In this case, the file must be removed before a conversation
2267is attempted.
2268.SH
2269LCK \- lock files
2270.LP
2271Lock files are created for each device in use (e.g. automatic calling
2272unit) and each system conversing.
2273This prevents duplicate conversations and multiple attempts to use the
2274same devices.
2275The form of the lock file name is
2276.IP "" 12
2277\fBLCK..\fRstr
2278.LP
2279where
2280.I str
2281is either a device or system name.
2282The files may be left in the spool directory if runs abort.
2283They will be ignored (reused) after a time of about 24 hours.
2284When runs abort and calls are desired before the time limit,
2285the lock files should be removed.
2286.SH
2287Shell Files
a9073747 2288.PP
10bd7bb5
KM
2289The
2290.I uucp
2291program will spool work and attempt to start the
2292.I uucico
2293program, but the starting of
2294.I uucico
2295will sometimes fail.
2296(No devices available, login failures etc.).
2297Therefore, the
2298.I uucico
2299program should be periodically started.
2300The command to start
2301.I uucico
2302can be put in a ``shell'' file with a command to merge
2303.I LOG
2304files and started by a crontab entry on an hourly basis.
2305The file could contain the commands
2306.IP
2307.I program /uulog
2308.br
2309.I program /uucico
2310\ \ \-r1
a9073747 2311.PP
10bd7bb5
KM
2312Note that the ``\-r1'' option is required to start the
2313.I uucico
2314program in
2315.I MASTER
2316mode.
a9073747 2317.PP
10bd7bb5
KM
2318Another shell file may be set up on a daily basis to remove
2319.I TM ,
2320.I ST
2321and
2322.I LCK
2323files
2324and
2325.I C.
2326or
2327.I D.
2328files for work which can not be accomplished for
2329reasons like bad phone number, login changes etc.
2330A shell file containing commands like
2331.IP
2332.I program /uuclean
2333\ \ \-pTM \-pC. \-pD.
2334.br
2335.I program /uuclean
2336\ \ \-pST \-pLCK \-n12
2337.LP
2338can be used.
2339Note the ``\-n12'' option causes the
2340.I ST
2341and
2342.I LCK
2343files older than 12 hours to be deleted.
2344The absence of the ``\-n'' option will use a three day time
2345limit.
a9073747 2346.PP
10bd7bb5
KM
2347A daily or weekly shell should also be created
2348to remove or save old
2349.I LOGFILE s.
a9073747 2350One can use a command like
10bd7bb5 2351.IP
a9073747 2352mv spool/LOGFILE spool/o.LOGFILE
10bd7bb5
KM
2353.SH
2354Login Entry
a9073747 2355.PP
10bd7bb5
KM
2356One or more logins should be set up for
2357.I uucp .
2358Each of the ``/etc/passwd'' entries should
2359have the
2360``\fIprogram\fR/uucico''
2361as the shell to be executed.
a9073747 2362The login directory is normally ``/usr/spool/uucppublic''.
10bd7bb5
KM
2363The various logins are used in conjunction with the
2364.I USERFILE
2365to restrict file access.
2366Specifying the
2367.I shell
a9073747 2368argument limits the login to the use of UUCP (\fIuucico\fP) only.
10bd7bb5
KM
2369.SH
2370File Modes
a9073747 2371.PP
10bd7bb5
KM
2372It is suggested that the owner and file modes of various
2373programs and files be set as follows.
a9073747 2374.PP
10bd7bb5
KM
2375The programs
2376.I uucp ,
2377.I uux ,
2378.I uucico
2379and
2380.I uuxqt
2381should be owned by the
2382.I uucp
2383login with the ``setuid'' bit set and only execute
2384permissions (e.g. mode 04111).
2385This will prevent outsiders from modifying the programs
2386to get at a standard
2387.I shell
2388for the
2389.I uucp
2390logins.
a9073747 2391.PP
10bd7bb5
KM
2392The
2393.I L.sys ,
2394.I SQFILE
2395and the
2396.I USERFILE
2397which are put in the
2398.I program
2399directory should be owned by
2400the
2401.I uucp
2402login and set with mode 0400.