Commit | Line | Data |
---|---|---|
ff262511 KB |
1 | .\" Copyright (c) 1986 The Regents of the University of California. |
2 | .\" All rights reserved. | |
a9073747 | 3 | .\" |
ff262511 KB |
4 | .\" %sccs.include.proprietary.roff% |
5 | .\" | |
6 | .\" @(#)implement.ms 6.5 (Berkeley) %G% | |
10bd7bb5 | 7 | .\" |
0b1fa720 KM |
8 | .ds UU UUCP |
9 | .ds Uu U\s-2UCP\s+2 | |
10 | .ds uu \s-2UUCP\s+2 | |
10bd7bb5 | 11 | .TL |
0b1fa720 | 12 | Installation and Operation of \*(UU |
a9073747 KM |
13 | .br |
14 | 4.3BSD Edition | |
15 | .AU | |
16 | D. A. Nowitz | |
17 | .AI | |
0b1fa720 KM |
18 | AT&T Bell Laboratories |
19 | Murray Hill, New Jersey 07974 | |
a9073747 | 20 | .AU |
0b1fa720 | 21 | Carl S. Gutekunst |
a9073747 | 22 | .AI |
0b1fa720 KM |
23 | Communications Software Research and Development |
24 | Pyramid Technology Corporation | |
25 | Mountain View, California 94039 | |
10bd7bb5 | 26 | .AB |
0b1fa720 KM |
27 | \*(Uu is a series of programs designed to permit communication |
28 | between | |
10bd7bb5 | 29 | .UX |
0b1fa720 KM |
30 | systems using a variety of communications links. |
31 | \*(Uu provides batched, error free file transfers and remote command | |
32 | execution. | |
33 | It is well suited for tasks such as electronic mail, public news networks, | |
34 | and software distribution, particularly when only slow, | |
35 | low-cost communication links are available (e.g., 1200 baud dial-up). | |
36 | .PP | |
37 | This document describes the 4.3BSD version of \*(Uu. | |
38 | This is a distant but direct descendent of the ``second implementation'' | |
39 | of \*(Uu developed by D. A. Nowitz at AT&T Bell Laboratories. | |
40 | A number of other \*(Uu versions are in common usage; these are discussed | |
41 | only to the extent that they affect administration of 4.3BSD systems. | |
42 | .LP | |
43 | Revised August 24, 1986 | |
a9073747 | 44 | .AE |
10bd7bb5 | 45 | .LP |
a9073747 KM |
46 | .OH 'Installation and Operation of UUCP''SMM:9-%' |
47 | .EH 'SMM:9-%''Installation and Operation of UUCP' | |
0b1fa720 | 48 | .ne 5 |
a9073747 | 49 | .NH |
0b1fa720 | 50 | \*(UU OVERVIEW |
a9073747 | 51 | .PP |
0b1fa720 KM |
52 | \*(Uu is a batch-type operation. |
53 | Users issue commands that are queued in a spool directory for processing | |
54 | by background daemons. | |
55 | .LP | |
56 | \fIUucp\fP (UNIX-to-UNIX Copy) and \fIuux\fP (UNIX-to-UNIX Execution) | |
57 | provide the user interface to \*(Uu. | |
58 | .I Uucp | |
59 | has syntax and semantics similar to the standard | |
60 | .UX | |
61 | utility \fIcp\fP(1), with the added ability to prefix filenames with | |
62 | system names. | |
63 | Similarly, \fIuux\fP mimics the conventions of \fIsh\fP(1), and allows | |
64 | commands to be prefixed with system names. | |
65 | .LP | |
66 | \fIUucico\fP (Copy-In, Copy-Out) is the primary \*(Uu daemon. | |
67 | It processes the requests queued by \fIuucp\fP and \fIuux\fP, | |
68 | initiates calls to remote systems, transfers files, and forks other | |
69 | daemons to execute \fIuux\fP-requested commands. | |
70 | \fIUucico\fP also acts as the \*(Uu ``shell'' when remote systems call in | |
71 | to requests transfers. | |
72 | .LP | |
73 | Three types of files are used in \*(Uu operation. | |
74 | \fIControl files\fP describe the \*(Uu environment, including | |
75 | known remote hosts, available devices, and remote file access permissions. | |
76 | Control files are relatively static; they are generally changed only by the | |
77 | system administrator. | |
78 | \fISpool files\fP (also called \fIQueue files\fP) contain transfer requests | |
79 | and data; they are created and deleted as necessary | |
80 | by \fIuucp\fP, \fIuux\fP, and \fIuucico\fP. | |
81 | \fILog files\fP accumulate a history of \*(Uu activity; these tend to | |
82 | grow forever if not periodically cleaned up. | |
83 | .LP | |
84 | Spool files are further divided into three types: | |
85 | \fIWork files\fP | |
86 | contain directions for file transfers between systems. | |
87 | Every invocation of \fIuucp\fP or \fIuux\fP creates one or more work files. | |
88 | \fIData files\fP contain data for transfer to or from remote systems. | |
89 | \fIExecution files\fP contain directions for | |
10bd7bb5 KM |
90 | .UX |
91 | command executions which | |
92 | involve the resources of one or more systems. | |
0b1fa720 KM |
93 | Execution files are created only by \fIuux\fP. |
94 | .\"=========================================================================== | |
95 | .\" SECTION 2: USER UTILITIES | |
96 | .\"=========================================================================== | |
97 | .ne 5 | |
98 | .NH | |
99 | USER UTILITIES | |
100 | .PP | |
101 | \*(Uu includes a total of ten ``primary'' utilities, that is, ten | |
102 | utilities for general users. | |
103 | All reside in the \fB/usr/bin\fP directory, where they are easily accessible. | |
104 | This section provides detailed implementation descriptions for the more | |
105 | important commands; see the corresponding \fIman\fP pages for additional | |
106 | information. | |
10bd7bb5 | 107 | .LP |
0b1fa720 | 108 | The following two commands queue transfer requests: |
10bd7bb5 | 109 | .RS |
0b1fa720 KM |
110 | .IP uucp(1C) 15 |
111 | UNIX-to-UNIX File Copy. | |
112 | One of more \fIcontrol files\fP are created, containing names of files to be | |
113 | transferred. | |
114 | When necessary, local files are copied into \fIdata files\fP for | |
115 | transmission. | |
116 | .IP uux(1C) | |
117 | Execute command. | |
118 | An \fIexecute file\fP is created, containing a | |
10bd7bb5 | 119 | .UX |
0b1fa720 KM |
120 | command to be executed and its arguments. |
121 | A \fIcontrol file\fP is created that includes all files that must be | |
122 | transferred to execute the command, including the \fIexecute file\fP itself. | |
123 | When necessary, local files are copied into \fIdata files\fP for | |
124 | transmission. | |
125 | Any output from the command will also be written to \fIdata files\fP. | |
a9073747 | 126 | .RE |
a9073747 | 127 | .LP |
0b1fa720 | 128 | The following four commands provide \*(Uu status information: |
a9073747 | 129 | .RS |
0b1fa720 KM |
130 | .IP uulog(1C) 15 |
131 | Display selected information from the \*(Uu log. | |
132 | .IP uuname(1C) | |
133 | Display the names of all remote hosts that are directly accessible via \*(Uu. | |
134 | .IP uusnap(8C) | |
135 | Provide a snapshot of the current queue, including | |
136 | the number of work files, data files, and execute files for each site. | |
137 | .IP uuq(1C) | |
138 | A variant of \fIuusnap\fP, lists files and \fIuux\fP commands | |
139 | queued for each site. | |
140 | \fIUuq\fP also permits the \*(Uu administrator to delete jobs. | |
10bd7bb5 | 141 | .RE |
a9073747 | 142 | .LP |
0b1fa720 KM |
143 | The following four commands provide miscellaneous support services: |
144 | .RS | |
145 | .IP uudecode(1C) 15 | |
146 | The decoder for files created by \fIuuencode\fP, below. | |
147 | .IP uuencode(1C) | |
148 | A filter to convert binary files into printable ASCII. | |
149 | This is useful when transferring object files over communications links | |
150 | that do not support 8-bit transfers. | |
151 | .IP uupoll(8C) | |
152 | A user utility to conveniently fork the \*(Uu daemon, \fIuucico\fP. | |
153 | .IP uusend(1C) | |
154 | A utility to send files to remote sites more than one ``hop'' distant. | |
155 | .RE | |
156 | .\"=========================================================================== | |
157 | .NH 2 | |
10bd7bb5 KM |
158 | Uucp - UNIX to UNIX File Copy |
159 | .LP | |
0b1fa720 | 160 | The \fIuucp\fP |
10bd7bb5 KM |
161 | command is the user's primary interface with the system. |
162 | The | |
163 | .I uucp | |
164 | command was designed to look like | |
165 | .I cp | |
166 | to the user. | |
167 | The syntax is | |
168 | .IP | |
169 | .I uucp\ \ | |
170 | .B [ | |
171 | option | |
172 | .B ] | |
173 | \ ...\ \ source\ ...\ \ destination | |
174 | .LP | |
175 | where the source and destination | |
0b1fa720 | 176 | may contain the prefix \fIsystem-name\fP\fB!\fP |
10bd7bb5 KM |
177 | which indicates the system on which the file |
178 | or files reside | |
179 | or where they will be copied. | |
180 | .LP | |
181 | The options interpreted by | |
182 | .I uucp | |
183 | are: | |
184 | .RS | |
b414db01 JB |
185 | .IP \-f 10 |
186 | Don't make directories when copying the file. | |
187 | The default is to make the necessary directories. | |
188 | .IP \-C | |
189 | Copy source files to the spool directory. | |
190 | The default is to use the specified source when the actual | |
10bd7bb5 | 191 | transfer takes place. |
0b1fa720 | 192 | .IP \-g\fIgrade\fR |
10bd7bb5 | 193 | Put |
0b1fa720 | 194 | .I grade |
10bd7bb5 | 195 | in as the grade in the name of the work file. |
0b1fa720 KM |
196 | This is a single character in the range \fB[0-9][A-Z][a-z]\fP. |
197 | The \fIgrade\fP will be used by \fIuucico\fP to establish the | |
198 | priority of requests. | |
199 | \fB0\fP is the highest (best) grade; \fBz\fP is the lowest (worst). | |
200 | The default | |
201 | .I grade | |
202 | for | |
203 | .I uucp | |
204 | is \fBn\fP. | |
10bd7bb5 KM |
205 | .IP \-m |
206 | Send mail on completion of the work. | |
b414db01 JB |
207 | .IP \-n\fIuser\fR |
208 | Notify \fIuser\fR on the destination system that a file was sent. | |
10bd7bb5 | 209 | .LP |
0b1fa720 KM |
210 | The following options are used primarily for debugging, or when |
211 | .I uucp | |
212 | is invoked from other programs: | |
10bd7bb5 | 213 | .IP \-r 10 |
0b1fa720 KM |
214 | Queue the job but do not start \fIuucico\fP. |
215 | The assumption is that \fIuucico\fP will be started at a later time, perhaps | |
216 | by \fIcron\fP(8) or \fIuupoll\fP. | |
10bd7bb5 KM |
217 | .IP \-s\fIdir\fR |
218 | Use directory | |
219 | .I dir | |
b414db01 | 220 | for the top level spool directory. |
10bd7bb5 KM |
221 | .IP \-x\fInum\fR |
222 | .I Num | |
223 | is the level of debugging output desired. | |
0b1fa720 KM |
224 | This option requires the user to have read permission to the \*(Uu |
225 | control file \fIL.sys\fP. | |
10bd7bb5 KM |
226 | .RE |
227 | .LP | |
228 | The destination may be a directory name, | |
229 | in which case the file name is taken from the last part of the | |
230 | source's name. | |
231 | The source | |
232 | name may contain special shell characters | |
0b1fa720 KM |
233 | such as ``\fB?*[]\fR''; |
234 | these and other shell characters such as ``\fB!<>\fP'' will need to be quoted | |
235 | or escaped. | |
10bd7bb5 | 236 | If a source argument has a |
0b1fa720 | 237 | \fIsystem-name\fP\fB!\fP |
10bd7bb5 KM |
238 | prefix for a remote system, |
239 | the file name expansion will be done on the remote system. | |
240 | .LP | |
241 | The command | |
242 | .IP "" 12 | |
243 | uucp\ \ *.c\ \ usg!/usr/dan | |
244 | .LP | |
245 | will set up the transfer of all files whose names end with ``.c'' | |
b414db01 | 246 | to the ``/usr/dan'' directory on the ``usg'' machine. |
10bd7bb5 | 247 | .LP |
0b1fa720 | 248 | The source and/or destination names may also contain a \fB~\fP\fIuser\fP |
10bd7bb5 KM |
249 | prefix. |
250 | This translates to the login directory on | |
251 | the specified system. | |
0b1fa720 KM |
252 | A lone \fB~\fP prefix is expanded to the name of the specified system's |
253 | public access directory, usually | |
254 | \fB/usr/spool/uucppublic\fP. | |
10bd7bb5 KM |
255 | For names with partial path-names, |
256 | the current directory is prepended to the file name. | |
257 | File names with | |
258 | .I ../ | |
259 | are not permitted. | |
260 | .LP | |
261 | The command | |
262 | .IP "" 12 | |
263 | uucp\ \ usg!~dan/*.h\ \ ~dan | |
264 | .LP | |
265 | will set up the transfer of files whose names end with ``.h'' | |
266 | in dan's login | |
267 | directory on system ``usg'' to dan's local | |
268 | login directory. | |
269 | .LP | |
270 | For each source file, | |
271 | the program will check the source and destination | |
272 | file-names | |
273 | and the system-part of each to | |
274 | classify the work into one of five types: | |
275 | .RS | |
276 | .IP [1] | |
277 | Copy source to destination on local system. | |
278 | .IP [2] | |
b414db01 | 279 | Receive files from a remote system. |
10bd7bb5 | 280 | .IP [3] |
b414db01 | 281 | Send files to a remote system. |
10bd7bb5 | 282 | .IP [4] |
b414db01 | 283 | Send files from remote system |
10bd7bb5 KM |
284 | to another remote system. |
285 | .IP [5] | |
b414db01 | 286 | Receive files from remote system when the source pathname |
10bd7bb5 KM |
287 | contains special shell characters as |
288 | mentioned above. | |
289 | .RE | |
290 | .LP | |
b414db01 | 291 | After the work has been set up in the spool directories, |
0b1fa720 | 292 | the \*(Uu daemon \fIuucico\fP is started to try to contact the other |
10bd7bb5 KM |
293 | machine to execute the work (unless the \-r option |
294 | was specified). | |
295 | .SH | |
296 | Type 1 | |
297 | .LP | |
b414db01 JB |
298 | .I Uucp |
299 | makes a copy of the file. | |
10bd7bb5 | 300 | The |
10bd7bb5 | 301 | .I \-m |
b414db01 | 302 | option is not honored in this case. |
10bd7bb5 KM |
303 | .SH |
304 | Type 2 | |
305 | .LP | |
306 | A one line | |
307 | .I "work file" | |
0b1fa720 | 308 | is created for each file requested and put in the \fBC.\fP spool directory |
10bd7bb5 KM |
309 | with the following fields, each separated by a blank. |
310 | (All | |
311 | .I "work files" | |
312 | and | |
313 | .I "execute files" | |
314 | use a blank as the field separator.) | |
315 | .RS | |
316 | .IP [1] | |
317 | R | |
318 | .IP [2] | |
319 | The full path-name of the source or a ~user/path-name. | |
320 | The | |
321 | .I ~user | |
322 | part will be expanded on the remote system. | |
323 | .IP [3] | |
b414db01 | 324 | The full path-name of the local destination file. |
10bd7bb5 KM |
325 | If the |
326 | .I ~user | |
327 | notation is used, it will be immediately | |
328 | expanded to be the login directory for the user. | |
329 | .IP [4] | |
330 | The user's login name. | |
331 | .IP [5] | |
0b1fa720 | 332 | A `\-' followed by an option list. |
10bd7bb5 KM |
333 | .RE |
334 | .KS | |
335 | .SH | |
336 | Type 3 | |
337 | .LP | |
338 | For each source file, a | |
339 | .I "work file" | |
b414db01 | 340 | is created. |
0b1fa720 | 341 | A \fB\-C\fP option on the |
10bd7bb5 | 342 | .I uucp |
b414db01 | 343 | command will cause the |
10bd7bb5 | 344 | .I "data file" |
b414db01 JB |
345 | to be copied into the spool directory |
346 | and the file to be transmitted from | |
0b1fa720 | 347 | the copy; the copy is deleted when the transfer completes. |
10bd7bb5 KM |
348 | The fields of each entry are given below. |
349 | .RS | |
350 | .IP [1] | |
351 | S | |
352 | .IP [2] | |
353 | The full-path name of the source file. | |
354 | .IP [3] | |
355 | The full-path name of the destination or | |
356 | ~user/file-name. | |
357 | .IP [4] | |
358 | The user's login name. | |
359 | .IP [5] | |
0b1fa720 | 360 | A `\-' followed by an option list. |
10bd7bb5 | 361 | .IP [6] |
0b1fa720 KM |
362 | The full path-name of the local source file. |
363 | If the | |
364 | .I ~user | |
365 | notation is used, it will be immediately | |
366 | expanded to be the login directory for the user. | |
367 | If the \fB\-C\fP option was used, this will be the name of a | |
10bd7bb5 KM |
368 | .I "data file" |
369 | in the spool directory. | |
370 | .IP [7] | |
371 | The file mode bits of the source file | |
372 | in octal print format | |
373 | (e.g. 0666). | |
b414db01 JB |
374 | .IP [8] |
375 | The user to notify on the remote system that the transfer has completed. | |
10bd7bb5 KM |
376 | .RE |
377 | .KE | |
378 | .SH | |
379 | Type 4 and Type 5 | |
380 | .LP | |
381 | .I Uucp | |
382 | generates a | |
383 | .I uucp | |
384 | command and sends it to the remote machine; | |
385 | the remote | |
386 | .I uucico | |
387 | executes the | |
388 | .I uucp | |
389 | command. | |
0b1fa720 KM |
390 | .\"=========================================================================== |
391 | .NH 2 | |
10bd7bb5 KM |
392 | Uux - UNIX To UNIX Execution |
393 | .LP | |
0b1fa720 | 394 | The \fIuux\fP |
10bd7bb5 KM |
395 | command is used to set up the execution of a |
396 | .UX | |
397 | command | |
398 | where the execution machine and/or some of the | |
399 | files are remote. | |
400 | The syntax of the uux command is | |
401 | .IP | |
402 | .I uux\ \ | |
403 | .B [ | |
404 | \- | |
405 | .B "] [" | |
406 | option | |
407 | .B ] | |
408 | \ ...\ \ command-string | |
409 | .LP | |
410 | where the command-string is made up of one or more arguments. | |
b414db01 | 411 | All special shell characters such as ``<>|*?!'' must be quoted |
10bd7bb5 KM |
412 | either by quoting the entire command-string |
413 | or quoting the character as a separate argument. | |
414 | Within the command-string, the command and file names may | |
415 | contain a | |
0b1fa720 | 416 | \fIsystem-name\fP\fB!\fP |
10bd7bb5 KM |
417 | prefix. |
418 | All arguments which do not contain a ``!'' will not | |
419 | be treated as files. | |
420 | (They will not be copied to the execution machine.) | |
0b1fa720 | 421 | The `\-' is used to indicate that the standard input |
10bd7bb5 KM |
422 | for |
423 | .I command-string | |
424 | should be inherited from the standard input | |
425 | of the | |
426 | .I uux | |
427 | command. | |
0b1fa720 KM |
428 | .LP |
429 | The options, used mostly for debugging and by other programs, are: | |
10bd7bb5 | 430 | .RS |
0b1fa720 KM |
431 | .IP \-a\fIname\fP 10 |
432 | Use \fIname\fP as the requestor of the \fIuux\fP command, instead of the | |
433 | real system and login names. | |
434 | Unlike most other \*(Uu arguments, \fIname\fP may consist of a chain of | |
435 | system names separated by `!' characters, as in: | |
436 | .IP \ 15 | |
437 | uux\ \ \-\ \ \-r\ \ \-aihnp4!decwrl!pyramid!csg\ \ seismo!rmail\ \ rick | |
438 | .IP \-C 10 | |
439 | Copy source files to the spool directory. | |
440 | Same as for \fIuucp\fP. | |
441 | .IP \-g\fIgrade\fR | |
442 | Put | |
443 | .I grade | |
444 | in as the grade in the name of the work file. | |
445 | Same as for \fIuucp\fP. | |
446 | The default | |
447 | .I grade | |
448 | for | |
449 | .I uux | |
450 | is \fBA\fP. | |
451 | .IP \-n | |
452 | Do not mail an acknowledgement to the requestor of the command. | |
453 | Normally the execution daemon, \fIuuxqt\fP, will mail a message | |
454 | to the user who entered the \fIuux\fP command. | |
455 | This message includes the status return value that the program exited with. | |
456 | The \fB\-n\fP option requests that this message not be sent. | |
457 | .IP \-r | |
458 | Do not start the \*(Uucp daemons \fIuucico\fP(8C) or \fIuuxqt\fP(8C) | |
459 | after queuing the job. | |
10bd7bb5 KM |
460 | .IP \-x\fInum\fR |
461 | Num is the level of debugging output desired. | |
0b1fa720 KM |
462 | .IP \-z |
463 | Mail an acknowledgement to the requestor only if the command fails, that | |
464 | is, the command exits with a non-zero status. | |
10bd7bb5 KM |
465 | .RE |
466 | .LP | |
467 | The command | |
468 | .IP "" 12 | |
469 | pr\ \ abc\ \ |\ \ uux\ \ \-\ \ usg!lpr | |
470 | .LP | |
471 | will set up the output of ``pr abc'' | |
472 | as standard input to an lpr command | |
473 | to be executed on system ``usg''. | |
474 | .LP | |
475 | .I Uux | |
476 | generates an | |
477 | .I "execute file" | |
478 | which contains the | |
479 | names of the files required | |
480 | for execution (including standard input), | |
481 | the user's login name, the destination | |
482 | of the standard output, and the command to be executed. | |
0b1fa720 KM |
483 | This file is either put in the \fBX.\fP spool directory |
484 | for local execution, | |
485 | or in the \fBD.\fP\fIhostname\fP\fBX\fP directory | |
486 | for transfer to the remote system. | |
10bd7bb5 KM |
487 | .LP |
488 | For required files which are not on the execution machine, | |
489 | .I uux | |
490 | will generate receive command files (type 2 above). | |
491 | These command-files will be put on the execution machine and | |
0b1fa720 KM |
492 | executed by |
493 | \fIuucico\fP. | |
10bd7bb5 KM |
494 | (This will work only if the local system has permission |
495 | to put files in the remote spool directory as controlled | |
496 | by the remote | |
0b1fa720 | 497 | \fIUSERFILE\fP.) |
10bd7bb5 KM |
498 | .LP |
499 | The | |
500 | .I "execute file" | |
501 | will be processed | |
502 | by the | |
0b1fa720 | 503 | \fIuuxqt\fP(8C) |
10bd7bb5 KM |
504 | program on the execution machine. |
505 | It is made up of several lines, | |
506 | each of which contains an identification character | |
507 | and one or more arguments. | |
508 | The order of the lines in the file is not relevant | |
509 | and some of the lines may not be present. | |
510 | Each line is described below. | |
511 | .RS | |
512 | .SH | |
513 | User Line | |
514 | .IP | |
515 | U\ \ user\ \ system | |
516 | .LP | |
517 | where the | |
518 | .I user | |
519 | and | |
520 | .I system | |
0b1fa720 | 521 | are the requestor's login name and system. |
10bd7bb5 KM |
522 | .SH |
523 | Required File Line | |
524 | .IP | |
525 | F file-name real-name | |
526 | .LP | |
527 | where the | |
528 | .I file-name | |
529 | is the generated name of a file for the execute machine | |
530 | and | |
531 | .I real-name | |
532 | is the last part of the actual file name (contains no | |
533 | path information). | |
534 | Zero or more of these lines may be present in the | |
535 | .I "execute file" . | |
536 | The | |
537 | .I uuxqt | |
538 | program will check for the existence of all required | |
539 | files before the command is executed. | |
540 | .SH | |
541 | Standard Input Line | |
542 | .IP | |
543 | I\ \ file-name | |
544 | .LP | |
0b1fa720 | 545 | The standard input is either specified by a `<' in the |
10bd7bb5 KM |
546 | command-string or inherited from the standard input of the |
547 | .I uux | |
0b1fa720 | 548 | command if the `\-' option is used. |
10bd7bb5 | 549 | If a standard input is not specified, |
0b1fa720 KM |
550 | .B /dev/null |
551 | is used. | |
10bd7bb5 KM |
552 | .SH |
553 | Standard Output Line | |
554 | .IP | |
555 | O\ \ file-name\ \ system-name | |
556 | .LP | |
0b1fa720 | 557 | The standard output is specified by a `>' within the |
10bd7bb5 KM |
558 | command-string. |
559 | If a standard output is not specified, | |
0b1fa720 KM |
560 | .B /dev/null |
561 | is used. | |
10bd7bb5 KM |
562 | (Note \- the use of ``>>'' is not implemented.) |
563 | .SH | |
0b1fa720 KM |
564 | Status Return Line |
565 | .IP | |
566 | N | |
567 | .LP | |
568 | Normally \fIuuxqt\fP mails an acknowledgement message to the | |
569 | requestor after the command completes. | |
570 | The message includes the status return value that the program exited with. | |
571 | This line inhibits mailing of the acknowledgement message. | |
572 | It is generated by the \fB-n\fP option of \fIuux\fP; | |
573 | it is also quietly assumed by \fIuuxqt\fP on the command \fBrmail\fP. | |
574 | .SH | |
575 | Error Status Return Line | |
576 | .IP | |
577 | Z | |
578 | .LP | |
579 | A variant of the \fIStatus Return\fP line, this line indicates that | |
580 | an acknowledgement should be mailed only if the command's status | |
581 | return is non-zero, i.e., the program exited with an error. | |
582 | This line is generated by the \fB-z\fP option of \fIuux\fP. | |
583 | It is also quietly assumed by \fIuuxqt\fP on the command \fBrnews\fP. | |
584 | If both the \fBZ\fP and \fBN\fP lines appear, the \fBZ\fP line has | |
585 | precedence. | |
586 | .SH | |
587 | Requestor Line | |
588 | .IP | |
589 | R\ \ requestor | |
590 | .LP | |
591 | where | |
592 | .I requestor | |
593 | is a complete return mailing address to the original requestor. | |
594 | This line is generated by the \fB-a\fP option of \fIuux\fP, and is used | |
595 | to override the mail return address implied by the \fIUser\fP line. | |
596 | This is commonly used by mailers and programs like \fIuusend\fP that | |
597 | know how to ``hop'' a file from system to system. | |
598 | .SH | |
10bd7bb5 KM |
599 | Command Line |
600 | .IP | |
601 | C\ \ command\ \ | |
602 | .B [ | |
603 | arguments | |
604 | .B ] | |
605 | \ ... | |
606 | .LP | |
607 | The arguments are those specified in the command-string. | |
608 | The standard input and standard output will not appear on this | |
609 | line. | |
610 | All | |
611 | .I "required files" | |
612 | will be moved to the execution directory (a subdirectory | |
613 | of the spool directory) | |
614 | and the | |
615 | .UX | |
616 | command is executed using the Shell specified in the | |
617 | .I uucp.h | |
0b1fa720 | 618 | header file (usually \fI/bin/sh\fP). |
10bd7bb5 | 619 | In addition, a shell ``PATH'' statement is prepended |
b414db01 | 620 | to the command line. |
10bd7bb5 | 621 | .LP |
b414db01 JB |
622 | After execution, the temporary standard output file is copied to |
623 | or set up to be | |
10bd7bb5 KM |
624 | sent to the proper place. |
625 | .RE | |
0b1fa720 KM |
626 | .\"=========================================================================== |
627 | .\" SECTION 3: SYSTEM UTILITIES | |
628 | .\"=========================================================================== | |
629 | .ne 5 | |
10bd7bb5 | 630 | .NH |
0b1fa720 | 631 | SYSTEM AND ADMINISTRATIVE UTILITIES |
a9073747 | 632 | .LP |
0b1fa720 KM |
633 | \*(Uu includes four system utilities; |
634 | these are not normally referenced by users. | |
635 | All except \fIuucpd\fP reside in the \*(Uu administrative directory, | |
636 | \fB/usr/lib/uucp\fP. | |
637 | These include: | |
638 | .RS | |
639 | .IP uucico(8C) 15 | |
640 | Copy In, Copy Out. This is the primary \*(Uu daemon. | |
641 | .IP uuclean(8C) | |
642 | A handy utility to clean up the \*(Uu spool directories. | |
643 | .IP uucpd | |
644 | The \*(Uu TCP/IP daemon. | |
645 | This daemon ``answers'' the connection request from a remote \fIuucico\fP | |
646 | to a TCP/IP socket. | |
647 | It is functionally a stripped-down version of \fIrlogind\fP(8) that provides | |
648 | full 8-bit communication. | |
649 | (Note: this utility does not have a \fIman\fP page.) | |
650 | .IP uuxqt(8C) | |
651 | Execution Daemon. | |
652 | This is forked by \fIuucico\fP to interpret execution files | |
653 | transferred from a remote system. | |
654 | .RE | |
655 | .\"=========================================================================== | |
656 | .NH 2 | |
657 | Uucico - Copy In, Copy Out (\*(Uu Daemon) | |
10bd7bb5 | 658 | .LP |
0b1fa720 KM |
659 | .I Uucico |
660 | is the ``heart'' of the \*(Uu system. | |
661 | The program performs the following major functions: | |
10bd7bb5 KM |
662 | .RS |
663 | .IP -\ \ 3 | |
664 | Scan the spool directory for work. | |
665 | .IP -\ \ | |
666 | Place a call to a remote system. | |
667 | .IP -\ \ | |
668 | Negotiate a line protocol to be used. | |
669 | .IP -\ \ | |
670 | Execute all requests from both systems. | |
671 | .IP -\ \ | |
672 | Log work requests and work completions. | |
673 | .RE | |
674 | .LP | |
675 | .I Uucico | |
676 | may be started in several ways; | |
677 | .RS | |
678 | .IP a) 5 | |
0b1fa720 | 679 | by a system daemon (such as \fIcron\fP(8)), |
10bd7bb5 KM |
680 | .IP b) |
681 | by one of the | |
682 | .I | |
683 | uucp, uux, uuxqt | |
684 | .R | |
685 | or | |
b414db01 | 686 | .I uupoll |
10bd7bb5 KM |
687 | programs, |
688 | .IP c) | |
689 | directly by the user (this is usually for testing), | |
690 | .IP d) | |
691 | by a remote system. | |
b414db01 | 692 | (The \fIuucico\fP program should be specified as the ``shell'' |
0b1fa720 | 693 | field in the \fB/etc/passwd\fP file for the \*(Uu logins.) |
10bd7bb5 KM |
694 | .RE |
695 | .LP | |
696 | When started by method a, b or c, the program is considered to | |
697 | be in | |
698 | .I MASTER | |
699 | mode. | |
700 | In this mode, a connection will be made to a remote system. | |
701 | If started by a remote system (method d), | |
702 | the program is considered to be in | |
703 | .I SLAVE | |
704 | mode. | |
705 | .LP | |
706 | The | |
707 | .I MASTER | |
708 | mode will operate in one of two ways. | |
709 | If no system name is specified | |
710 | (\-s option not specified) | |
711 | the program will scan the spool directory for | |
712 | systems to call. | |
713 | If a system name is specified, that system will be called, | |
714 | and work will only be done for that system. | |
715 | .LP | |
716 | The | |
717 | .I uucico | |
718 | program is generally started by another program. | |
719 | There are several options used for execution: | |
720 | .RS | |
0b1fa720 KM |
721 | .IP \-g\fIgrade\fP 10 |
722 | Set the minimum grade of this \fIuucico\fP run to \fIgrade\fP. | |
723 | Only files of this grade or better will be transferred. | |
724 | .IP \-r1 | |
10bd7bb5 KM |
725 | Start the program in |
726 | .I MASTER | |
727 | mode. | |
728 | This is used when | |
729 | .I uucico | |
0b1fa720 | 730 | is started by a program or \fIcron\fP shell. |
10bd7bb5 KM |
731 | .IP \-s\fIsys\fR |
732 | Do work only for system | |
733 | .I sys. | |
734 | If | |
b414db01 | 735 | .B \-s |
10bd7bb5 KM |
736 | is specified, |
737 | a call to the specified system | |
738 | will be made even if there is no work for system | |
739 | .I sys | |
740 | in the spool directory. | |
741 | This is useful for polling systems which do not have | |
742 | the hardware to initiate a connection. | |
743 | .LP | |
744 | The following options are used primarily for debugging: | |
745 | .IP \-d\fIdir\fR | |
746 | Use directory | |
747 | .I dir | |
b414db01 | 748 | for the top level spool directory. |
10bd7bb5 KM |
749 | .IP \-x\fInum\fR |
750 | .I Num | |
751 | is the level of debugging output desired. | |
752 | .RE | |
753 | .LP | |
754 | The next part of this section will describe the major steps within | |
755 | the | |
756 | .I uucico | |
757 | program. | |
758 | .SH | |
759 | Scan For Work | |
760 | .LP | |
b414db01 | 761 | The names of the work related files in a spool subdirectory have format |
10bd7bb5 | 762 | .IP |
0b1fa720 | 763 | type \fB.\fP system-name grade number |
10bd7bb5 KM |
764 | .LP |
765 | where: | |
766 | .IP | |
767 | .I Type | |
768 | is an upper case letter, | |
769 | ( | |
0b1fa720 KM |
770 | .B C |
771 | -\ work (copy command) file, | |
772 | .B D | |
10bd7bb5 | 773 | -\ data file, |
0b1fa720 | 774 | .B X |
10bd7bb5 KM |
775 | -\ execute file); |
776 | .IP | |
777 | .I System-name | |
778 | is the remote system; | |
779 | .IP | |
780 | .I Grade | |
0b1fa720 | 781 | is a character in the range \fB[0-9][A-Z][a-z]\fP; |
10bd7bb5 KM |
782 | .IP |
783 | .I Number | |
784 | is a four digit, padded sequence number. | |
785 | .LP | |
786 | The file | |
787 | .IP "" 12 | |
788 | C.res45n0031 | |
789 | .LP | |
790 | would be a | |
791 | .I "work file" | |
792 | for a file transfer between the local | |
793 | machine and the ``res45'' machine. | |
794 | .LP | |
795 | The scan for work is done by looking through the | |
b414db01 | 796 | appropriate spool directory for |
0b1fa720 KM |
797 | \fIwork files\fP |
798 | (files with prefix \fBC.\fP). | |
10bd7bb5 KM |
799 | A list is made of all systems to be called. |
800 | .I Uucico | |
801 | will then call each system and process all | |
802 | .I "work files" . | |
803 | .SH | |
804 | Call Remote System | |
805 | .LP | |
0b1fa720 KM |
806 | The call is made using information from the \fIcontrol\fP files |
807 | that reside in the \fB/usr/lib/uucp\fP directory. | |
10bd7bb5 KM |
808 | At the start of the call process, a lock is |
809 | set to forbid multiple conversations | |
810 | between the same two systems. | |
811 | .LP | |
812 | The system name is found in the | |
0b1fa720 KM |
813 | .I L.sys |
814 | control file. | |
10bd7bb5 KM |
815 | The information contained for each system is; |
816 | .RS | |
817 | .IP [1] | |
818 | system name, | |
819 | .IP [2] | |
820 | times to call the system | |
821 | (days-of-week and times-of-day), | |
822 | .IP [3] | |
0b1fa720 | 823 | the \fIcaller\fP, that is, the type of device to be used for the call, |
10bd7bb5 | 824 | .IP [4] |
0b1fa720 | 825 | the line speed or network number (as appropriate), |
10bd7bb5 | 826 | .IP [5] |
0b1fa720 | 827 | telephone number or device name (as appropriate), |
10bd7bb5 | 828 | .IP [6] |
0b1fa720 | 829 | login information (multiple fields). |
10bd7bb5 KM |
830 | .RE |
831 | .LP | |
832 | The time field is checked against the present time to see | |
833 | if the call should be made. | |
834 | .LP | |
835 | The | |
836 | .I | |
837 | phone number | |
838 | .R | |
839 | may contain abbreviations (e.g. mh, py, boston) which get translated into dial | |
840 | sequences using the | |
841 | .I L-dialcodes | |
842 | file. | |
843 | .LP | |
844 | The | |
845 | .I L-devices | |
846 | file is scanned using fields [3] and [4] from the | |
0b1fa720 | 847 | .I L.sys |
10bd7bb5 KM |
848 | file to find an available device for the call. |
849 | The program will try all devices which satisfy | |
b414db01 | 850 | [3] and [4] until the call is made or no more |
10bd7bb5 KM |
851 | devices can be tried. |
852 | If a device is successfully opened, a lock file | |
853 | is created so that another copy of | |
854 | .I uucico | |
855 | will not try to use it. | |
856 | If the call is complete, the | |
857 | .I | |
858 | login information | |
859 | .R | |
860 | (field [6] of | |
0b1fa720 | 861 | \fIL.sys\fP) |
10bd7bb5 KM |
862 | is used to login. |
863 | .LP | |
864 | The conversation between the two | |
865 | .I uucico | |
866 | programs begins with a handshake started by the called, | |
867 | .I SLAVE , | |
868 | system. | |
869 | The | |
870 | .I SLAVE | |
871 | sends a message to let the | |
872 | .I MASTER | |
873 | know it is ready to receive the system | |
874 | identification and conversation sequence number. | |
875 | The response from the | |
876 | .I MASTER | |
877 | is | |
878 | verified by the | |
879 | .I SLAVE | |
880 | and if acceptable, protocol selection begins. | |
881 | The | |
882 | .I SLAVE | |
883 | can also reply with a ``call-back required'' | |
884 | message in which case, the current conversation | |
885 | is terminated. | |
886 | .SH | |
887 | Line Protocol Selection | |
888 | .LP | |
889 | The remote system sends a message | |
890 | .IP "" 12 | |
891 | P\fIproto-list\fR | |
892 | .LP | |
893 | where proto-list is a string of characters, each | |
894 | representing a line protocol. | |
895 | .LP | |
896 | The calling program checks the proto-list | |
897 | for a letter corresponding to an available line | |
898 | protocol and returns a | |
899 | .I use-protocol | |
900 | message. | |
901 | The | |
902 | .I use-protocol | |
903 | message is | |
904 | .IP "" 12 | |
905 | U\fIcode\fR | |
906 | .LP | |
0b1fa720 KM |
907 | where |
908 | .I code | |
909 | is either a one character | |
10bd7bb5 | 910 | protocol letter or |
0b1fa720 | 911 | .B N |
10bd7bb5 | 912 | which means there is no common protocol. |
0b1fa720 KM |
913 | .LP |
914 | The following protocols are implemented in 4.3BSD \*(Uu: | |
915 | .RS | |
916 | .IP \fBg\fP | |
917 | General. | |
918 | Default for dialup or hardwired lines, supported by all versions of \*(Uu. | |
919 | This protocol employs small (64 byte) data packets with | |
920 | checksums and packet-by-packet retransmission. | |
921 | This ensures reliable and efficient transfers over slow and noisy links | |
922 | like 1200-baud dial-up lines. | |
923 | These same characteristics make the \fBg\fP protocol bulky and slow over | |
924 | error free links, and very expensive on public data-switched networks. | |
925 | .IP \fBf\fP | |
926 | Optimized for use on X.25 PAD public data-switched networks. | |
927 | The protocol employs larger (256 byte) data packets, | |
928 | passes no control characters except CR, | |
929 | and uses only a 7-bit data path. | |
930 | (Note that the files transferred may still contain full 8-bit data.) | |
931 | It assumes that the link is ``mostly'' error-free, calculating a checksum | |
932 | for the entire file only. | |
933 | When an error is detected, the entire file is retransmitted. | |
934 | .IP \fBt\fP | |
935 | Optimized for use on TCP/IP networks and other completely error free links. | |
936 | It employs large (1024 byte) packets, and uses the full 8-bit data path. | |
937 | .RE | |
938 | .LP | |
939 | Note: AT&T System VR2 \*(UU supports the \fBx\fP (\fIX.25\fP) and \fBe\fP | |
940 | (\fIError Free\fP) protocols, which provide functionality similar to the | |
941 | 4.3BSD \fBf\fP and \fBt\fP protocols, respectively. | |
942 | They are incompatible, however. | |
943 | Thus when attempting to connect two systems via X.25 or an local area network, | |
944 | it is not adequate for both systems to simply ``support X.25'' or ``support | |
945 | error free transfers.'' | |
946 | Both must support the same \*(Uu protocols. | |
10bd7bb5 KM |
947 | .SH |
948 | Work Processing | |
949 | .LP | |
950 | The initial roles ( | |
951 | .I MASTER | |
952 | or | |
953 | .I SLAVE | |
954 | ) for the work processing are | |
955 | the mode in which each program starts. | |
956 | (The | |
957 | .I MASTER | |
0b1fa720 | 958 | has been specified by the \fB\-r1\fP \fIuucico\fP option.) |
10bd7bb5 KM |
959 | The |
960 | .I MASTER | |
961 | program does a work search similar to the | |
962 | one used in the ``Scan For Work'' section. | |
963 | .LP | |
964 | There are five messages used during the | |
965 | work processing, each specified by the first | |
966 | character of the message. | |
967 | They are; | |
968 | .IP "" 12 | |
969 | .RS | |
970 | .IP S 3 | |
971 | send a file, | |
972 | .IP R | |
973 | receive a file, | |
974 | .IP C | |
975 | copy complete, | |
976 | .IP X | |
977 | execute a | |
978 | .I uucp | |
b414db01 | 979 | command, and |
10bd7bb5 KM |
980 | .IP H |
981 | hangup. | |
982 | .RE | |
983 | .LP | |
984 | The | |
985 | .I MASTER | |
986 | will send | |
987 | .I R , | |
988 | .I S | |
989 | or | |
990 | .I X | |
991 | messages until all work from the spool directory is | |
992 | complete, at which point an | |
993 | .I H | |
994 | message will be sent. | |
995 | The | |
996 | .I SLAVE | |
997 | will reply with | |
998 | \fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR, | |
a9073747 | 999 | \fIXY\fR, \fIXN\fR, |
10bd7bb5 KM |
1000 | corresponding to |
1001 | .I yes | |
1002 | or | |
1003 | .I no | |
1004 | for each request. | |
1005 | .LP | |
1006 | The send and receive replies are | |
1007 | based on permission to access the | |
0b1fa720 KM |
1008 | requested file/directory using |
1009 | .I USERFILE | |
10bd7bb5 KM |
1010 | and read/write permissions of the file/directory. |
1011 | After each file is copied into the spool directory | |
1012 | of the receiving system, | |
1013 | a copy-complete message is sent by the receiver of the file. | |
1014 | The message | |
1015 | .I CY | |
1016 | will be sent if the | |
1017 | file has successfully been moved from the | |
1018 | temporary spool file to the actual destination. | |
1019 | Otherwise, a | |
1020 | .I CN | |
1021 | message is sent. | |
1022 | (In the case of | |
1023 | .I CN , | |
0b1fa720 | 1024 | the transferred file will be in the \fBTM.\fP spool subdirectory.) |
10bd7bb5 KM |
1025 | The requests and results are logged on both systems. |
1026 | .LP | |
1027 | The hangup response is determined by the | |
1028 | .I SLAVE | |
b414db01 JB |
1029 | program by a work scan of its spool directory. |
1030 | If work for the \fIMASTER\fP\|'s system exists in the | |
1031 | \fISLAVE\fP\|'s | |
10bd7bb5 KM |
1032 | spool directory, an |
1033 | .I HN | |
1034 | message is sent and the programs switch roles. | |
1035 | If no work exists, an | |
1036 | .I HY | |
1037 | response is sent. | |
1038 | .SH | |
1039 | Conversation Termination | |
1040 | .LP | |
1041 | When a | |
1042 | .I HY | |
1043 | message is received by the | |
1044 | .I MASTER | |
1045 | it is echoed back to the | |
1046 | .I SLAVE | |
1047 | and the protocols are turned off. | |
1048 | Each program sends a final ``OO'' message to the | |
1049 | other. | |
1050 | The original | |
1051 | .I SLAVE | |
1052 | program will clean up and terminate. | |
1053 | The | |
1054 | .I MASTER | |
1055 | will proceed to call other systems | |
1056 | and process work as long as possible | |
1057 | or terminate if a | |
0b1fa720 | 1058 | .B \-s |
10bd7bb5 KM |
1059 | option was specified. |
1060 | .LP | |
0b1fa720 KM |
1061 | .\"=========================================================================== |
1062 | .NH 2 | |
10bd7bb5 KM |
1063 | Uuxqt - Uucp Command Execution |
1064 | .LP | |
1065 | The | |
1066 | .I uuxqt | |
1067 | program is used to execute | |
1068 | .I | |
1069 | execute files | |
1070 | .R | |
1071 | generated by | |
1072 | .I uux. | |
1073 | The | |
1074 | .I uuxqt | |
1075 | program may be started by either the | |
1076 | .I uucico | |
1077 | or | |
1078 | .I uux | |
1079 | programs. | |
0b1fa720 KM |
1080 | The program scans the \fBX.\fP spool directory for |
1081 | \fIexecute files\fP. | |
10bd7bb5 KM |
1082 | Each one is checked to see if all the required files are available and |
1083 | if so, the command line or send line is executed. | |
1084 | .LP | |
1085 | The | |
1086 | .I | |
1087 | execute file | |
1088 | .R | |
0b1fa720 KM |
1089 | is described in the |
1090 | .I uux | |
10bd7bb5 KM |
1091 | section above. |
1092 | .SH | |
1093 | Command Execution | |
1094 | .LP | |
1095 | The execution is accomplished by executing a | |
1096 | .I | |
1097 | sh \-c | |
1098 | .R | |
1099 | of the command line after appropriate | |
1100 | standard input and standard output have been opened. | |
1101 | If a standard output is specified, the program | |
1102 | will create a send command or copy the output | |
1103 | file as appropriate. | |
0b1fa720 KM |
1104 | .\"=========================================================================== |
1105 | .NH 2 | |
10bd7bb5 KM |
1106 | Uuclean - Uucp Spool Directory Cleanup |
1107 | .LP | |
0b1fa720 KM |
1108 | This program is typically started by the |
1109 | \fIcron\fP(8) | |
1110 | daemon, once a day. | |
b414db01 | 1111 | Its function is to remove files from the spool directories which |
10bd7bb5 KM |
1112 | are more than 3 days old. |
1113 | These are usually files for work which can not be completed. | |
1114 | .LP | |
1115 | .LP | |
1116 | The options available are: | |
1117 | .RS | |
1118 | .IP \-d\fIdir\fR 10 | |
1119 | The directory to be scanned is | |
1120 | .I dir . | |
1121 | .IP \-m | |
1122 | Send mail to the owner of each file being removed. | |
1123 | (Note that most files put into the spool directory | |
1124 | will be owned by the owner of the | |
1125 | uucp programs since the setuid bit will be set on these | |
1126 | programs. | |
1127 | The mail will therefore most often go to the owner | |
1128 | of the uucp programs.) | |
1129 | .IP \-n\fIhours\fR | |
1130 | Change the aging time from 72 hours to | |
1131 | .I hours | |
1132 | hours. | |
1133 | .IP \-p\fIpre\fR | |
1134 | Examine files with prefix | |
1135 | .I pre | |
1136 | for deletion. | |
1137 | (Up to 10 file prefixes may be specified.) | |
1138 | .IP \-x\fInum\fR | |
1139 | This is the level of debugging output desired. | |
1140 | .RE | |
0b1fa720 KM |
1141 | .\"=========================================================================== |
1142 | .\" SECTION 4: CONTROL FILES | |
1143 | .\"=========================================================================== | |
1144 | .ne 5 | |
10bd7bb5 | 1145 | .NH |
0b1fa720 KM |
1146 | SYSTEM CONTROL FILES |
1147 | .PP | |
1148 | Seven \fIControl Files\fP are referenced by the \*(Uu utilities. | |
1149 | All live in the \*(Uu administrative directory, \fB/usr/lib/uucp\fP. | |
1150 | These are ASCII files, and can be modified using standard text editors such | |
1151 | as \fIvi\fP and \fIex\fP. | |
1152 | Lines beginning with a `#' character are comments; | |
1153 | lines ending with a `\e' are continued on the next input line. | |
10bd7bb5 | 1154 | .RS |
0b1fa720 KM |
1155 | .IP L-devices(5) 15 |
1156 | Declares all devices that are available to \fIuucico\fP for calling out. | |
1157 | .IP L-dialcodes(5) | |
1158 | Phone number prefixes. | |
1159 | Used to map alphabetic prefixes on phone numbers from \fIL.sys\fP to | |
1160 | real phone numbers. | |
1161 | Also useful to keep a phone number database outside of \fIL.sys\fP. | |
1162 | .IP L.sys(5) | |
1163 | Systems. | |
1164 | Declares all ``adjacent'' \*(Uu hosts, with directions on how to reach them. | |
1165 | .IP L.aliases(5) | |
1166 | Contains aliases used to map obsolete or truncated host names to the | |
1167 | correct names. | |
1168 | .IP L.cmds(5) | |
1169 | Commands Permissions. | |
1170 | Declares those commands for which remote \fIuux\fP execution is permitted. | |
1171 | .IP SQFILE | |
1172 | Sequence-number check file. (Optional) | |
1173 | .IP USERFILE(5) | |
1174 | Directory Tree Permissions. | |
1175 | Specifies the set of directory trees that a particular user or host may | |
1176 | reference. | |
10bd7bb5 | 1177 | .RE |
0b1fa720 KM |
1178 | .LP |
1179 | A general description of each file follows; see the \fIman\fP pages for | |
1180 | complete information. | |
1181 | Examples of the six standard files are included in the distribution in the | |
1182 | \fB/usr/lib/uucp/UUAIDS\fP directory. | |
1183 | .NH 2 | |
1184 | L-devices \- \*(UU Devices File | |
1185 | .LP | |
1186 | This file declares all devices that are available to | |
1187 | \fIuucico\fP | |
1188 | for calling out. | |
1189 | The special device files are assumed to be in the | |
1190 | .I /dev | |
1191 | directory. | |
1192 | The format for each entry is | |
1193 | .IP "" 12 | |
1194 | caller line call-unit class dialer [chat....] | |
10bd7bb5 KM |
1195 | .LP |
1196 | where; | |
1197 | .RS | |
0b1fa720 KM |
1198 | .IP caller 12 |
1199 | is the caller mechanism, that is, the type of device to be used. | |
1200 | This can be one of \fBACU\fP (for Automatic | |
1201 | Call Units (modem)), \fBDIR\fP (direct hardwired), \fBPAD\fP | |
1202 | (X.25/PAD), and others. | |
1203 | .IP line | |
1204 | is the device for the link. | |
1205 | For example, \fBcul0\fP for a modem, \fBtty10\fP for a hardwired line. | |
1206 | .IP call-unit | |
1207 | is the automatic call unit associated with | |
1208 | \fIdevice\fP. | |
1209 | This is used on autodialers such as the Racal-Vadic MACS and the | |
1210 | DEC DN-11 that use one device for data, and a second device for dialing. | |
1211 | If unused, this field must contain a placeholder such as ``unused'' or ``0''. | |
1212 | Some modems use this field to specify tone or pulse dialing. | |
1213 | .IP class | |
1214 | is the line speed, plus an optional alphabetic prefix. | |
1215 | The prefix can be used to distinguish among different devices that | |
1216 | have identical \fIcaller\fP and line speed. | |
1217 | .IP dialer | |
1218 | applies to \fBACU\fP devices only; | |
1219 | this is the type or brand name of the modem. | |
1220 | Supported modems include \fBDN11\fP (DEC DN-11), | |
1221 | \fBhayes\fP (Hayes Smartmodem), | |
1222 | \fBvadic\fP (Racal-Vadic 3451), | |
1223 | \fBventel\fP (VenTel 212A), and others. | |
1224 | .IP chat | |
1225 | refers to an \fIexpect/send\fP script, similar to that provided in | |
1226 | \fIL.sys\fP. | |
1227 | The difference is that the script in | |
1228 | .I L-devices | |
1229 | is executed before the connection is established, while the script in | |
1230 | .I L.sys | |
1231 | is executed afterwards. | |
10bd7bb5 | 1232 | .RE |
0b1fa720 KM |
1233 | .LP |
1234 | The line | |
1235 | .IP "" 12 | |
1236 | ACU\ \ tty47\ \ unused\ \ 1200\ \ hayes | |
1237 | .LP | |
1238 | would be set up for a system which | |
1239 | had device tty47 wired to a | |
1240 | Hayes ``Smartmodem 1200'' | |
1241 | for use at 1200 baud. | |
1242 | .NH 2 | |
1243 | L-dialcodes \- Phone Number Prefix File | |
1244 | .LP | |
10bd7bb5 | 1245 | This file contains entries with location abbreviations used |
0b1fa720 KM |
1246 | in the |
1247 | .I L.sys | |
1248 | file (e.g. py, mh, boston). | |
1249 | The entry format is | |
1250 | .IP "" 12 | |
10bd7bb5 KM |
1251 | abb\ \ dial-seq |
1252 | .LP | |
1253 | where; | |
1254 | .RS | |
1255 | .IP abb 12 | |
1256 | is the abbreviation, | |
1257 | .IP dial-seq | |
1258 | is the dial sequence to call that location. | |
1259 | .RE | |
b414db01 | 1260 | .LP |
10bd7bb5 KM |
1261 | The line |
1262 | .IP "" 12 | |
1263 | py\ \ 165\- | |
1264 | .LP | |
0b1fa720 | 1265 | would be set up so that entry py7777 would |
10bd7bb5 | 1266 | send 165\-7777 to the dial-unit. |
0b1fa720 KM |
1267 | .NH 2 |
1268 | L.aliases \- Hostname Aliases File | |
1269 | .LP | |
1270 | This file defines mapping (aliasing) of remote host names. | |
1271 | This is intended for compensating for systems that have | |
1272 | changed names, or do not provide their entire machine name | |
1273 | (like most USG systems). | |
1274 | It is also useful when a machine's name is not obvious or commonly misspelled. | |
1275 | .LP | |
1276 | Each line is of the form | |
1277 | .IP | |
1278 | real-name\ \ alias-name | |
1279 | .LP | |
1280 | where | |
1281 | .I real-name | |
1282 | is the full, correct name for the host, and | |
1283 | .I alias-name | |
1284 | is the old or truncated name. | |
1285 | .NH 2 | |
1286 | L.sys \- \*(Uu Systems File | |
1287 | .LP | |
10bd7bb5 | 1288 | Each entry in this file represents one system |
0b1fa720 KM |
1289 | which can be called by the local uucp programs. |
1290 | The format for each entry is | |
1291 | .IP | |
1292 | system times caller class device/phone-number [login] | |
1293 | .LP | |
1294 | where; | |
10bd7bb5 | 1295 | .RS |
0b1fa720 KM |
1296 | .IP "system" 12 |
1297 | is the hostname of the remote system. | |
1298 | .IP times | |
1299 | is a keyword-encoded string that indicates the days-of-the-week | |
1300 | and times-of-day when the system may | |
1301 | be called. | |
1302 | For example \fBMoTuTh0800\-1730\fP would denote Monday, Tuesday, | |
1303 | and Thursday, between 8 a.m. and 5:30p.m. | |
1304 | .IP | |
1305 | The day portion may be a list containing | |
1306 | any of | |
1307 | \fBSu\fP, \fBMo\fP, \fBTu\fP, \fBWe\fP, \fBTh\fP, \fBFr\fP, \fBSa\fP, | |
1308 | or | |
1309 | .B Wk | |
1310 | for any week-day or | |
1311 | .B Any | |
1312 | for any day. | |
1313 | .IP | |
1314 | The time should be a range of times (as in \fB0800\-1230\fP). | |
1315 | If no time portion is specified, any time | |
1316 | of day is assumed to be acceptable for the call. | |
1317 | .IP caller | |
1318 | is one of the caller device-types listed in \fIL-devices\fP. | |
1319 | .IP class | |
1320 | is the line speed for the call (e.g., 300, 1200, 9600), | |
1321 | plus an optional alphabetic prefix. | |
1322 | Network devices use this field for the network port number. | |
1323 | .IP phone | |
1324 | is the the phone number to call (for \fBACU\fP devices) or the | |
1325 | device filename. | |
1326 | A phone number is made up of an optional | |
1327 | alphabetic abbreviation and a numeric part. | |
1328 | The abbreviation is one which appears in the | |
1329 | .I L-dialcodes | |
1330 | file (e.g. mh5900, boston995\-9980). | |
1331 | .IP login | |
1332 | is a script describing how to log in to the remote host. | |
1333 | It is expressed as a series of | |
1334 | fields and subfields in the format | |
1335 | .IP "" 17 | |
1336 | expect\ \ send\ | |
1337 | [ | |
1338 | expect\ \ send | |
1339 | ] | |
1340 | \ ... | |
1341 | .IP "" 12 | |
1342 | where; | |
a9073747 | 1343 | .I expect |
0b1fa720 | 1344 | is the string expected to be read and |
a9073747 | 1345 | .I send |
0b1fa720 KM |
1346 | is the string to be sent when the |
1347 | .I expect | |
1348 | string is received. | |
1349 | The | |
b414db01 | 1350 | .I send |
0b1fa720 KM |
1351 | string is normally terminated with carriage-return; |
1352 | an empty | |
a9073747 | 1353 | .I send |
0b1fa720 KM |
1354 | string will send only a carriage-return. |
1355 | .IP | |
1356 | The expect field may be made up of subfields | |
1357 | of the form | |
1358 | .IP "" 17 | |
1359 | expect\fB[\fR\-send\-expect\fB]\fR... | |
1360 | .IP "" 12 | |
1361 | where the | |
10bd7bb5 | 1362 | .I send |
0b1fa720 | 1363 | is sent if the prior |
a9073747 | 1364 | .I expect |
0b1fa720 KM |
1365 | is not successfully read |
1366 | and the | |
a9073747 | 1367 | .I expect |
0b1fa720 | 1368 | following the |
a9073747 | 1369 | .I send |
0b1fa720 KM |
1370 | is the next expected string. |
1371 | .RE | |
1372 | .LP | |
1373 | A typical entry in the L.sys file would be | |
1374 | .IP "" 6 | |
1375 | sys\ Any\ ACU\ 1200\ \ mh7654\ login:--login:\ uucp\ ssword:\ word | |
1376 | .LP | |
1377 | The expect algorithm looks at the last part of the | |
1378 | string as illustrated in the password field. | |
1379 | .NH 2 | |
1380 | L.cmds \- Commands Permissions File | |
1381 | .LP | |
1382 | This file contains a list of commands, one per line, that are permitted | |
1383 | for remote execution via \fIuux\fP. | |
1384 | This list should be chosen with great care, since commands that take filenames | |
1385 | as arguments will allow users to easily circumvent \*(Uu's security. | |
1386 | For most sites, | |
1387 | .I L.cmds | |
1388 | should only include the lines: | |
a9073747 | 1389 | .DS |
0b1fa720 KM |
1390 | rmail |
1391 | ruusend | |
a9073747 | 1392 | .DE |
0b1fa720 KM |
1393 | .NH 2 |
1394 | SQFILE \- Sequence Check File (Optional) | |
1395 | .LP | |
1396 | This file contains an entry for each remote | |
1397 | system with which this site agrees to perform conversation | |
1398 | sequence checks. | |
1399 | The initial entry is just the system name of | |
1400 | the remote system. | |
1401 | The first conversation will add two items to the line, | |
1402 | the conversation count, and the date/time of the most | |
1403 | resent conversation. | |
1404 | These items will be updated with each conversation. | |
1405 | If a sequence check fails, which could indicate that an unauthorized | |
1406 | connection has been attempted, the entry will have to | |
1407 | be adjusted. | |
1408 | .LP | |
1409 | This facility is technically no longer supported in 4.3BSD \*(Uu, | |
1410 | since it was hardly ever used and consumed precious memory space on PDP-11 | |
1411 | systems. | |
1412 | The compile-time #define GNXSEQ can be set to enable sequence checking | |
1413 | should it be needed. | |
1414 | .NH 2 | |
1415 | USERFILE \- Pathnames Permissions File | |
1416 | .LP | |
a9073747 | 1417 | This file contains user accessibility information. |
0b1fa720 KM |
1418 | It specifies four types of constraint; |
1419 | .RS | |
1420 | .IP [1] | |
1421 | which files can be accessed by a normal user of the local machine, | |
1422 | .IP [2] | |
1423 | which files can be accessed from a remote computer, | |
1424 | .IP [3] | |
1425 | which login name is used by a particular remote computer, | |
1426 | .IP [4] | |
1427 | whether a remote computer should be called back in order to confirm | |
1428 | its identity. | |
1429 | .RE | |
1430 | .LP | |
1431 | Each line in the file has the following format | |
1432 | .IP "" 6 | |
1433 | login,sys\ \ | |
1434 | .B [ | |
1435 | c | |
1436 | .B ] | |
1437 | \ \ path-name\ \ | |
1438 | .B [ | |
1439 | path-name | |
1440 | .B ] | |
1441 | \ ... | |
1442 | .LP | |
1443 | where; | |
1444 | .RS | |
1445 | .IP login 12 | |
1446 | is the login name for a user or the remote computer, | |
1447 | .IP sys | |
1448 | is the system name for a remote computer, | |
1449 | .IP c | |
1450 | is the optional | |
1451 | .I | |
1452 | call-back required | |
1453 | .R | |
1454 | flag, | |
1455 | .IP path-name | |
1456 | is a path-name prefix that is acceptable for | |
1457 | .I user. | |
1458 | .LP | |
1459 | .RE | |
1460 | .LP | |
1461 | The constraints are implemented as follows. | |
1462 | .RS | |
1463 | .IP [1] | |
1464 | When the program is obeying a command stored on the local machine, | |
1465 | .I MASTER | |
1466 | mode, | |
1467 | the path-names allowed are those given for the first line in the | |
1468 | .I USERFILE | |
1469 | that has a login name that matches the login name of the user | |
1470 | who entered the command. | |
1471 | If no such line is found, the first line with a | |
1472 | .I null | |
1473 | login name is used. | |
1474 | .IP [2] | |
1475 | When the program is responding to a command from a remote machine, | |
1476 | .I SLAVE | |
1477 | mode, the path-names allowed are those given for the first line | |
1478 | in the file that has the system name that matches the system name | |
1479 | of the remote machine. | |
1480 | If no such line is found, the first one with a | |
1481 | .I null | |
1482 | system name is used. | |
1483 | .IP [3] | |
1484 | When a remote computer logs in, the login name that | |
1485 | it uses must appear in the | |
1486 | .I USERFILE . | |
1487 | There may be several lines with the same login name but one of them must | |
1488 | either have the name of the remote system or must contain a | |
1489 | .I null | |
1490 | system name. | |
1491 | .B Note: | |
1492 | This constraint, although stated in the original Nowitz \*(Uu document, | |
1493 | was not implemented in Version 7 \*(Uu. | |
1494 | For all practical purposes, | |
1495 | a remote computer's login was not validated by \*(Uu. | |
1496 | This is still the case in 4.3BSD. | |
1497 | Remote login checking \fIis\fP implemented in AT&T's System VR2.2 release, | |
1498 | and in the \*(Uu provided with Digital Equipment Corporation's ULTRIX. | |
1499 | HoneyDanBer analogously requires all remote logins to be listed in | |
1500 | its \fIPermissions\fP file. | |
1501 | .IP [4] | |
1502 | If the line matched in ([3]) contains a ``c'', | |
1503 | the remote machine is called back before any transactions take place. | |
1504 | .RE | |
1505 | .LP | |
1506 | The line | |
1507 | .IP "" 12 | |
1508 | u,m /usr/xyz | |
1509 | .LP | |
1510 | allows machine | |
1511 | .I m | |
1512 | to login with name | |
1513 | .I u | |
1514 | and request the transfer of files whose names start with | |
1515 | ``/usr/xyz''. | |
1516 | .LP | |
1517 | The line | |
1518 | .IP "" 12 | |
1519 | dan, /usr/dan | |
1520 | .LP | |
1521 | allows the ordinary user | |
1522 | .I dan | |
1523 | to issue commands for files whose name starts with | |
1524 | ``/usr/dan''. | |
1525 | .LP | |
1526 | The lines | |
1527 | .IP "" 12 | |
1528 | u,m /usr/xyz /usr/spool | |
1529 | .br | |
1530 | u, /usr/spool | |
1531 | .LP | |
1532 | allows any remote machine to login with name | |
1533 | .I u , | |
1534 | but if its system name is not | |
1535 | .I m , | |
1536 | it can only ask to transfer files whose names start with | |
1537 | ``/usr/spool''. | |
1538 | .LP | |
1539 | The lines | |
1540 | .IP "" 12 | |
1541 | root, / | |
1542 | .br | |
1543 | , /usr | |
1544 | .LP | |
1545 | allows any user to transfer files beginning with ``/usr'' | |
1546 | but the user with login | |
1547 | .I root | |
1548 | can transfer any file. | |
a9073747 | 1549 | .PP |
0b1fa720 KM |
1550 | .\"=========================================================================== |
1551 | .\" SECTION 5: SPOOL FILES | |
1552 | .\"=========================================================================== | |
1553 | .ne 5 | |
a9073747 | 1554 | .NH |
0b1fa720 KM |
1555 | SPOOL FILES |
1556 | .PP | |
1557 | Spool Files contain \*(Uu transfer requests and data. | |
1558 | Most have been described in detail earlier in this document. | |
1559 | .LP | |
1560 | All spool files live in the | |
1561 | .B /usr/spool/uucp | |
1562 | directory tree. | |
1563 | To keep the spool directory from becoming hopelessly cluttered, | |
1564 | each type of spool file is kept in its own subdirectory. | |
1565 | The name of the directory is the same as the common prefix of the | |
1566 | filename. | |
1567 | For example, \fIwork files\fP (files beginning with \fBC.\fP) are kept | |
1568 | in the \fBC.\fP directory; \fIexecute files\fP (which begin with \fBX.\fP) | |
1569 | are kept in the \fBX.\fP directory, and so on. | |
1570 | .LP | |
1571 | A total of ten spool subdirectories are used, one of which is optional: | |
a9073747 | 1572 | .RS |
0b1fa720 KM |
1573 | .IP C. 15 |
1574 | \fIWork\fP files. | |
b414db01 | 1575 | .IP CORRUPT |
0b1fa720 KM |
1576 | Corrupted \fIwork\fP and \fIexecute\fP files. |
1577 | \fIUucico\fP and \fIuuxqt\fP will deposit \fBC.\fP and \fBX.\fP files here | |
1578 | when they are unable to parse them. | |
1579 | A notice will also be placed in the \*(Uu log. | |
1580 | .IP D. | |
1581 | \fIData files\fP received from remote hosts. | |
1582 | .IP D.\fIhostname\fP | |
1583 | \fIData files\fP to be sent to remote hosts. | |
1584 | .IP D.\fIhostname\fPX | |
1585 | \fIExecution files\fP to be sent to remote hosts. | |
b414db01 | 1586 | .IP LCK |
0b1fa720 | 1587 | Per-device and per-site lock (\fBLCK.\fP) files. (Optional) |
b414db01 | 1588 | .IP STST |
0b1fa720 KM |
1589 | Per-site system status files. |
1590 | .IP TM. | |
1591 | Temporary files used in data transfer. | |
1592 | When the transfer is complete, the file is typically | |
1593 | \fImv\fP'ed to the \fBD.\fP or \fBX.\fP directory. | |
1594 | .IP X. | |
1595 | \fIExecution files\fP received from remote sites. | |
1596 | .IP XTMP | |
1597 | Temporary files and home directory for \fIuuxqt\fP. | |
10bd7bb5 | 1598 | .RE |
0b1fa720 KM |
1599 | .LP |
1600 | The following sections describe only those spool files that were not | |
1601 | discussed earlier. | |
1602 | .NH 2 | |
1603 | LCK \- lock files | |
1604 | .LP | |
1605 | Lock files are created for each device in use (except for TCP/IP sockets) | |
1606 | and each system conversing. | |
1607 | This prevents duplicate conversations and multiple attempts to use the | |
1608 | same devices. | |
1609 | The form of the lock file name is | |
1610 | .IP "" 12 | |
1611 | \fBLCK..\fRstr | |
1612 | .LP | |
1613 | where | |
1614 | .I str | |
1615 | is either a device or system name. | |
1616 | The files may be left in the spool directory if | |
1617 | .I uucico | |
1618 | aborts. | |
1619 | They will be ignored (reused) after 90 minutes. | |
1620 | When runs abort and calls are desired before the time limit expires, | |
1621 | the lock files should be removed. | |
1622 | If the \fBLCK.\fP subdirectory is used, it's access mode can be set to 777, | |
1623 | thus allowing normal users to remove dead lock files when necessary. | |
1624 | .NH 2 | |
1625 | STST \- system status files | |
1626 | .LP | |
1627 | These files are created in the \fBSTST\fP subdirectory by | |
1628 | \fIuucico\fP. | |
1629 | They contain information of failures such as login, dialup, or | |
1630 | sequence check, and will contain a | |
1631 | \fITALKING\fP, \fIRECEIVING\fP, or \fPSENDING\fP | |
1632 | status when two machines are conversing. | |
1633 | The file name is | |
1634 | \fBSTST/\fP\fIsystem\fP, | |
1635 | where \fIsystem\fP is the host name of the remote machine. | |
1636 | .LP | |
1637 | For ordinary failures (dialup, login), the file indicates the time | |
1638 | of the last failure; | |
1639 | this allows \fIuucico\fP to avoid retrying the failed call too soon. | |
1640 | For sequence check failures, the file must be removed before | |
1641 | any future attempts to converse with that remote system. | |
1642 | .LP | |
1643 | If the file is left due to an aborted run, it may contain a | |
1644 | .I TALKING | |
1645 | status. | |
1646 | In this case, the file must be removed before a conversation | |
1647 | is attempted. | |
1648 | The easiest way to do this is to use the \fIuupoll\fP command to | |
1649 | force \fIuucico\fP to start up. | |
1650 | .NH 2 | |
1651 | TM \- temporary data files | |
1652 | .LP | |
1653 | These files are created in the | |
1654 | .B /usr/spool/uucp/TM. | |
1655 | directory while files are being copied | |
1656 | from a remote machine. | |
1657 | Their names have the form | |
1658 | .IP "" 12 | |
1659 | \fBTM\fR.pid.ddd | |
1660 | .LP | |
1661 | where | |
1662 | .I pid | |
1663 | is a process-id and | |
1664 | .I ddd | |
1665 | is a sequential three digit number starting at zero | |
1666 | for each invocation of | |
1667 | .I uucico | |
1668 | and incremented for each file received. | |
1669 | After the entire remote file is received, the | |
1670 | .B TM | |
1671 | file is moved to the requested destination, | |
1672 | often the \fBX.\fP or \fBD.\fP directory. | |
1673 | If processing is abnormally terminated or the | |
1674 | move fails, the file will remain in the | |
1675 | \fBTM.\fP directory. | |
1676 | .LP | |
1677 | The stranded files should be periodically removed; | |
1678 | the | |
1679 | .I uuclean | |
1680 | program is useful in this regard. | |
a9073747 | 1681 | The command |
0b1fa720 KM |
1682 | .IP "" 12 |
1683 | uuclean\ \ -d/usr/spool/uucp/TM.\ \ \-pTM. | |
1684 | .LP | |
1685 | will remove all | |
1686 | .B TM | |
1687 | files older than three days. | |
1688 | .\"=========================================================================== | |
1689 | .\" SECTION 6: LOG FILES | |
1690 | .\"=========================================================================== | |
1691 | .ne 5 | |
1692 | .NH | |
1693 | LOG FILES | |
1694 | .LP | |
1695 | The following files provide a history of \*(Uu activities. | |
1696 | All live in the spool directory, \fB/usr/spool/uucp\fP. | |
1697 | They grow forever, and must be periodically trimmed or deleted; | |
1698 | this is usually done weekly (or daily) via \fIcron\fP. | |
1699 | .RS | |
1700 | .IP AUDIT 12 | |
1701 | This is a directory of audit trail files, one file per site. | |
1702 | .I Uucico | |
1703 | uses an audit file for debugging output | |
1704 | whenever it is run with debug enabled (via the \fB-x\fP option or a | |
1705 | \fBSIGFPE\fP signal), but the standard message output file \fBstderr\fP is | |
1706 | not available. | |
1707 | .IP ERRLOG | |
1708 | This is an oft-forgotten log of \*(Uu ``Assert'' errors. | |
1709 | An Assert error is a catastrophic and unrecoverable failure of the \*(Uu | |
1710 | system. | |
1711 | These include spool directories or control files that cannot be opened, | |
1712 | an unexpected error return from a system call, or an ``impossible case'' | |
1713 | in a utility's control flow. | |
1714 | .IP | |
1715 | Utilities that abort with an Assert error return a status code of -1. | |
1716 | If a user reports \fIuucp\fP or \fIuux\fP dying with a message like | |
1717 | ``uux failed, status -1,'' then the ERRLOG file should be checked. | |
1718 | .IP LOGFILE | |
1719 | This is the primary \*(Uu log. All \*(Uu activity is recorded here, | |
1720 | including queue requests from \fIuucp\fP and \fIuux\fP, attempted | |
1721 | connections, file transfers, and communications failures. | |
1722 | .IP SYSLOG | |
1723 | This is a log of file transfer statistics: number of bytes, time required, | |
1724 | and number of packet retries. | |
1725 | The effective data rate can be calculated simply by dividing the number of | |
1726 | bytes by the time; | |
1727 | low data rates or a large number of retries implies that the communication | |
1728 | link may marginal. | |
1729 | .RE | |
1730 | .LP | |
1731 | Optionally, one \fILOGFILE\fP per site may be maintained in the \fBLOG\fP | |
1732 | subdirectory. | |
1733 | This option can be selected at \*(Uu compile time via the LOGBYSITE #define | |
1734 | in \fBuucp.h\fP. | |
1735 | .\"=========================================================================== | |
1736 | .\" SECTION 7: ADMINSTRATION AND SYSTEM SECURITY | |
1737 | .\"=========================================================================== | |
1738 | .ne 5 | |
1739 | .NH | |
1740 | ADMINISTRATION AND SYSTEM SECURITY | |
1741 | .NH 2 | |
1742 | .UX | |
1743 | System Files | |
1744 | .SH | |
1745 | /etc/passwd | |
1746 | .LP | |
1747 | \*(Uu requires a login in \fB/etc/passwd\fP; | |
1748 | at its simplest the entry would be | |
a9073747 | 1749 | .DS |
0b1fa720 | 1750 | uucp::66:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico |
a9073747 | 1751 | .DE |
0b1fa720 KM |
1752 | .LP |
1753 | This user should own all the \*(Uu files and utilities. | |
1754 | Remote sites wishing to call in for \*(Uu transfers would login to | |
1755 | \fBuucp\fP (with the correct password, if any), and get | |
1756 | .I uucico | |
1757 | as their ``shell.'' | |
1758 | Since \fIuucico\fP would be called without any options, it would run in | |
1759 | .I SLAVE | |
1760 | mode, thus responding correctly to the remote system, which | |
1761 | would be in | |
1762 | .I MASTER | |
1763 | mode. | |
1764 | .LP | |
1765 | The directory | |
1766 | .B /usr/spool/uucppublic | |
1767 | should be created with 777 access modes, owned by \fBuucp\fP. | |
1768 | In addition to serving as the home directory for \*(Uu remote logins, | |
1769 | .B uucppublic | |
1770 | provides a ``public-access'' directory where any user can read, write, | |
1771 | or transfer files. | |
1772 | .LP | |
1773 | There are a number of security problems with using a single login, not | |
1774 | the least of which is that superuser permission would be necessary to | |
1775 | edit the \fIcontrol\fP files. | |
1776 | A better arrangement would be: | |
a9073747 | 1777 | .DS |
0b1fa720 KM |
1778 | uucp::66:1:UUCP Administrator:/usr/lib/uucp: |
1779 | nuucp::67:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico | |
a9073747 | 1780 | .DE |
0b1fa720 KM |
1781 | This provides one login for the \*(Uu administrator (which must be kept |
1782 | secure!) and a second for remote machines to use for login. | |
1783 | A still more elaborate setup would use a separate login for each remote | |
1784 | site, and possibly provide the administrator with a choice of shells: | |
a9073747 | 1785 | .DS |
0b1fa720 KM |
1786 | uucp::66:1:UUCP Administrator:/usr/lib/uucp: |
1787 | UUCP::66:1:UUCP Administrator:/usr/lib/uucp:/bin/csh | |
1788 | Uhosta::6001:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico | |
1789 | Uhostb::6002:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico | |
1790 | Uhostc::6003:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico | |
a9073747 | 1791 | .DE |
0b1fa720 KM |
1792 | .LP |
1793 | It is assumed that the login name | |
1794 | used by a remote computer to dial in | |
1795 | is not the same as the login name of a normal user | |
1796 | of the machine. | |
1797 | However, several remote computers may employ the same | |
1798 | login name. | |
1799 | .LP | |
1800 | Note that | |
1801 | .B uucppublic | |
1802 | is | |
1803 | .I not | |
1804 | used as the home directory for | |
1805 | .B uucp | |
1806 | when it logs into a regular shell. | |
1807 | This would be an extreme security hazard, since anyone could slip a | |
1808 | ``Trojan horse'' into a | |
1809 | .B .profile | |
1810 | or | |
1811 | .B .cshrc | |
1812 | file, which would be automatically executed when the \*(Uu administrator | |
1813 | logged in. | |
1814 | .SH | |
1815 | /etc/rc | |
1816 | .LP | |
1817 | The system startup file, \fB/etc/rc\fP, should clean up any stray lock | |
1818 | files with the line | |
1819 | .IP | |
1820 | rm -f /usr/spool/uucp/LCK.* | |
1821 | .LP | |
1822 | or, if the LCK subdirectory is being used, | |
1823 | .IP | |
1824 | rm -f /usr/spool/uucp/LCK/LCK.* | |
1825 | .SH | |
1826 | /etc/services | |
1827 | .LP | |
1828 | If \*(Uu is to be used over TCP/IP links, then an entry for \*(Uu's port | |
1829 | number should be added to \fB/etc/services\fP: | |
1830 | .IP | |
1831 | uucp\ \ 540/tcp\ \ uucpd\ \ # UUCP TCP/IP | |
1832 | .\"=========================================================================== | |
1833 | .NH 2 | |
1834 | Shell Scripts For Periodic Cleanup | |
1835 | .LP | |
1836 | The \*(Uu system has a fairly large number of activities that must | |
1837 | occur periodically. | |
1838 | These include starting \fIuucico\fP to process queued requests, | |
1839 | running \fIuuclean\fP to remove old spool files, and | |
1840 | shuffling the boundlessly-growing log files. | |
1841 | Some sites will also want to poll other sites periodically. | |
1842 | .LP | |
1843 | While it's possible to put all the necessary commands into \fIcron\fP's | |
1844 | control file \fB/usr/lib/crontab\fP, this would be extremely awkward. | |
1845 | The usual technique is to use three separate shells scripts, one each | |
1846 | for hourly, daily, and weekly operations. | |
1847 | Examples are provided in the | |
1848 | .B UUAIDS | |
1849 | directory; the following sections provide some specific recommendations. | |
1850 | .SH | |
1851 | Hourly | |
1852 | .LP | |
1853 | Activities that should occur hourly include: | |
1854 | .RS | |
1855 | .IP - 2 | |
1856 | Polling of selected sites. | |
1857 | Sites that have no dial-out capability will need to be periodically polled. | |
1858 | The \fIuupoll\fP command works well for this. | |
1859 | .IP - | |
1860 | Start \fIuucico\fP to complete all unfinished work. | |
1861 | This can be as simple as: | |
1862 | .IP "" 7 | |
1863 | uucico -r1 & | |
1864 | .RE | |
1865 | .SH | |
1866 | Daily | |
1867 | .LP | |
1868 | The daily script should be started by \fIcron\fP in the wee hours, around | |
1869 | 4 a.m. | |
1870 | Activities that should occur daily include: | |
1871 | .RS | |
1872 | .IP - 2 | |
1873 | Call | |
1874 | .I uuclean | |
1875 | to remove old spool files. | |
1876 | The preferred technique is something like the following: | |
1877 | .DS | |
1878 | cd /usr/lib/uucp | |
1879 | deadtime=`expr 24 * 7` | |
1880 | uuclean -d/usr/spool/uucp/AUDIT -n72 | |
1881 | uuclean -d/usr/spool/uucp/LCK -pLCK. -pLTMP. -n24 | |
1882 | uuclean -d/usr/spool/uucp/STST -n72 | |
1883 | uuclean -d/usr/spool/uucp/TM. -pTM. -n72 | |
1884 | uuclean -d/usr/spool/uucp/XTMP -n72 | |
1885 | uuclean -d/usr/spool/uucp/X. -pX. -n$deadtime | |
1886 | uuclean -d/usr/spool/uucp/C. -pC. -n$deadtime | |
1887 | uuclean -d/usr/spool/uucp/D. -pD. -n$deadtime | |
1888 | uuclean -d/usr/spool/uucp/D.`uuname -l` -pD. -n$deadtime | |
1889 | uuclean -d/usr/spool/uucp/D.`uuname -l`X -pD. -n$deadtime | |
1890 | .DE | |
1891 | .IP | |
1892 | In this example, | |
1893 | Audit files, Lock files, System Status files, temp files, and \fIuuxqt\fP | |
1894 | output files are cleaned up every 72 hours (3 days). | |
1895 | (\fBLTMP.\fP files are temporary files created by the lock mechanism; | |
1896 | they are rarely around for more than a few seconds. | |
1897 | Note, the above assumes that the | |
1898 | .B LCK | |
1899 | subdirectory is being used.) | |
1900 | All normal data files are cleaned up every 24 * 7 hours, or every 7 days. | |
1901 | .IP - | |
1902 | Shuffle the log files. | |
1903 | At the very least, LOGFILE should be moved to LOGFILE.old, and SYSLOG moved | |
1904 | to SYSLOG.old. | |
1905 | Busy sites may want to use \fIcompress\fP(1) to squeeze down the old files. | |
1906 | .IP - | |
1907 | Use \fIfind\fP(1) to clean up the | |
1908 | .B /usr/spool/uucppublic | |
1909 | directory. | |
1910 | If left unattended, garbage will gradually accumulate there until it fills | |
1911 | the file system. | |
1912 | .RE | |
1913 | .SH | |
1914 | Weekly | |
1915 | .LP | |
1916 | Small sites with very little traffic may chose to shuffle the log files once | |
1917 | per week, instead of once per day. | |
1918 | The weekly script should, like the daily script, be run early in the morning. | |
1919 | .\"=========================================================================== | |
1920 | .NH 2 | |
1921 | Connecting new systems | |
1922 | .LP | |
1923 | When first connecting a new machine to a \*(Uu network, | |
1924 | it is useful to try and establish a connection with | |
a9073747 | 1925 | \fItip\fR or \fIcu\fR first. |
0b1fa720 | 1926 | The \*(Uu administrator will quickly become aware of any special facilities |
a9073747 | 1927 | that are going to be required, |
0b1fa720 | 1928 | for example: |
a9073747 | 1929 | What lines and modems are to be used? |
b414db01 | 1930 | Is the connection through different hardware and carriers? |
a9073747 KM |
1931 | Does the remote system care about parity? |
1932 | What speed lines are being used and do they cycle through several speeds? | |
0b1fa720 KM |
1933 | Is there a line switch front end that will require special login dialogue in |
1934 | \fBL.sys\fP? | |
1935 | .LP | |
1936 | Once a successful login is achieved ``by hand,'' the administrator should | |
1937 | have enough information to allow the correct setup of the \fIcontrol\fR files | |
1938 | in | |
1939 | .B /usr/lib/uucp. | |
1940 | .LP | |
1941 | The \*(Uu administrator should then | |
1942 | negotiate with the remote site's \*(Uu administrator | |
1943 | as to who (if anyone) will do polling and when. | |
b414db01 | 1944 | Both administrators must set up the relevant accounts and passwords. |
0b1fa720 | 1945 | The local administrator should |
b414db01 JB |
1946 | decide on what permissions and security precautions are to be observed. |
1947 | Testing time and facilities will need to be arranged | |
1948 | to complete initial connection testing between the systems. | |
0b1fa720 KM |
1949 | .\"============================================================================ |
1950 | .NH 2 | |
1951 | Miscellaneous Security Issues | |
1952 | .LP | |
1953 | The \*(Uu system, left unrestricted, | |
a9073747 | 1954 | will let any outside user execute any commands |
b414db01 | 1955 | and copy any files that are accessible |
0b1fa720 KM |
1956 | to the |
1957 | .B uucp | |
1958 | login user. | |
a9073747 KM |
1959 | It is up to the individual sites to be aware of this and |
1960 | apply the protections that they feel are necessary. | |
1961 | .PP | |
1962 | There are several security features available aside from the | |
1963 | normal file mode protections. | |
1964 | These must be set up by the installer of the | |
0b1fa720 | 1965 | \*(Uu |
a9073747 KM |
1966 | system. |
1967 | .IP - 3 | |
1968 | The login for uucp does not get a standard shell. | |
0b1fa720 | 1969 | Instead, |
a9073747 | 1970 | .I uucico |
0b1fa720 | 1971 | is started. |
a9073747 KM |
1972 | Therefore, the only work that can be done is through |
1973 | .I uucico . | |
1974 | .IP - | |
1975 | A path check is done on file names that are to be sent | |
1976 | or received. | |
0b1fa720 | 1977 | .I USERFILE |
a9073747 | 1978 | supplies the information for these checks. |
0b1fa720 | 1979 | .I USERFILE |
a9073747 KM |
1980 | can also be set up to require call-back |
1981 | for certain login-ids. | |
0b1fa720 KM |
1982 | (See the description of |
1983 | .I USERFILE | |
1984 | above.) | |
a9073747 KM |
1985 | .IP - |
1986 | A conversation sequence count can be set up so | |
1987 | that the called system | |
1988 | can be more confident that the caller | |
1989 | is who he says he is. | |
1990 | .IP - | |
0b1fa720 KM |
1991 | .I Uuxqt |
1992 | is restricted via the | |
1993 | .I L.cmds | |
1994 | file to a small list of commands that it | |
a9073747 KM |
1995 | will execute. |
1996 | A ``PATH'' shell statement is prepended to the command | |
b414db01 | 1997 | line as specified in the |
0b1fa720 KM |
1998 | .I L.cmds |
1999 | file. | |
2000 | The administrator may modify the list or remove the | |
a9073747 KM |
2001 | restrictions as desired. |
2002 | .IP - | |
0b1fa720 KM |
2003 | All the \*(Uu utilities except \fIuudecode\fP, \fIuuencode\fP, |
2004 | and \fIuusend\fP should be owned by the | |
2005 | .B uucp | |
2006 | login with the ``setuid'' bit set and only execute | |
2007 | permissions (e.g. mode 04111). | |
2008 | This will prevent outsiders from modifying the programs | |
2009 | to get at a standard shell with a | |
2010 | .B uucp | |
2011 | login. | |
2012 | Optionally, the utilities may belong to group \fBdaemon\fP and be given | |
2013 | ``setgid'' permissions (mode 06111). | |
2014 | \fIUuxqt\fP should only permit other \*(Uu programs to execute it; | |
2015 | its mode should be 04100 or 06110. | |
2016 | .IP - | |
2017 | The \fIcontrol\fP files \fIL.sys\fP, \fIUSERFILE\fP, and \fISQFILE\fP | |
2018 | contain highly sensitive information. | |
2019 | They should be owned by the | |
2020 | .B uucp | |
2021 | login, with read and write permission granted only to the owner (mode 0600). | |
2022 | .\"=========================================================================== | |
2023 | .\" SECTION 7: UUCP SOURCE INSTALLATION | |
2024 | .\"=========================================================================== | |
2025 | .ne 5 | |
2026 | .NH | |
2027 | INSTALLING THE \*(UU SYSTEM | |
2028 | .PP | |
2029 | The source for the \*(UU system resides in the | |
2030 | .B /usr/src/usr.bin/uucp | |
2031 | directory. | |
2032 | The README file includes complete instructions on how to rebuild the | |
2033 | \*(Uu system from source. | |
2034 | .LP | |
2035 | For most environments, only two files will need to be modified: | |
2036 | .B uucp.h | |
2037 | includes a large number of tunable system-dependent parameters, | |
2038 | including operating system type, devices to be supported, | |
2039 | and a variety of optional features. | |
a9073747 | 2040 | The |
0b1fa720 KM |
2041 | .B Makefile |
2042 | may also have to be modified, | |
2043 | particularly if you chose to keep certain files in different | |
2044 | directories from usual. | |
2045 | .\"=========================================================================== | |
2046 | .\" SECTION 8: ACKNOWLEDGMENTS | |
2047 | .\"=========================================================================== | |
2048 | .ne 5 | |
10bd7bb5 | 2049 | .NH |
0b1fa720 | 2050 | ACKNOWLEDGEMENTS |
a9073747 | 2051 | .PP |
0b1fa720 KM |
2052 | 4.3BSD UUCP was a group development effort, involving the contributed work |
2053 | of over one hundred members of the USENET community. | |
2054 | We're extremely grateful to them all. | |
10bd7bb5 | 2055 | .LP |
0b1fa720 KM |
2056 | Special thanks go to the following individuals, whose contributions were |
2057 | especially valuable: | |
2058 | .RS | |
2059 | .IP - 2 | |
2060 | Rick Adams (Center for Seismic Studies) coordinated the 4.3BSD UUCP release, | |
2061 | incorporating (and often correcting) hundreds of bug fixes that | |
2062 | were posted on the USENET and mailed to him directly. | |
2063 | Rick also managed to find time to add many enhancements | |
2064 | and corrections of his own. | |
2065 | .IP - | |
2066 | Tom Truscott (Research Triangle Institute) and Bob Gray (then with | |
2067 | PAR Tech Corp, now at Univ of Colorado) | |
2068 | coordinated the 4.2BSD UUCP release, which was also a group effort. | |
2069 | Tom has continued to provide enhancements and fixes in 4.3BSD. | |
2070 | .IP - | |
2071 | Guy Harris (then with Computer Consoles, Inc., now with Sun Microsystems) | |
2072 | contributed many general bug fixes; | |
2073 | in particular, he was the first to isolate the infamous 4.2BSD ``TIMEOUT'' bug. | |
2074 | .IP - | |
2075 | Lou Salkind (New York University) wrote the \fIuuq\fP utility. | |
2076 | .IP - | |
2077 | James Bloom (U.C. Berkeley) isolated a major | |
2078 | day-one bug in the \fBg\fP-protocol driver | |
2079 | that had eluded many people's attempts to squash it. | |
2080 | .IP - | |
2081 | Piet Beertema (Centrum voor Wiskunde en Informatica, Amsterdam) wrote the | |
2082 | \fBf\fP-protocol to support ``mostly error-free links''; | |
2083 | Robert Elz (University of Melbourne) modified the protocol | |
2084 | specifically for X.25/PAD. | |
2085 | .IP - | |
2086 | Peter Honeyman (Princeton) assisted Rick by providing information on the | |
2087 | facilities provided in HoneyDanBer UUCP; | |
2088 | Rick then added many HDB-compatibility features and HDB-like | |
2089 | extensions to 4.3BSD UUCP. | |
2090 | .IP - | |
2091 | Ross Green (U.C. Berkeley) produced the first revision of this chapter, | |
2092 | updating the aging Nowitz document to more closely reflect reality. | |
2093 | .RE | |
10bd7bb5 | 2094 | .LP |
0b1fa720 KM |
2095 | Thanks again to everyone who contributed. |
2096 | Berkeley UUCP continues to be a product of its own users, | |
2097 | and would not exist as it does today without them. |