|
|
1.1 ! root 1: .TL ! 2: Setting up the Net ! 3: .AU ! 4: Tom Truscott ! 5: .AI ! 6: Duke University ! 7: (now at the Research Triangle Institute, NC) ! 8: January 1980 ! 9: (revised 1983 to better reflect reality) ! 10: .SH ! 11: Installing files and Programs. ! 12: .PP ! 13: This paper describes how to get the system named "xyz" on the uucp net. ! 14: If you are on the net, stop reading! ! 15: In chosing your system name, keep it short (no more than 7 characters long) ! 16: and make it specific. ! 17: That is, 'physics' is a poor uucp name! ! 18: The University of California at Berkeley names their machines ! 19: ucbvax, ucbcad, ucbmone, etc. ! 20: A standard Seventh Edition ! 21: .UX ! 22: system is assumed. ! 23: [Yup, this is ancient! I have deleted useless paragraphs -- trt] ! 24: The v7 C compiler MUST be used to recompile uucp; ! 25: the Phototypesetter version fails. ! 26: It is necessary to compile and install the mail, uucp, and news programs. ! 27: In what follows, "/bin/..." can be replaced by "/usr/bin/...". ! 28: .SH ! 29: MAIL ! 30: .PP ! 31: Ignore this section if you machine already has a network ! 32: mail program in place. ! 33: First, you must tell your machine its name. ! 34: Modern versions of UNIX use gethostname(II) or uname(II). ! 35: Ancient versions use include files. ! 36: If you are in the dark ages, edit /usr/include/whoami.h ! 37: and change the system name to xyz. ! 38: Do the same to /usr/include/ident.h ! 39: (not currently used, by the way). ! 40: Then recompile mail: ! 41: .DS ! 42: cd /usr/src/cmd ! 43: cmake mail ! 44: .DE ! 45: and copy it to /bin. ! 46: It should be setuid to root. ! 47: The network uses a restricted version of mail, ! 48: which is actually mail but invoked with a different name: ! 49: .DS ! 50: ln /bin/mail /bin/rmail ! 51: .DE ! 52: Mail should now be ready for the net. ! 53: A newer version of mail, called Mail, should be used if you have it. ! 54: It invokes a mail delivery program called delivermail ! 55: or the newer one called sendmail. ! 56: .SH ! 57: UUCP ! 58: .PP ! 59: Read the documents on uucp and uucp implementation in the ! 60: .I ! 61: .UX ! 62: Programmer's Manual. ! 63: .R ! 64: Also read the manual pages for uucp and uux. ! 65: .NH 1 ! 66: Getting ready to install uucp ! 67: .PP ! 68: Edit /etc/passwd to add the user "uucp" to your system. ! 69: Uucp should have unique user and group ids (for security). ! 70: Duke's uucp and daemon have the same group id, ! 71: so they can both access /dev/dn? ! 72: which is not accessible by "others." ! 73: Uucp will own the directories and other files of the uucp system. ! 74: Actually, it is nice to also add the user "UUCP" as a synonym for "uucp", ! 75: and put "UUCP" earlier in /etc/passwd. ! 76: That way uucp will identified as UUCP in mail messages, etc., ! 77: which highlights the fact that the messages are machine generated. ! 78: Here are typical lines: ! 79: .DS L ! 80: UUCP:iPkI/ZUX3YX2Y:4:19::/usr/spool/uucppublic:/usr/lib/uucp/uucico ! 81: uucp:iPkI/ZUX3YX2Y:4:19::/usr/spool/uucppublic:/usr/lib/uucp/uucico ! 82: .DE ! 83: .NH 1 ! 84: Installing uucp programs ! 85: .PP ! 86: To install uucp, read the INSTALL file in the uucp directory ! 87: and follow the instructions. ! 88: It references other documentation, which should also be read. ! 89: .NH 1 ! 90: Files in /usr/lib/uucp ! 91: .PP ! 92: All of these files should have the uid and gid of uucp, ! 93: and should not be readable (or writable) by others. ! 94: The files "L-devices" and "L-dialcodes" ! 95: are needed only if xyz calls other systems. ! 96: The file formats are described in the documentation ! 97: and are straightforward. ! 98: The USERFILE file should have one line for each system which calls xyz: ! 99: .DS ! 100: Uduke,duke /usr/spool/uucppublic ! 101: ,xyz / ! 102: .DE ! 103: The first line of the sample USERFILE indicates ! 104: that the duke system uses login name Uduke ! 105: and can access the public directory. ! 106: Here is a typical "Uduke" line in /etc/passwd: ! 107: .DS L ! 108: Uduke:PSB8EZ5w2tQ4I:4:19::/usr/spool/uucppublic:/usr/lib/uucp/uucico ! 109: .DE ! 110: This line differs from that for uucp ! 111: only in having a different login name and password. ! 112: The last line of USERFILE should be ",xyz /", ! 113: which permits local users but not remote systems ! 114: to access anything on xyz. ! 115: [Actually, USERFILE is a real botch. If you want security, ! 116: never given anyone permission from '/'.] ! 117: .PP ! 118: The file L.sys has a line for each system ! 119: with which xyz communicates. ! 120: If xyz DOES NOT place calls to Duke ! 121: then the L.sys line for Duke might be: ! 122: .DS ! 123: duke None ACU 300 123-4567 ogin Uxyz ssword fooha ! 124: .DE ! 125: This line indicates that xyz should never ("None") call Duke. ! 126: If xyz DOES place calls to Duke ! 127: then the line must be altered to so indicate. ! 128: The documentation explains that case fairly well. ! 129: .NH 1 ! 130: Getting it running ! 131: .PP ! 132: Uucp is now ready for execution. ! 133: If Duke is to call xyz, ! 134: the xyz system can request that Duke send mail ! 135: to test its operation. ! 136: /usr/spool/uucp/LOGFILE, SYSLOG, and ERRLOG ! 137: are useful logs of uucp activity. ! 138: If uucp does not work, and the problems cannot be resolved, ! 139: xyz could give Duke another login on xyz ! 140: so someone here can poke around ! 141: and see what the problem might be. ! 142: The login should have the same uid and gid as uucp ! 143: but without a uucico "shell". ! 144: .PP ! 145: If xyz can place calls to another system, ! 146: a good test is to try to place the call. ! 147: Suppose xyz has both a call-out and a call-in line. ! 148: Then an entry for the mythical system "foo" ! 149: can be put in the L.sys and USERFILE files, ! 150: and xyz can call itself as follows: ! 151: .DS ! 152: echo "test 1" | mail foo!root ! 153: echo "test 2" | mail foo!xyz!root ! 154: echo "test 3" | mail foo!foo!root ! 155: .DE ! 156: Mail sent from system xyz to itself ! 157: causes a local invocation of mail. ! 158: Mail sent to the mythical system "foo" will, ! 159: however, place a call to send the mail. ! 160: Uucp will complain about locking, ! 161: and shell metacharacters may not work, ! 162: but the communication should still succeed. ! 163: Even if xyz has only a call-in or call-out unit ! 164: it may be possible to fake the other one ! 165: by putting a null modem between the two lines. ! 166: [Unfortunately, the newest version of uucp ! 167: botches loop testing fairly badly. ! 168: But you can observe it successful connect.] ! 169: .PP ! 170: Also helpful is use of the "-x" debugging option. ! 171: The debugging information produced by ! 172: this blatant security hole ! 173: is truly a wonder to behold. ! 174: When it is in effect, the /usr/spool/uucp/AUDIT ! 175: file at the remote end will also collect debugging information. ! 176: .NH 1 ! 177: Cleaning up after uucp ! 178: .PP ! 179: Uucp will run okay without any cleanup; ! 180: however, the uucp files can become immense. ! 181: Duke runs several shell files via cron(8). ! 182: These are in uuaids/uu.*. ! 183: Systems which call Duke should run the following script occasionally: ! 184: .DS ! 185: /usr/lib/uucp/uucico -r1 -sduke ! 186: .DE ! 187: Systems which call-out can ! 188: request uucp to transmit waiting files: ! 189: .DS ! 190: /usr/lib/uucp/uucico -r1 ! 191: .DE ! 192: The standard version of cron runs with uid "daemon" ! 193: which may not be able to run the cleanup or uucico scripts. ! 194: The scripts could be run via at(1), ! 195: or you could remove the "setuid(1);" at the start of cron. ! 196: Then cron gives superuser privileges to its children. ! 197: As a precaution, we run a program ! 198: which does a setuid to uucp before invoking the scripts. ! 199: .NH 1 ! 200: Obscure problems that can happen ! 201: .PP ! 202: When uucp logs in, it is greeted (in standard V7 systems) ! 203: with the message of the day, "you have mail.", and so forth. ! 204: Sometimes these messages cause uucp to fail. ! 205: One cure is for login to suppress the messages ! 206: when the user has a non-standard shell (e.g. uucico). ! 207: .PP ! 208: If you have implemented your own tty handler, ! 209: be sure it supports 8 bit RAW input and output. ! 210: You should compare your own handler ! 211: with that of the standard tty.c, ! 212: and make sure the RAW mode execution is the same. ! 213: [This version does not yet support 7 bit datapath.] ! 214: .SH ! 215: USING THE NET ! 216: .PP ! 217: The simplest and least error-prone use of the net ! 218: is that of sending mail from one system to another. ! 219: A user on xyz can send a letter to Duke as follows: ! 220: .DS ! 221: echo "xyz lives" | mail duke!root ! 222: .DE ! 223: A letter can be sent to unc as follows: ! 224: .DS ! 225: echo "xyz lives on" | mail duke!unc!root ! 226: .DE ! 227: Here are some local network enthusiasts: ! 228: [I only kept this around for historical interest.] ! 229: .TS ! 230: l l l. ! 231: duke!swd Steve Daniel C version of news ! 232: duke!jte duke system administrator ! 233: duke!trt Tom Truscott network enthusiast ! 234: duke!unc!smb Steve Bellovin network news architecture ! 235: duke!phs!dennis Dennis Rockwell V6/PWB UNIX enthusiast ! 236: .TE ! 237: .PP ! 238: Uucp provides a convenient way ! 239: to transfer files between systems. ! 240: Files may be transferred by mailing them, ! 241: but that can get annoying. ! 242: Here are some hints for using uucp. ! 243: .IP 1. ! 244: By convention, the name "~uucp" may be used to access ! 245: the public directory on any system. ! 246: Thus, ! 247: .ti +5 ! 248: uucp -m -d x.c duke!~uucp/xyz/ ! 249: .br ! 250: copies the file x.c to the subdirectory xyz ! 251: of Duke's public directory (/usr/spool/uucppublic). ! 252: The "-m" option requests that mail be sent when x.c is transmitted. ! 253: The "-d" option requests that the remote system ! 254: create any directories that are needed ! 255: (in this case, the subdirectory xyz). ! 256: The final "/" in ".../xyz/" ! 257: informs uucp that xyz is a directory and not an ordinary file. ! 258: .IP 2. ! 259: uucp -d -m x.c duke!unc!~uucp/xyz/ ! 260: .br ! 261: will not work since uucp cannot handle "duke!unc!". ! 262: Uucp and uux work only between two systems; ! 263: they do not handle a system-pathname sequence as does mail. ! 264: [See uusend for a uucp-like multi-hop copy program.] ! 265: .SH ! 266: NEWS ! 267: .PP ! 268: You are not running the distributed bulletin board?! ! 269: Poor innocent. Don't start. You can never go back.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.