home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / upc12bad.zip / hdbsamp.inf < prev    next >
Text File  |  1992-01-17  |  14KB  |  343 lines

  1. 
  2. From mit-eddie!INDYVAX.IUPUI.EDU!ICBJ100 Tue, 14 Jan 1992 01:16:52 EST remote from kendra
  3. Received:  from kendra by ffactory.kew.com (UUPC/extended 1.11r) with UUCP;
  4.            Tue, 14 Jan 1992 01:16:52 EST
  5. Received:  from mit-eddie by kewgate.kew.com (UUPC/extended 1.11r) with UUCP;
  6.            Mon, 13 Jan 1992 22:16:08 EST
  7. Received: from indyvax.iupui.edu by EDDIE.MIT.EDU with SMTP (5.65/25-eef)
  8.     id AA27970; Mon, 13 Jan 92 21:01:04 -0500
  9. Received: from INDYVAX.IUPUI.EDU by INDYVAX.IUPUI.EDU (PMDF #12264) id
  10.  <01GFA4VYVK7K0032DS@INDYVAX.IUPUI.EDU>; Mon, 13 Jan 1992 21:00 -0500
  11. Date: Mon, 13 Jan 1992 21:00 -0500
  12. From: Michael Morrett <mit-eddie!INDYVAX.IUPUI.EDU!ICBJ100>
  13. Subject: My UNIX host UUCP setup
  14. To: ahd@kew.com
  15. Message-Id: <01GFA4VYVK7K0032DS@INDYVAX.IUPUI.EDU>
  16. X-Vms-To: IN%"ahd@kew.com"
  17. X-Vms-Cc: ICBJ100
  18.  
  19. Hi Drew,
  20.  
  21. A person in Finland (Saku Elovarra <se@sakke.pp.fi>) asked to see
  22. my UNIX host UUCP setup. Here is what I sent. You can make this
  23. information avaliable to anyone if you think what I wrote is worth
  24. a bears butt.
  25.  
  26. thanks,
  27. mike
  28. -----------------------------------------------------------------
  29.                                                       13-JAN-1992
  30.                                                Michael R. Morrett
  31.                                         icbj100@indyvax.iupui.edu
  32.                                         Indianapolis, Indiana USA
  33.                                                    1-317-265-1870
  34.  
  35.                                      314 lines / 13074 characters
  36.  
  37. Here is how my UNIX host is configured to run UUCP...
  38.  
  39. +------------------+
  40. | Intergraph       |     +-------+             +-------+
  41. | InterPro 2020    |     | Hayes |             | Hayes |
  42. | UNIX Workstation X-----X V9600 | . . . . . . | V9600 |
  43. | System V 3.1     |  ^  | Modem |      ^      | Modem |
  44. | HoneyDanBer UUCP |  ^  +-------+      ^      +---X---+
  45. +------------------+  ^                 ^          |
  46.      "frogshid"       ^          telephone line    |
  47.                       ^                            |
  48. 25 pin male/female straight                +-------X-------+
  49. through RS-232 cable (The                  | PC running    |
  50. workstation only has pins                  | UUPC/extended |
  51. 1-8 & 20 cabled to the                     +---------------+
  52. modem port tty00.)                             "flybait"
  53.  
  54. The Hayes modem is connected to port /dev/tty00 (the only port
  55. with modem control on the workstation). This port is configured
  56. at 9600 baud and with RTS/CTS flow control.
  57.  
  58. +--------------+
  59. | /etc/inittab |
  60. +--------------+
  61. t0:234:respawn:/usr/lib/uucp/uugetty -r -t 30 tty00 9600H
  62.  
  63. This port (tty00) is using uugetty to allow the port to dial in
  64. or dial out. The "-r" flag causes uugetty to wait to read a
  65. character before it displays the login message. The "-t" flag
  66. specifies the length of time in seconds (30 seconds for my host)
  67. uugetty will wait before aborting if no response. The 9600H is a
  68. pointer to an entry in the /etc/gettydefs file.
  69.  
  70. +----------------+
  71. | /etc/gettydefs |
  72. +----------------+
  73. 9600H# B9600 BRKINT IGNPAR ICRNL IXON IXANY OPOST ONLCR CS8 \
  74. CREAD ISIG HUPCL ECHO ECHOE ECHOK ICANON # B9600 BRKINT IGNPAR \
  75. ICRNL IXON IXANY OPOST ONLCR CS8 CREAD ISIG HUPCL ECHO ECHOE \
  76. ECHOK ICANON #login: #2400H
  77.  
  78. 2400H# B2400 BRKINT IGNPAR ICRNL IXON IXANY OPOST ONLCR CS8 \
  79. CREAD ISIG HUPCL ECHO ECHOE ECHOK ICANON # B2400 BRKINT IGNPAR \
  80. ICRNL IXON IXANY OPOST ONLCR CS8 CREAD ISIG HUPCL ECHO ECHOE \
  81. ECHOK ICANON #login: #1200H
  82.  
  83. 1200H# B1200 BRKINT IGNPAR ICRNL IXON IXANY OPOST ONLCR CS8 \
  84. CREAD ISIG HUPCL ECHO ECHOE ECHOK ICANON # B1200 BRKINT IGNPAR \
  85. ICRNL IXON IXANY OPOST ONLCR CS8 CREAD ISIG HUPCL ECHO ECHOE \
  86. ECHOK ICANON #login: #9600H
  87.  
  88. The "\" continuation character is NOT part of the lines above.
  89. They are just three really long lines. It is shown this way to
  90. make it "pretty" for this document. The first line starts with
  91. 9600H# and ends with #2400H. The second line starts with 2400H#
  92. and ends with #1200H. The third line starts with 1200H# and ends
  93. with #9600H.
  94.  
  95. The first part and last part of each line are labels. The
  96. /etc/inittab file says to read the line labeled 9600H in the
  97. /etc/gettydefs file. If there is an error reading this line or
  98. the remote host or the remote user sends a BREAK, the label at
  99. the end of the 9600H line says to read the line labeled 2400H.
  100. These labels provide a "goto" function.
  101.  
  102. To create the three lines for modem use, a line in the existing
  103. /etc/gettydefs file labeled 9600 was copied to create three new
  104. lines labeled 9600H, 2400H, and 1200H. CLOCAL was changed to
  105. HUPCL in two places in each line so that when the connection
  106. stops (carrier detect is lost), the uugetty process will die and
  107. drop the DTR lead. The baud Bxxx settings in two places in each
  108. line also need to be changed.
  109.  
  110. Besides HUPCL, another important option is CS8. This sets the
  111. character size to eight (needed for "g" UUCP protocol). The "man
  112. pages" for gettydefs(4) and termio(7) describe in detail the
  113. other options in the /etc/gettydefs file.
  114.  
  115. +-------------+
  116. | /etc/passwd |
  117. +-------------+
  118. uucp:*:5:1:Admin/cron login:/usr/lib/uucp:
  119. nuucp:*:6:1:uupsycho login:/usr/spool/uucppublic:/usr/lib/uucp/uucico
  120. uubugs:xxx:6:1:uupsycho login:/usr/spool/uucppublic:/usr/lib/uucp/uucico
  121.         |
  122. (13 character encrypted password)
  123.  
  124. The "uucp" login is the administrative login id that "owns" all
  125. UUCP files and directories. It is also used by cron to execute
  126. the UUCP maintenance programs.
  127.  
  128. The "nuucp" login is the login id that remote uucico programs
  129. will use to log into the local host. For security reasons, this
  130. account on my host is disabled. The "nuucp" account was copied to
  131. create a separate login for each remote host that calls my host.
  132. For example, the "uubugs" login id will be used by the PC host
  133. "flybait".
  134.  
  135. +-----------------------+
  136. | /usr/lib/uucp/Systems |
  137. +-----------------------+
  138. flybait Any ACU 9600 9=123-4567 "" \r\d\r ogin:--ogin: tadpole ssword: mucus
  139. 1       2   3   4    5          6  7      8            9       10      11
  140.                                 \-------------- chat script ---------------/
  141.  
  142. 1 = remote host name
  143. 2 = call Anytime
  144. 3 = index into Devices file (1st field) to find port type
  145. 4 = index into Devices file (4th field) to find port baud rate
  146. 5 = remote host phone number
  147. 6 = expect ""
  148. 7 = send carriage return + delay (1-2 seconds) + carriage return
  149. 8 = expect-send and subexpect-subsend information
  150.     Expect "ogin:" (part of "login:"). If not received, send
  151.     a carriage return or linefeed, look again for "ogin:".
  152.     Between the "--" is where the carriage return or linefeed is
  153.     sent. Additional characters can be included between the "--"
  154.     if needed.
  155. 9 = send remote host login id
  156. 10 = expect "ssword:" (part of "Password:")
  157. 11 = send remote host password
  158.  
  159. +-----------------------+
  160. | /usr/lib/uucp/Devices |
  161. +-----------------------+
  162. ACU tty00 - 9600 hayes
  163. 1   2     3 4    5
  164.  
  165. 1 = device type ACU (Automatic Call Unit) - a modem, indexed from
  166.     the Systems file
  167. 2 = device port
  168. 3 = not used
  169. 4 = baud rate, indexed from the Systems file
  170. 5 = index into Dialers file (1st field) to find modem name
  171.  
  172. +-----------------------+
  173. | /usr/lib/uucp/Dialers |
  174. +-----------------------+
  175. hayes   =,-,    "" \dAT "" \dAT OK-\dAT-OK \dATDT\T CONNECT
  176. 1       2       3  4    5  6    7          8        9
  177.  
  178. 1 = modem name, indexed from the Devices file
  179. 2 = "=" equals "," and "-" equals ","
  180.     This allows the use of "=" and "-" in the Systems file (fifth
  181.     field) for the remote host phone number. This translates the
  182.     "=" and the "-" characters to the Hayes modem "," pause
  183.     character.
  184. 3 = expect ""
  185. 4 = send delay + AT
  186. 5 = expect ""
  187. 6 = send delay + AT
  188. 7 = expect OK, if not received, send delay + AT again, expect OK
  189. 8 = send delay + ATDT + remote host phone number. The "\T" means
  190.     use the information in the Dialcodes file if needed.
  191. 9 = expect CONNECT
  192.  
  193. +-------------------------+
  194. | /usr/lib/uucp/Dialcodes |
  195. +-------------------------+
  196. (I do not use.)
  197.  
  198. +---------------------------+
  199. | /usr/lib/uucp/Permissions |
  200. +---------------------------+
  201. LOGNAME=nuucp
  202. LOGNAME=uubugs VALIDATE=flybait MACHINE=flybait \
  203.         REQUEST=yes SENDFILES=yes PUBDIR=/usr/spool/uucppublic/flybait \
  204.         READ=/ WRITE=/usr/spool/uucppublic/flybait \
  205.         COMMANDS=rmail
  206.  
  207. Options             LOGNAME                  MACHINE
  208.                     (remote calls local)     (local calls remote)
  209. ------------------  -----------------------  --------------------
  210.  
  211. VALIDATE            Remote host must log in  Does not apply
  212.                     with user id specified
  213.                     by LOGNAME. This links
  214.                     MACHINE and COMMANDS
  215.                     with a LOGNAME entry.
  216.  
  217. REQUEST=yes/no      Can remote host          Same meaning
  218.                     request files from
  219.                     local host (default is
  220.                     no).
  221.  
  222. SENDFILES=yes/call  Can local host send      Does not apply
  223.                     files queued for remote
  224.                     host (default is call,
  225.                     only send when local
  226.                     host calls remote host).
  227.  
  228. READ=pathnames      Directories uucico may   Same meaning
  229.                     read from (default
  230.                     /usr/spool/uucppublic).
  231.  
  232. WRITE=pathnames     Directories uucico may   Same meaning
  233.                     write to (default
  234.                     /usr/spool/uucppublic).
  235.  
  236. COMMANDS=commands   Does not apply           Commands uuxqt will
  237.                                              execute for remote
  238.                                              host (default
  239.                                              rmail).
  240.  
  241. +--------------------+
  242. | /usr/lib/uucp/Poll |
  243. +--------------------+
  244. flybait<tab>9 13
  245.  
  246. My host has a cron job execute the shell script
  247. /usr/lib/uucp/uudemon.poll at eight minutes before every hour.
  248. This shell script checks the /usr/lib/uucp/Poll file to find
  249. remote hosts that are to be polled. It then creates the required
  250. work file /usr/spool/uucp/hostname/C.hostnamn0000. Another cron
  251. job executes the shell script /usr/lib/uucp/uudemon.hour (it runs
  252. uusched and uuxqt in the background) at four minutes before every
  253. hour. As a result of these two cron jobs, the remote host
  254. "flybait" will be called at 9:56am and 1:56pm.
  255.  
  256. The work file name (C.flybaitn1234 for example) is created in an
  257. unique way by adding "C." + first seven characters of remote host
  258. name + an ASCII character representing the grade (priority) of
  259. the work and a 4-digit job sequence number asigned by UUCP. The
  260. "C" stands for Command file. Uucico processes the file priority
  261. in order from A to Z and then a to z. The latest sequence number
  262. is stored in the file /usr/lib/uucp/SEQF, but polling work files
  263. are always sequence number 0000.
  264.  
  265. +-------------+
  266. | Hayes Modem |
  267. +-------------+
  268. The modem was setup by executing the following commands on a PC
  269. temporarily connected to the Hayes modem:
  270.  
  271.                     AT&FM0Q2&C2&D3S0=1&Y0&W0&W1
  272.  
  273. AT&F   recall factory configuration
  274. M0     turn speaker off
  275. Q2     return result codes in originate mode, do not return
  276.        result codes in answer mode
  277. &C2    Pin 8 - presume presence of carrier detect (CD) signal
  278.        until on-line, then monitor status of signal
  279. &D3    Pin 20 - monitor DTR signal and when an on-to-off
  280.        transition of DTR signal occurs, hang up and perform a
  281.        hard reset
  282. S0=1   answer on 1 ring
  283. &Y0    specify stored user profile 0 as power-up configuration
  284. &W0    write storable parameters as profile 0
  285. &W1    write storable parameters as profile 1
  286.  
  287. Option Q2 (it appears most people use Q1) is used because it
  288. allows the modem result codes (OK, CONNECT, etc) to be seen on a
  289. manually dialed connection and disables the modem result codes in
  290. answer mode. If the modem echoes the result code (CONNECT for
  291. example) on an incoming call, the local host uugetty will see the
  292. capital letters in the result code and think the remote host only
  293. understands uppercase! At least three weeks of time was spent in
  294. tracking down this problem!
  295.  
  296. Option &C2 (it appears most people use &C1) is used because it
  297. allows a manually dialed connection (Kermit for example) to the
  298. modem even if carried detect is not present or enabled. Because
  299. the /etc/gettydefs file has HUPCL, the uugetty process will NOT
  300. communicate with the modem without seeing carrier detect if
  301. option &C1 is used.
  302.  
  303. Option &D3 (it appears most people use &D2) is used because this
  304. causes the modem to do a HARD reset when the line disconnects and
  305. DTR is dropped by the uugetty process. A Zillion dollar phone bill
  306. would be a BIG shock!
  307.  
  308. The &Y0, &W0, and &W1 commands make sure when the modem resets,
  309. it comes up in a known state. My modem had a weird setup stored
  310. in profile 1 (from some other project) and &Y1 was set. Again, it
  311. took a long time to figure out this problem.
  312.  
  313. The Hayes modem has RTS/CTS local flow control (&K3) and
  314. communicate in error-control mode (&Q5) enabled by default.
  315.  
  316. +----------------+
  317. | Required Books |
  318. +----------------+
  319. "Managing UUCP and Usenet" by O'Reilly & Associates
  320.  
  321. +----------------+
  322. | Optional Books |
  323. +----------------+
  324. "UNIX Administration Guide for System V" by Rebecca Thomas &
  325.    Rik Farrow (Very good 106 page chapter on UUCP)
  326. "Using UUCP and Usenet" by O'Reilly & Associates
  327. "The Waite Group's UNIX Communications" by SAMS
  328.  
  329. +---------+
  330. | Remarks |
  331. +---------+
  332. The hardest part about UUCP is the modem setup, next the chat
  333. script. The first modem on my workstation was a NEC modem that
  334. has about 3,000,000 setup commands and the factory default
  335. configuration makes absolutely no sense! The NEC modem has a
  336. factory default of NO flow control!! About two months of time was
  337. spent trying to get UUCP to work with the NEC modem! When the
  338. NEC modem was replaced with a Hayes modem, UUCP started working
  339. just great!
  340.  
  341. If you have any comments (good or bad), corrections, question,
  342. PLEASE send me mail! :-)
  343.