10/11/95 UUCP (BNU) Helpful Information SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. ABOUT THIS DOCUMENT This document is an aid to setting up UUCP (BNU) on your RISC System/6000. BNU (Basic Networking Utilities) is the AIX version of UUCP (UNIX-to-UNIX Copy Program). The terms "BNU" and "UUCP" are used interchangeably in this document. This document applies to AIX 3.1 and 3.2. It is divided into the following sections: o "UUCP Configuration Files" o "Setting Up UUCP" o "Phases of UUCP Communication" o "Status Messages and What to Do About Them" o "Parameters for Chat Scripts" UUCP CONFIGURATION FILES Description of Files The setup files for AIX UUCP are +----------------------------------------------------------+ | | | o /usr/lib/uucp/Systems | | | | o /usr/lib/uucp/Devices | | | | o /usr/lib/uucp/Permissions | | | | o /usr/lib/uucp/Dialers | | | | o /usr/lib/uucp/Dialcodes | | | | o /usr/lib/uucp/remote.unknown | | | | o /usr/lib/uucp/Poll | | | +----------------------------------------------------------+ UUCP (BNU) Helpful Information 1 10/11/95 The SYSTEMS file lists remote computers with which the local system can communicate using BNU. This information is used by the uucico program to connect to the various systems. Consider this file the database of systems to which your machine can connect. The DEVICES file lists each device on the local system that can dial out using BNU. The fields for each device include type, location, and speed. Only dial-out connections use the "Devices" file. The PERMISSIONS file is used to create security control, with limitations, over machines attempting to communicate with your machine. The DIALERS file lists modems used by BNU and specifies the initial handshaking necessary for modem, TCP/IP, and remote communications. The most common types of dialers are "hayes", "direct", and "TCP". The DIALCODES file is used to make standardized names for certain parts of a phone number. For example, if you fre- quently make calls to a certain area code in San Francisco, you could create the following "Dialcodes" entry: "SFO9,1415". The REMOTE.UNKNOWN file is a shell script. It is executed by the BNU program when a remote computer that is not listed in the local Permissions file attempts to communicate with that local system. The POLL file is used to schedule the polling of passing systems. Its format is similar to crontab. Poll format is , a tab, and the hours in which to poll (0-23), separated by spaces. Example: POLLDEMO 0 1 2 3 4 5 19 20 21 22 23 Correlation of Files The following diagram shows an example of the Systems, Devices, and Dialers files and shows how they relate to each other. ---------------------------------------------------------------------- Systems file: Any v32ibm 9600 555-1111 _______________/ Devices file: / v32ibm tty0 - Any ibm \D ______________________/ Dialers file: / ibm =, -, #" \d ATSFI\r\c#OK#AFE1SD3L2MIC0SCI\r\c#OK... ---------------------------------------------------------------------- NOTE: Information in man pages gives a complete description of these files. (For example, type "man Systems".) UUCP (BNU) Helpful Information 2 10/11/95 Sample Setup of Configuration Files The following is a sample setup for a modem connection. ---------------------------------------------------------------------- The Systems file: Danny Any v32ibm 9600 9,15551111 "" \d\d\d\r in:--in: uucp word: uucp The Devices file: v32ibm tty0 - Any ibm \D The Dialers file: ibm =,-, "" \dAT\r\c OK \pATDT\T\r\c CONNECT The Permissions file: MACHINE=Danny REQUEST=yes READ=/ WRITE=/ COMMANDS=ALL LOGNAME=uucp REQUEST=yes SENDFILES=yes READ=/ WRITE=/ ---------------------------------------------------------------------- With the above setup you could test the connection with cu -d Danny The cu command connects to another system, and the "-d" gives extra debug information. SETTING UP UUCP This section contains steps for setting up UUCP on your system. It is divided into the following parts: o "Part One: Make Sure UUCP is Installed" o "Part Two: Add Administrative and Machine Logins" o "Part Three: Activate the cron Daemon" o "Part Four: Set Up the BNU Configuration Files" Part One: Make Sure UUCP is Installed Run the following command to make sure UUCP is installed on your system: lslpp -h bosext1.uucp.obj If it is installed, you will see the following in the output: bosext1.uucp.obj If you do not see this output, you will need to install it from the install tape. UUCP (BNU) Helpful Information 3 10/11/95 Part Two: Add Administrative and Machine Logins With the following steps, edit /etc/passwd, /etc/group, /etc/security/login.cfg, and /etc/security/passwd to add the uucpadm login and other logins. 1. In /etc/passwd, add a login with the same group and user ID as uucp. This will be helpful for several adminis- trative tasks and for debugging. Make sure that the new user's shell is not /usr/lib/uucp/uucico, and make the home directory /usr/lib/uucp. The suggested entry in /etc/passwd is: uucpadm:!:5:5::/usr/lib/uucp:/bin/ksh 2. Now, add machine logins to /etc/passwd. You have the option of maintaining separate logins or having one login for all UUCP connections. The rule of thumb here is that if you need to maintain complete control over access by each individual machine, you must create sepa- rate login IDs as well as combine the MACHINE and LOGNAME entries in the Permissions file. Here are a few examples from the /etc/passwd file: ---------------------------------------------------------------------- Umicrtk:!:105:5:micrtk uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico Ufloydl:!:106:5:floydl uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico Uicus:!:107:5:icus uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico Urisctkr:!:108:5::/usr/spool/uucppublic:/usr/lib/uucp/uucico ---------------------------------------------------------------------- If you want to have one set of permissions and do not want to maintain separate control for any of your UUCP connections, you can have a single login for all machines such as the following: +--------------------------------------------------------------------+ | | | nuucp:!:6:5::/usr/spool/uucppublic:/usr/lib/uucp/uucico | | | +--------------------------------------------------------------------+ Field requirements: Notice that the user ID (the third colon separated field) is unique. It would be a secu- rity risk to have this ID be the same as another in the /etc/passwd file. The group ID (the 4th colon separated field) MUST be "5" -- the same as group uucp. You can change the home directory (the sixth field) to any valid directory, but the login shell (the seventh field) MUST be /usr/lib/uucp/uucico. 3. Add the new logins to /etc/group. An example of the an entry in /etc/group is: uucp:!:5:uucp,uucpadm,nuucp,Umicrtk,Uicus,Urisctakr UUCP (BNU) Helpful Information 4 10/11/95 You may want to add any logins to group uucp that will be using modems to dial out with programs other than cu. 4. Set up passwords for the logins. You must be logged on as root to do this. Type the following to set up the password for uucpadm. passwd uucpadm 5. Add the login shell of your UUCP logins (/usr/lib/uucp/uucico) to the list of shells in /etc/security/login.cfg. Look for the "shells = " stanza and append ",/usr/lib/uucp/uucico" to the end of the list. 6. Modify the default herald in /u/security/login.cfg. Sometimes the default herald, with all of its control-Js, will cause a uucico process which is trying to log in to give up. (You may see the message "Enough already".) You can avoid that by commenting out (with "*"s) the defport stanza and by defining a stanza for your tty something like this: /dev/tty0: herald = "\nrisc001 login: " 7. You may need to change the flags in /etc/security/passwd. If you changed a password from the root login, the flags entry in the stanza for the user will contain the following: flags = ADMCHG Change it to: flags = Otherwise, when the remote uucico logs in, it will be prompted to enter a new password, which it cannot do. Hence the login will fail. Part Three: Activate the cron Daemon 1. Log in as uucpadm 2. Run the following command to read the current crontab for uucp into a temporary file: crontab -l > /tmp/cron.uucp 3. Next, edit /tmp/cron.uucp and uncomment the entries (take out the "#"s at the beginning of the lines). The entries should look similar to: UUCP (BNU) Helpful Information 5 10/11/95 ---------------------------------------------------------------------- 20,50 * * * * /bin/bsh -c "/usr/lib/uucp/uudemon.poll > /dev/null" 25,55 * * * * /bin/bsh -c "/usr/lib/uucp/uudemon.hour > /dev/null" 45 23 * * * /bin/bsh -c "/usr/lib/uucp/uudemon.cleanu > /dev/null" 48 8,12,16 * * * /bin/bsh -c "/usr/lib/uucp/uudemon.admin > /dev/null" ---------------------------------------------------------------------- Entries can be changed to suit your needs. 4. Then read the edited version into uucp's crontab with this command: crontab /tmp/cron.uucp 5. Check to make sure your changes took effect by running this command: crontab -l Part Four: Set Up the BNU Configuration Files You can use the /usr/lib/uucp/uucpadm command to initially set up the files. Then edit them to suit your exact needs. UUCP (BNU) Helpful Information 6 10/11/95 PHASES OF UUCP COMMUNICATION UUCP error messages can be linked to specific phases in the conversation flow. Use the following diagram and the error descriptions in the following section to help you diagnose your UUCP problems. Some of the following messages may not be sent by the AIX version of UUCP (BNU), but they are including in case another UUCP version is in use on a dif- ferent system platform. U U C P or U U X | | uucico | | PHASE 1: System Verification | | PHASE 2: Device Selection | | PHASE 3: Link Establishment | | PHASE 4: Login Sequence | | PHASE 5: Data Transfer and File Execution | | PHASE 6: Hangup UUCP (BNU) Helpful Information 7 10/11/95 STATUS MESSAGES AND WHAT TO DO ABOUT THEM The following messages are linked to specific phases in the conversation flow. See the diagram in the preceding section. Phase 1 -- System Verification o "Assert Error" The RS/6000 is having problems. Check the error report for possible causes. (To check the report, type "errpt -a | pg".) o "System not in Systems" If you supply a remote system name that is not found in the Systems file, this status message is returned. UUCP will terminate. Use the "uuname" command to check the system name again. o "Wrong time to call" The Systems file has restrictions on times to allow out- going calls. UUCP will keep trying until the time is right. Check the Systems file. o "Callback required" The network has restricted usage for either security or economic reasons and access is denied at this time. o "Cannot call " or " No call" UUCP recently tried to call the remote system and failed. It will not immediately try again. Phase 2 -- Device Selection o "Dialer Script Failed" The Dialers file script did not complete successfully. o "No device available " or " Can't access device" The modem or the outgoing phone line from your system is busy. Check for an error in the device entry of the Systems file. Also, check the Devices and Dialers files to be sure logical devices have physical devices associ- ated with them. Is the device in use by some other program? Check the /etc/locks directory for a lock on the port. o "Dial Failed " or " Failed (call to system)" These messages appear when your system dials another system successfully but the other system does not answer. It may also indicate a problem in the Devices file. UUCP (BNU) Helpful Information 8 10/11/95 Execute the command "uucico -r1 -x6 -s". It could be that UUCP is expecting some string that it is not receiving. Make the connection by hand to find out what needs to be incorporated into the Systems file entry to satisfy the request. Please keep "timing" in mind; perhaps some delays are needed. o "OK " or " Auto Dial" These messages are just for your information; they do not indicate a problem. Phase 3 -- Link Establishment o "Handshake Failed (LCK)" The device is being used by someone else; the process could not create the LCK file. Sometimes LCK files must be manually removed by the administrator. After a number of retries, see your system administrator. o "Login Failed " or " Timeout" Login failed due to a bad connection or slow machine. Similarly, you might see "Timeout", which means the remote system did not respond within a set period of time. o "Succeeded (Call to System) " or " BNU (continued)" These messages are just for your information; they do not indicate a problem. Phase 4 -- Login Sequence o "Startup Failed " or " Remote reject after login" After login, uucico is started on the remote system. If there is a problem in initiating a conversation between the two systems, these messages are created. You may also have logged in using the wrong UUCP account. Contact the site administrator. o "Wrong machine name" Either you called the wrong machine or the machine's name was changed. o "Bad login/machine combination" The login for the remote system failed. The problem could be a wrong phone number, login/password, or chat script. o "Remote has a LCK file for me" The remote was trying to call at the same time, so your request has failed temporarily. o "OK " or " Talking" UUCP (BNU) Helpful Information 9 10/11/95 These messages are just for your information; they do not indicate a problem. o The login or password prompt is in all capital letters. Problem: The modem may be in "echo" mode (which is "E1" on Hayes compatibles). This causes the modem to echo back or send a "RING" to your system when an incoming call is received. When getty receives the string, it changes the "login:" or "password:" into all capital letters. Solution: Change the "echo" mode to "off". (Use "ATE0" for Hayes compatible modems.) Keep in mind that once this change is made you should use "ATE1" in the Dialers file chat script. If you do not, you will not get the expected "OK" back from the modem. o Remote port is set for "delay" or "getty -r" and chat scripts expect keyboard input. Problem: Ports set for "delay" are expecting one or more carriage returns before proceeding with the login. Solution: Try beginning the chat script in the Systems file on the dialing system with the following (the first "..." represents the items on the line before the chat script and the second "..." represents the rest of the chat script): ... "" \r\d\r\d\r\d\r in:--in: ... (Interpreted, the above reads: expect nothing, send return, delay, return, delay, return, delay, return.) Phase 5 -- Data Transfer and File Execution o "Alarm" "uucico" is having trouble with the connection. Either the connection is bad or "xon/xoff" is set to yes on the modem. o "Remote access to path/file denied " or " Copy (failed)" These messages indicate a permission problem; check the file and path permissions. o "Bad read" The remote system ran out of space (probably in the spool area). o "Conversation failed" The modem is powered off, a cable is pulled or loose, the system crashed, or lightning struck and thus dis- rupted the connection or hardware. o "Requested " or " Copy (succeeded)" UUCP (BNU) Helpful Information 10 10/11/95 These messages are just for your information; they do not indicate a problem. Phase 6 -- Hangup o "OK (Conversation Complete)" The remote computer can deny the hangup request and reverse the roles (meaning the remote has work for the local system to do). Once both local and remote uucico programs agree that no more work exists, they hang up. o "Conversation succeeded" These messages are just for your information; they do not indicate a problem. UUCP (BNU) Helpful Information 11 10/11/95 PARAMETERS FOR CHAT SCRIPTS A chat script is a login sequence -- a list of expect-send sequences that a modem uses to establish a link with another modem. Chat scripts reside in the Systems file. The following table is a list of parameters which can be edited into the chat scripts in the Systems file. The parameters listed in this table are the only parameters recognized for chat scripts in AIX. +------------+---------------------------------------------+ | PARAMETER | DESCRIPTION | +------------+---------------------------------------------+ | "" | Null string | +------------+---------------------------------------------+ | \N | Null character | +------------+---------------------------------------------+ | \b | Backspace character | +------------+---------------------------------------------+ | \c | Suppress carriage return which is sent at | | | end of send string | +------------+---------------------------------------------+ | \d | Delay 2 seconds | +------------+---------------------------------------------+ | \p | Pause for approximately 1/4 second | +------------+---------------------------------------------+ | \K | Send a break | +------------+---------------------------------------------+ | \n | Newline character | +------------+---------------------------------------------+ | \r | Carriage return character | +------------+---------------------------------------------+ | \s | Space character | +------------+---------------------------------------------+ | \t | Tab character | +------------+---------------------------------------------+ | \\ | Backslash character | +------------+---------------------------------------------+ | BREAK | Generate break signal (approx. 1/4 second) | +------------+---------------------------------------------+ | EOT | Send Control-D newline Control-D newline | +------------+---------------------------------------------+ | \ddd | Send octal character | +------------+---------------------------------------------+ | \E | Turn echo check on | +------------+---------------------------------------------+ | \e | Turn echo check off | +------------+---------------------------------------------+ | WAIT=n | Change to "n" seconds the timeout while | | | waiting for the next expect string (default | | | is 45 sec) | +------------+---------------------------------------------+ UUCP (BNU) Helpful Information 12 10/11/95 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (uucp.total.zap, 4FAX# 1909) UUCP (BNU) Helpful Information 13