This document is an aid to setting up UUCP (BNU) on your RS/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:
The setup files for AIX UUCP are
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 frequently 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 <site name>, 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
The following diagram shows an example of the Systems, Devices, and Dialers files and shows how they relate to each other.
Systems file: <System_name> 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)
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 DannyThe cu command connects to another system, and the "-d" gives extra debug information.
This section contains steps for setting up UUCP on your system. It is divided into the following parts:
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.
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.
The suggested entry in /etc/passwd is:
uucpadm:!:5:5::/usr/lib/uucp:/bin/ksh
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 security 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.
uucp:!:5:uucp,uucpadm,nuucp,Umicrtk,Uicus,Urisctakr
You may want to add any logins to group uucp that will be using modems to dial out with programs other than cu.
passwd uucpadm
/dev/tty0: herald = " risc001 login: "
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.
crontab -l > /tmp/cron.uucp
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.
crontab /tmp/cron.uucp
crontab -l
You can use the /usr/lib/uucp/uucpadm command to initially set up the files. Then edit them to suit your exact needs.
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 different 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
The following messages are linked to specific phases in the conversation flow. See the diagram in the preceding section.
The RS/6000 is having problems. Check the error report for possible causes. (To check the report, type errpt -a | pg.)
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.
The Systems file has restrictions on times to allow outgoing calls. UUCP will keep trying until the time is right. Check the Systems file.
The network has restricted usage for either security or economic reasons and access is denied at this time.
UUCP recently tried to call the remote system and failed. It will not immediately try again.
The Dialers file script did not complete successfully.
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 associated with them. Is the device in use by some other program? Check the /etc/locks directory for a lock on the port.
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.
Execute the command uucico -r1 -x6 -s<system name>. 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.
These messages are just for your information; they do not indicate a problem.
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.
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.
These messages are just for your information; they do not indicate a problem.
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.
Either you called the wrong machine or the machine's name was changed.
The login for the remote system failed. The problem could be a wrong phone number, login/password, or chat script.
The remote was trying to call at the same time, so your request has failed temporarily.
These messages are just for your information; they do not indicate a problem.
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.
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.)
uucico is having trouble with the connection. Either the connection is bad or "xon/xoff" is set to yes on the modem.
These messages indicate a permission problem; check the file and path permissions.
The remote system ran out of space (probably in the spool area).
The modem is powered off, a cable is pulled or loose, the system crashed, or lightning struck and thus disrupted the connection or hardware.
These messages are just for your information; they do not indicate a problem.
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.
These messages are just for your information; they do not indicate a problem.
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) |