-->
Previous | Table of Contents | Next |
The first line in the preceding extract is a comment line. Most system administrators like to put a comment line in to identify each system. The next lines identify the different aspects of the remote system, including its name (arthur), times at which it can be called (Any in this case, meaning no restrictions), the telephone number (including any area code or special digits that have to be dialed), the serial port to be used for the connection (in this case, com1), the speed at which to connect (9600 baud), and the chat script or login process. In this case, the chat script tells UUCP to wait until it sees the string login:, then to send merlin, wait for the prompt password:, and then send secret1.
Most login scripts require a login and password, and they must be placed in the configuration file because UUCP doesnt allow interactive sessions. This can be a bit of a problem because it allows other users on your system to see the login password for the remote machine, but because it can only be used by UUCP, this is not a major concern. Also, the file permissions on the UUCP configuration files can be set to prevent any system users (other than root) from looking into the file.
Tip:
Not all remote sites need a password for entry through UUCP. For example, some public archices let you log in and retrieve files using the uucp login with no password. Some sites use readily available passwords, such as uucp.
The port name used in the /usr/lib/uucp/sys entry does not have to match a device name on the Linux system because another file is used to match the entry to a physical device. This file is /usr/lib/uucp/port, and it requires an entry similar to this for a 9600 baud modem:
# com1 device port port com1 type modem device /dev/cua0 speed 9600 dialer Hayes
In the /usr/lib/uucp/port file, the name of the port used in the /usr/lib/uucp/sys file is identified on the first line. The type of connection to be used (usually modem) is on the next. The actual Linux device that corresponds to the port name is specified as a device driver (for many Linux systems this can be /dev/modem which is linked to the serial port device driver).
The modem connection speed comes next and shows the maximum speed at which the modem can be used. Finally, the name of a dialer is entered. This is a throwback to the days when modems couldnt dial themselves but used another device (called a dialer) to make the connection.
The dialer entry in the /usr/lib/uucp/port file is then matched to an entry in the file /usr/lib/uucp/dial which tells the modem how to dial the phone. Heres a simple entry:
# Hayes modem dialer Hayes chat ATZ OK ATDT\T CONNECT
This shows the script that the system uses to communicate to the Hayes modem. In this case, the \T in the command line is replaced with the telephone number to be called. Some Linux systems simplify the use of the /usr/lib/uucp/port and /usr/lib/uucp/dial files into one single entry in the /usr/lib/uucp/sys file, which names the modem file directly.
The remote end of the connection (in this case, the system arthur) must have corresponding entries for merlin. The files will be similar with only name, telephone number, and (possibly) device name and chat script changes. Until both ends are configured properly, you cant get a connection between the two machines.
Some Linux systems with Taylor UUCP have a utility called uuchck that verifies the syntax in the UUCP configuration files and printout summary information. If you dont have the uuchck utility, it can be downloaded from many FTP and BBS sites. Check Appendix A, Linux FTP Sites and Newsgroups, for some of the possible sites.
By default, Taylor UUCP allows a remote system to execute only a limited number of commands when they log into your system. Typically, the remote is only allowed to execute rmail and rnews, to transfer mail and news respectively. If you want to allow extra programs to be executed, add a line to the /usr/lib/uucp/sys file that includes all the commands the remote system can execute. For example, the following entry specifies that the system chatton can execute any of the four commands given after the commands keyword:
system chatton . commands rmail rnews rsmtp rdataupdate
Note that all four commands must be in the usual search path used by the UUCP utilities (actually by uuxqt).
If you intend to transfer files between two machines, you must also modify the configuration files. When a remote system sends a file to your machine, the files should usually be stored in the directory /usr/spool/uucppublic (some systems use /var/spool/uucppublic) as a safety precaution. You dont want to allow a remote system to write files anywhere on your file system or they could overwrite critical system files. The convention for most UUCP systems is to use either /usr/spool/uucppublic or /usr/spool/uucp/system (in which system is the remote systems name) as the transfer directories.
You can specify transfer and receive directories in the /usr/lib/uucp/sys file. For example, the following entry for the remote system chatton has been modified to include specific directories for file transfers:
system chatton local-send ~/send local-receive ~/receive
In this configuration, the users on your local machine can send any file that is in the send directory under the uucp directory (~/send, which means that any file to be sent to a remote system must be transferred there first), and any file incoming from a remote system is stored in the receive directory under the uucp directory. If you want to allow transfers from a users home directory, you can specify the /usr directory as a starting point. Multiple entries are separated by spaces, so the following entry allows transfers from the send directory under the uucp directory or from any directory under/usr:
local-send ~/send /usr
Previous | Table of Contents | Next |