The Linux UUCP HOWTO Vince Skahan, v1.12, 31 March 1995 This document describes the setup and care+feeding of UUCP under Linux. You need to read this if you plan to connect to remote sites via UUCP via a modem, via a direct-connection, or via Internet. You probably do *not* need to read this document if don't talk UUCP. 1. Introduction The intent of this document is to answer some of the questions and comments that appear to meet the definition of "frequently asked questions" about UUCP software under Linux in general, and the version in the Linux SLS and Slackware distributions in particular. This document and the corresponding Mail and News "HOWTO" documents collectively supersede the UUCP-NEWS-MAIL-FAQ that has previously been posted to comp.os.linux.announce. 1.1. New versions of this document New versions of this document will be periodically posted to comp.os.linux.announce, comp.answers, and news.answers. They will also be added to the various anonymous ftp sites who archive such information including sunsite.unc.edu:/pub/Linux/docs/HOWTO. In addition, you should be generally able to find this document on the Linux WorldWideWeb home page at http://sunsite.unc.edu/mdw/linux.html. 1.2. Feedback I am interested in any feedback, positive or negative, regarding the content of this document via e-mail. Definitely contact me if you find errors or obvious omissions. I read, but do not necessarily respond to, all e-mail I receive. Requests for enhancements will be considered and acted upon based on that day's combination of available time, merit of the request, and daily blood pressure :-) Flames will quietly go to /dev/null so don't bother. In particular, the Linux filesystem standard for pathnames is an evolving thing. What's in this document is there for illustration only based on the current standard at the time that part of the document was written and in the paths used in the distributions or 'kits' I've personally seen. Please consult your particular Linux distribution(s) for the paths they use. Feedback concerning the actual format of the document should go to the HOWTO coordinator - Greg Hankins (gregh@sunsite.unc.edu). 1.3. Copyright Information The UUCP-HOWTO is copyrighted (c)1994 Vince Skahan. A verbatim copy may be reproduced or distributed in any medium physical or electronic without permission of the author. Translations are similarly permitted without express permission if it includes a notice on who translated it. Short quotes may be used without prior consent by the author. Derivative work and partial distributions of the UUCP-HOWTO must be accompanied with either a verbatim copy of this file or a pointer to the verbatim copy. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. We further want that ALL information provided in the HOWTOS is disseminated. If you have questions, please contact Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu, or +1 404 853 9989. 1.4. Standard Disclaimer Of course, I disavow any potential liability for the contents of this document. Use of the concepts, examples, and/or other content of this document is entirely at your own risk. 1.5. Other sources of information 1.5.1. Linux HOWTO Documents There is plenty of exceptional material provided in the other Linux HOWTO documents and from the Linux DOC project. In particular, you might want to take a look at the following: o the Serial Communications HOWTO o the Ethernet HOWTO o the Linux Networking Administrators' Guide 1.5.2. USENET comp.mail.uucp can answer most of your UUCP questions 1.5.3. Mailing Lists There is a Taylor UUCP mailing list. To join (or get off) the list, send mail to taylor-uucp-request@gnu.ai.mit.edu This request goes to a person, not to a program, so please make sure that you include the address at which you want to receive mail in the text of the message. To send a message to the list, send it to taylor-uucp@gnu.ai.mit.edu 1.5.4. Books HDB and V2 versions of UUCP are documented in about every vendor's documentation as well as in almost all *nix communications books. Taylor config files are currently only documented in the info files provided with the sources (and in the SLS distribution hopefully). To read them, you can grab the nice "infosrc" program from the SLS "s" disks and compile it. The following is a non-inclusive set of books that will help. o "Managing UUCP and USENET" from O'Reilly and Associates is in my opinion the best book out there for figuring out the programs and protocols involved in being a USENET site. o "Unix Communications" from The Waite Group contains a nice description of all the pieces (and more) and how they fit together. o "Practical Unix Security" from O'Reilly and Associates has a nice discussion of how to secure UUCP in general. o "The Internet Complete Reference" from Osborne is a fine reference book that explains the various services available on Internet and is a great source for information on news, mail, and various other Internet resources. o "The Linux Networking Administrators' Guide" from Olaf Kirch of the Linux DOC Project is available on the net and is also published by (at least) O'Reilly and SSC. It makes a fine one-stop shopping to learn about everything you ever imagined you'd need to know about Unix networking. 1.6. Where *NOT* to look for help There is nothing "special" about configuring and running UUCP under Linux (any more). Accordingly, you almost certainly do *NOT* want to be posting generic UUCP-related questions to the comp.os.linux.* newsgroups. Unless your posting is truly Linux-specific (ie, "please tell me what config file support is built into the binaries for Taylor uucp v1.04 in SLS v1.02"), you should be asking your questions in comp.mail.uucp or on the Taylor UUCP mailing list as indicated above. Let me repeat that. There is virtually no reason to post anything uucp-related in the comp.os.linux hierarchy any more. There are existing newsgroups in the comp.mail.* hierarchy to handle *ALL* your questions. IF YOU POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU ARE LOOKING IN THE WRONG PLACE FOR HELP. THE UUCP EXPERTS HANG OUT IN THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX. POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES YOUR TIME AND EVERYONE ELSE'S AND IT FREQUENTLY DELAYS YOU FROM GETTING THE ANSWER TO YOUR QUESTION. 2. Hardware Requirements There are no specific hardware requirements for UUCP under Linux. Basically any Hayes-compatible modem works painlessly with UUCP. In most cases, you'll want the fastest modem you can afford. In general, you want to have a 16550 UART on your serial board or built into your modem to handle speeds of above 9600 baud. If you don't know what that last sentence means, please consult the comp.dcom.modems group or the various fine modem and serial communications FAQs and periodic postings on USENET. 3. Getting UUCP Taylor UUCP (current version 1.05) is available on prep.ai.mit.edu in source form and in various Linux distributions in binary form. The newspak-2.4.tar.z distribution contains config files and readme files related to building uucp, news, and mail software under Linux from the various freely-available sources. It can usually be found on sunsite.unc.edu in the directory /pub/Linux/system/Mail/news. If you can't find it on sunsite, please send me mail and I'll make sure you get a copy of it. 4. Installing the Software (Much of this section is taken verbatim from the README file in the Taylor UUCP v1.05 sources - it's provided here so I can help you "rtfm" instead of just telling you to do so) Detailed compilation instructions are in uucp.texi in the sources. You can grab "known good" conf.h and policy.h files for Linux from the newspak distribution referred to in the "other sources of information" section above. In that case, you can probably go right to typing "make". 4.1. Extracting the compressed sources To extract a gzip'd tar archive, I do the following: gunzip -c filename.tar.z | tar xvf - A "modern" tar can just do a: tar -zxvf filename.tgz 4.2. Edit Makefile.in to set installation directories. Here, I set "prefix" to "/usr" rather than the default of "/usr/local" 4.3. Run "configure" Type "sh configure". The configure script will compile a number of test programs to see what is available on your system and will calculate many things. The configure script will create conf.h from conf.h.in and Makefile from Makefile.in. It will also create config.status, which is a shell script which actually creates the files. o Rather than editing the Makefile.in file in the sources as indicated above, you can get the same effect by: "configure --prefix=/usr/lib" 4.4. Configure the future setup of the software 4.4.1. Examine conf.h and Makefile to make sure they're right. I took the defaults 4.4.2. Edit policy.h for your local system. o - set the type of lockfiles you want (HAVE_HDB_LOCKFILES) o - set the type of config files you want built in (HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG, HAVE_HDB_CONFIG) o - set the type of spool directory structure you want (SPOOLDIR_HDB) o - set the type of logging you want (HAVE_HDB_LOGGING) o - set the default search path for commands (I added /usr/local/bin to mine) 4.5. Compile and install the software o Type "make". o Use "uuchk | more" to check configuration files. You can use "uuconv" to convert between configuration file formats. o Type "make install" to install. 4.6. Set up the config files I'd recommend you start by taking the attached known-good config files for HDB mode and installing them. o Make sure that the Permissions file indicates exactly where rmail and rnews are to be found if you put them anywhere other than in the path you specified in policy.h o Make sure that your Devices files matches the actual location of your modem (cua1=COM2 in the examples) o Edit the Systems file to set up the system(s) you talk to with their speed, phone number, username, and password. *PROTECT THIS FILE AGAINST WORLD READ* o Set up the Permissions file and add a set of lines for each site you talk to. For security reasons, it's recommended to make sure they each have a separate account (if you allow dialin) and home directory so you can track things. 4.7. Give it a try /usr/lib/uucp/uucico -r 1 -x 9 -s remote_system_name The -x 9 will have maximum debugging information written to the /usr/spool/uucp/.Admin/audit.local file for help in initial setup. I normally run -x 4 here since that level logs details that help me with login problems. Obviously, this contains cleartext information from your Systems file (account/password) so protect it against world- read. o from Pierre.Beyssac@emeraude.syseca.fr Taylor has more logging levels. Use -x all to get the highest level possible. Also, do a "tail -f /usr/spool/uucp/.Admin/audit.local" while debugging to watch things happen on the fly. 4.8. It doesn't work - now what ? In general, you can refer to the documentation mentioned above if things don't work. You can also refer to your more experienced UUCP neighbors for help. Usually, it's something like a typo anyway. 5. Frequently Asked Questions about Linux UUCP 5.1. Why is my binary of uucp configured in HDB rather than "Taylor" mode? (religious mode on - I know some people are just as religious about "ease of use" as I am about "being standard". That's why they make source code you can build your own from :-) ) Because IMHO it's the de-facto standard UUCP implementation at this time. There are thousands of sites with experienced admins and there are many places you can get incredibly good information concerning the HDB setup. The uucp-1.04 that's in SLS 1.02 and later has all three modes of config files built in. While I can't test it, I did "rtfm" and Ian Taylor tells me that it should work. The search order for config files is Taylor then V2 (L.sys) then HDB. Use the uuconv utility in /usr/lib/uucp to convert config files from one mode to another. If you can't wait, grab the sources for uucp and specify HAVE_BNU_CONFIG, HAVE_V2_CONFIG *and* HAVE_TAYLOR_CONFIG in the policy.h file and type "make". The following workaround is ugly, but it does work, if you want to run Taylor configs from binaries that don't have it built in. o From mbravo@tctube.spb.su (Michael E. Bravo) - add "-I /usr/local/lib/uucp/config" to _every_ invocation of whatever program in uucp package Also, the current Slackware has a nice setup where they separated the config files for the various configurations into separate directories. For example, the HDB config files would go into /usr/lib/uucp/hdb_config. While I used to 'roll my own' here, I've been running the out-of-the-box Slackware UUCP in HDB mode here with no problems for quite a while. 5.2. Why do I get "timeout" on connections when I upgraded to uucp-1.04 ? o from Ed Carp - erc@apple.com If you use a "Direct" device in the Devices file, there's now a 10 second timeout compiled in. Make the name of the Device anything other than "Direct". If you tweak the example /usr/lib/uucp files provided with SLS, you won't have problems with this one. o from Greg Naber - greg@squally.halcyon.com If you get chat script timeouts, you can tweak the sources by editing at line 323 in uuconf/syssub.c and changing the default timeouts from 10 seconds to something larger. o from Ed Rodda - ed@orca.wimsey.bc.ca If you get chat script timeouts, typically connecting to other Taylor sites, a pause after login can fix this. feed Any ACU,ag 38400 5551212 ogin: \c\d "" yourname word: passwd o from Dr. Eberhard W. Lisse - el@lisse.NA Some kernels experience modems hanging up after a couple of seconds. The following patch sent by Ian Taylor might help. *** conn.c.orig Mon Feb 22 20:25:24 1993 --- conn.c Mon Feb 22 20:33:10 1993 *************** *** 204,209 **** --- 204,212 ---- /* Make sure any signal reporting has been done before we set fLog_sighup back to TRUE. */ + /* SMR: it seems to me if we don't care about SIGHUPS, we should clear + the flag before we return */ + afSignal[INDEXSIG_SIGHUP] = FALSE; ulog (LOG_ERROR, (const char *) NULL); fLog_sighup = TRUE; 5.3. Why doesn't HDB anonymous uucp seem to work ? The SLS anonymous uucp only works in Taylor mode because it's compiled with HAVE_TAYLOR_CONFIG. If you want to do anon uucp in HDB mode, you'll have to recompile the sources with just HDB defined. Ian Taylor is considering which way to deal with this "feature". Also, Taylor in HDB mode seems to be sensitive to white space and blank lines. To be safe, make sure that there are no blank lines or trailing spaces in the Permissions file. Lastly, make sure that you have a file called remote.unknown in /usr/lib/uucp and that it's *NOT* executable. See the O'Reilly+Assoc book "Managing UUCP and USENET" for details regarding this file. 5.4. What does "no matching ports found" mean ? In all probability, you are attempting to use a device (/usr/lib/uucp/Devices) that doesn't exist, or the device you've specified in the /usr/lib/uucp/Systems file doesn't match up with any valid devices in the Devices file. Following this are *sanitized* versions of my working Taylor 1.05 HDB config files that you can plug in and use. note the "ACU" in the Systems ? That tells which "port" to use in Devices see the "scout" word in Systems ? That tells which dialer to use in Dialers. If you had a ACU port, but none that matched the specified dialer on the same line in Systems, you'll get that message. 5.5. What are known good config files for HDB mode ? The following are "known-good" config files for Taylor 1.05 under Linux in HoneyDanBer mode. They work on kernels of 0.99-8 or later. All files should be in /usr/lib/uucp unless you've tweaked the sources to put the uucp library elsewhere. If you *HAVE* put things in non-standard places, be aware that things like sendmail might get very confused. You need to ensure that all communications-related programs agree on your idea of "standard" paths. If you're running a kernel of 0.99-7 or earlier, change "cua1" to "ttyS1". #------------- Devices ------------- # make sure the device (cua1 here) matches your system # cua1 = COM2 # # here "scout" is the Digicom Scout Plus 19.2 modem I use # tbfast etc. is for a Telebit Trailblazer Plus modem's various speeds # ACU cua1 - 19200 scout ACU cua1 - 9600 tbfast ACU cua1 - 1200 tbslow ACU cua1 - 2400 tbmed #------------- dialers -------------- # note the setting of the Trailblazer registers "on the fly" # "scout" is a Digicom Scout Plus (Hayes-like) modem I use here # scout =W-, "" ATM0DT\T CONNECT tbfast =W-, "" A\pA\pA\pT OK ATS50=255DT\T CONNECT\sFAST tbslow =W-, "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200 tbmed =W-, "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400 #-------------- Systems ------------- # this is a very generic entry that will work for most systems # # the Any;1 means that you can call once per minute with using -f (force) # the ACU,g means force "g" protocol rather than Taylor's default "i" # fredsys Any;1 ACU,g 19200 scout5555555 "" \r ogin:--ogin: uanon word: uanon #-------------------------------- Permissions ------------------------- # Taylor UUCP in HDB mode appears to be sensitive to blank lines. # Make sure all Permissions lines are real or commented out. # # this is a anonymous uucp entry # LOGNAME=nuucp MACHINE=OTHER \ READ=/usr/spool/uucp/nuucp \ WRITE=/usr/spool/uucp/nuucp \ SENDFILES=yes REQUEST=yes \ COMMANDS=/bin/rmail # # this is a normal setup for a remote system that talks to us # note the absolute path to rnews since this site puts things # in locations that aren't "standard" # LOGNAME=fredsys MACHINE=fredsys \ READ=/usr/spool/uucp/fredsys:/usr/spool/uucp/uucppublic:/files \ WRITE=/usr/spool/uucp/fredsys:/usr/spool/uucppublic \ SENDFILES=yes REQUEST=yes \ COMMANDS=/bin/rmail:/usr/local/lib/news/bin/rnews #---------------------------------------------------------------------- 5.6. Getting uucico to call alternate numbers The new v1.05 has an added '-z' switch to uucico that will try alternate numbers for a remote system. 6. Acknowledgements The following people have helped in the assembly of the information (and experience) that helped make this document possible: Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Pierre Beyssac If I forgot anybody, my apologies.