Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
39.  Administering UUCP Starting UUCP uudemon.poll Shell Script  Previous   Contents   Next 
   
 

uudemon.hour Shell Script

The default uudemon.hour shell script does the following:

  • Calls the uusched program to search the spool directories for work files (C.) that have not been processed. The script then schedules these files for transfer to a remote machine.

  • Calls the uuxqt daemon to search the spool directories for execute files (X.) that have been transferred to your computer and were not processed at the time they were transferred.

By default, uudemon.hour runs twice an hour. You might want it to run more often if you expect high failure rates of calls to remote machines.

uudemon.admin Shell Script

The default uudemon.admin shell script does the following:

  • Runs the uustat command with p and q options. The q reports on the status of work files (C.), data files (D.), and execute files (X.) that are queued. The p prints process information for networking processes that are listed in the lock files (/var/spool/locks).

  • Sends resulting status information to the uucp administrative login by using mail.

uudemon.cleanup Shell Script

The default uudemon.cleanup shell script does the following:

  • Collects log files for individual machines from the /var/uucp/.Log directory, merges them, and places them in the /var/uucp/.Old directory with other old log information

  • Removes work files (C.) seven days old or older, data files (D.) seven days old or older, and execute files (X.) two days old or older from the spool files

  • Returns mail that cannot be delivered to the sender

  • Mails a summary of the status information that was gathered during the current day to the UUCP administrative login (uucp)

Running UUCP Over TCP/IP

To run UUCP on a TCP/IP network, you need to make a few modifications, as described in this section.

How to Activate UUCP for TCP/IP

  1. Edit the /etc/inetd.conf file and ensure that the following entry is not preceded by a comment mark (#):

    uucp stream tcp nowait root /usr/sbin/in.uucpd in.uucpd 

  2. Edit the /etc/uucp/Systems file to ensure that the entries have the following fields :

    System-Name Time TCP Port networkname Standard-Login-Chat

    A typical entry would resemble the following:

    rochester Any TCP - ur-seneca login: Umachine password: xxx

    Notice that the networkname field permits you to specify explicitly the TCP/IP host name. This is important for some sites. In the previous example, the site has the UUCP node name rochester, which is different from its TCP/IP host name ur-seneca. Moreover, a completely different machine could easily run UUCP and have the TCP/IP host name of rochester.

    The Port field in the Systems file should have the entry -. This syntax is equivalent to listing the entry as uucp. In almost every situation, the networkname is the same as the system name, and the Port field is -, which says to use the standard uucp port from the services database. The in.uucpd daemon expects the remote machine to send its login and password for authentication, and in.uucpd prompts for them, much as getty and login do.

  3. Edit the /etc/inet/services file to set up a port for UUCP:

    uucp    540/tcp    uucpd        # uucp daemon

    You should not have to change the entry. However, if your machine runs NIS or NIS+ as its name service, you should change the /etc/nsswitch.conf entry for /etc/services to check files first, then check nis or nisplus.

UUCP Security and Maintenance

After you have set up UUCP, maintenance is straightforward. This section explains ongoing UUCP tasks that relate to security, maintenance, and troubleshooting.

Setting Up UUCP Security

The default /etc/uucp/Permissions file provides the maximum amount of security for your UUCP links. The default Permissions file contains no entries.

You can set additional parameters for each remote machine to define the following:

  • Ways the remote machine can receive files from your machine

  • Directories for which the remote machine has read and write permission

  • Commands the remote machine can use for remote execution

A typical Permissions entry follows:

MACHINE=datsun LOGNAME=Udatsun VALIDATE=datsun 
COMMANDS=rmail REQUEST=yes SENDFILES=yes

This entry allows files to be sent and received to and from the "normal" UUCP directories, not from anywhere in the system. The entry also causes the UUCP user name to be validated at login time.

Regular UUCP Maintenance

UUCP does not require much maintenance. Except for ensuring that the crontab file is in place, as described in the section "How to Start UUCP", your concern should be the growth of mail files and the public directory.

Email for UUCP

All email messages that are generated by the UUCP programs and scripts are sent to the user ID uucp. If you do not log in frequently as that user, you might not realize that mail is accumulating (and consuming disk space). To solve this problem, create an alias in /etc/mail/aliases and redirect that email either to root or to yourself and others responsible for maintaining UUCP. Remember to run the newaliases command after modifying the aliases file.

UUCP Public Directory

The directory /var/spool/uucppublic is the one place in every system to which UUCP by default is able to copy files. Every user has permission to change to /var/spool/uucppublic and read and write files in it. However, its sticky bit is set, so its mode is 01777. As a result, users cannot remove files that have been copied to it and that belong to uucp. Only you, as UUCP administrator logged in as root or uucp, can remove files from this directory. To prevent the uncontrolled accumulation of files in this directory, you should ensure that you remove files from it periodically.

If this maintenance is inconvenient for users, encourage them to use uuto and uupick rather than removing the sticky bit, which is set for security reasons. See the uuto(1C) man page for instructions for using uuto and uupick. You can also restrict the mode of the directory to only one group of people. If you do not want to run the risk of someone filling your disk, you can even deny UUCP access to it.

 
 
 
  Previous   Contents   Next