<chapter id="uucptasks-1"><title>Administering
UUCP (Tasks)</title><highlights><itemizedlist><para>This chapter explains how to
start UUCP  operations after you have
modified the database file that is
relevant to your machines. The chapter
contains procedures and troubleshooting
information for setting up and maintaining
UUCP on machines that run the Solaris
OS, such as the following:</para><listitem><para><olink targetptr="uucptasks-31" remap="internal">UUCP Administration
(Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="uucptasks-6" remap="internal">Adding UUCP
Logins</olink></para>
</listitem><listitem><para><olink targetptr="uucptasks-10a" remap="internal">Starting
UUCP</olink></para>
</listitem><listitem><para><olink targetptr="uucptasks-12" remap="internal">Running UUCP
Over TCP/IP</olink></para>
</listitem><listitem><para><olink targetptr="uucptasks-16" remap="internal">UUCP Security
and Maintenance</olink></para>
</listitem><listitem><para><olink targetptr="uucptasks-21" remap="internal">Troubleshooting
UUCP</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="uucptasks-31"><title>UUCP
Administration (Task Map)</title><para>The following table provides
pointers to the procedures that are
covered in this chapter, in addition
to a short description of each procedure.</para><table frame="all" pgwide="1" id="uucptasks-tbl-32"><title>Task
Map for UUCP Administration</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colname="colspec3" colwidth="110.00*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Allow remote machines to have
access to your system</para>
</entry><entry><para>Edit the <filename>/etc/passwd</filename> file
to add entries to identify the machines
that are permitted to access your
system.</para>
</entry><entry><para><olink targetptr="uucptasks-6a" remap="internal">How
to Add UUCP Logins</olink></para>
</entry>
</row><row><entry><para>Start UUCP</para>
</entry><entry><para>Use the supplied shell scripts
to start UUCP.</para>
</entry><entry><para><olink targetptr="uucptasks-11a" remap="internal">How
to Start UUCP</olink></para>
</entry>
</row><row><entry><para>Enable UUCP to work with TCP/IP</para>
</entry><entry><para>Edit <filename>/etc/inetd.conf</filename> and <filename>/etc/uucp/Systems</filename> files
to activate UUCP for TCP/IP.</para>
</entry><entry><para><olink targetptr="uucptasks-13a" remap="internal">How
to Activate UUCP for TCP/IP</olink></para>
</entry>
</row><row><entry><para>Troubleshoot some common UUCP
problems</para>
</entry><entry><para>Use diagnostic steps to check
for faulty modems or ACUs.</para>
</entry><entry><para><olink targetptr="uucptasks-22" remap="internal">How
to Check for Faulty Modems or ACUs</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Use diagnostic steps to debug
transmissions. </para>
</entry><entry><para><olink targetptr="uucptasks-24" remap="internal">How
to Debug Transmissions</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="uucptasks-6"><title>Adding
UUCP Logins</title><para>For incoming UUCP (<command>uucico</command>) requests from remote machines
to be handled properly, each machine
has to have a login on your system.
     </para><task id="uucptasks-6a"><title>How
to Add UUCP Logins</title><tasksummary><para>To allow a remote machine to
access your system, you need to add
an entry to the <filename>/etc/passwd</filename> file
as follows:</para>
</tasksummary><procedure>&rolestepA;<step id="uucptasks-step-18"><para>Edit
the <filename>/etc/passwd</filename> file
and add the entry to identify the
machine that is permitted to access
your system.</para><para>A typical entry that you
might put into the <filename>/etc/passwd</filename> file
for a remote machine that is permitted
to access your system with a UUCP
connection would be as follows:  </para><screen>Ugobi:*:5:5:gobi:/var/spool/uucppublic:/usr/lib/uucp/uucico </screen><para>By convention, the login name
of a remote machine is the machine
name preceded by the uppercase letter <literal>U</literal>. Note that the name should
not exceed eight characters. Otherwise,
you might have to truncate or abbreviate
the name. </para><para>The previous
entry shows that a login request by <literal>Ugobi</literal> is answered by <command>/usr/lib/uucp/uucico</command>. The home directory is <filename>/var/spool/uucppublic</filename>.
The password is obtained from the <filename>/etc/shadow</filename> file. You must
coordinate the password and the login
name with the UUCP administrator of
the remote machine. The remote administrator
must then add an appropriate entry,
with login name and unencrypted password,
in the remote machine's <filename>Systems</filename> file. </para>
</step><step id="uucptasks-step-9"><para>Coordinate
your machine name with the UUCP administrators
on other systems.</para><para>Similarly, you must coordinate
your machine's name and password with
the UUCP administrators of all machines
that you want to reach through UUCP.
     </para>
</step>
</procedure>
</task>
</sect1><sect1 id="uucptasks-10a"><title>Starting
UUCP</title><itemizedlist><para>UUCP includes four shell
scripts that poll remote machines,
reschedule transmissions, and clean
up old log files and unsuccessful
transmissions. The scripts are as
follows:      </para><listitem><para><filename>uudemon.poll</filename></para>
</listitem><listitem><para><filename>uudemon.hour</filename></para>
</listitem><listitem><para><filename>uudemon.admin</filename></para>
</listitem><listitem><para><filename>uudemon.cleanup</filename></para>
</listitem>
</itemizedlist><para>These shell scripts should
execute regularly to ensure that UUCP
runs smoothly. The <filename>crontab</filename> file
to run the scripts is automatically
created in <filename>/usr/lib/uucp/uudemon.crontab</filename> as part of the Solaris
installation process, if you select
the full installation. Otherwise,
the file is created when you install
the UUCP package.   </para><para>You can also run the UUCP
shell scripts manually. The following
is the prototype <filename>uudemon.crontab</filename> file that you can tailor
for a particular machine: </para><screen>#
#ident  "@(#)uudemon.crontab    1.5     97/12/09 SMI"
#
# This crontab is provided as a sample. For systems
# running UUCP edit the time schedule to suit, uncomment 
# the following lines, and use crontab(1) to activate the
# new schedule.
#
#48 8,12,16 * * * /usr/lib/uucp/uudemon.admin
#20 3 * * * /usr/lib/uucp/uudemon.cleanup
#0 * * * * /usr/lib/uucp/uudemon.poll
#11,41 * * * * /usr/lib/uucp/uudemon.hour</screen><note><para>By default, UUCP operations
are disabled. To enable UUCP, edit
the time schedule and uncomment the
appropriate lines in the <filename>uudemon.crontab</filename> file.</para>
</note><task id="uucptasks-11a"><title>How
to Start UUCP</title><tasksummary><para>To activate the <filename>uudemon.crontab</filename> file, do the following:</para>
</tasksummary><procedure>&rolestepA;<step id="uucptasks-step-13a"><para>Edit
the <filename>/usr/lib/uucp/uudemon.crontab</filename> file and change entries
as required.</para>
</step><step id="uucptasks-step-14a"><para>Activate
the <filename>uudemon.crontab</filename> file
by issuing the following command:</para><screen><userinput>crontab &lt; /usr/lib/uucp/uudemon.crontab</userinput></screen>
</step>
</procedure>
</task><sect2 id="uucptasks-35"><title><filename>uudemon.poll</filename> Shell Script</title><para>The default <filename>uudemon.poll</filename> shell script reads the <filename>/etc/uucp/Poll</filename> file once
an hour. If any machines in the <filename>Poll</filename> file are scheduled
to be polled, a work file (<filename>C.</filename><replaceable>sysnxxxx</replaceable>) is placed
in the <filename>/var/spool/uucp/</filename><replaceable>nodename</replaceable> directory. <replaceable>nodename</replaceable> represents
the UUCP node name of the machine.
 </para><para>The shell script is scheduled
to run once an hour, before <filename>uudemon.hour</filename>, so that the work files
are in place when <filename>uudemon.hour</filename> is
called. </para>
</sect2><sect2 id="uucptasks-36"><title><filename>uudemon.hour</filename> Shell Script</title><itemizedlist><para>The default <filename>uudemon.hour</filename> shell script does the
following:  </para><listitem><para>Calls the <command>uusched</command> program
to search the spool directories for
work files (<filename>C.</filename>)
that have not been processed. The
script then schedules these files
for transfer to a remote machine. </para>
</listitem><listitem><para>Calls the <command>uuxqt</command> daemon
to search the spool directories for
execute files (<filename>X.</filename>)
that have been transferred to your
computer and were not processed when
they were transferred. </para>
</listitem>
</itemizedlist><para>By default, <filename>uudemon.hour</filename> runs
twice an hour. You might want <filename>uudemon.hour</filename> to run more often if you
expect high failure rates of calls
to remote machines.</para>
</sect2><sect2 id="uucptasks-37"><title><filename>uudemon.admin</filename> Shell Script</title><itemizedlist><para>The default <filename>uudemon.admin</filename> shell script does the
following:  </para><listitem><para>Runs the <command>uustat</command> command
with <option role="nodash">p</option> and <option role="nodash">q</option> options.
The <option role="nodash">q</option> reports
on the status of work files (<filename>C.</filename>), data files (<filename>D.</filename>),
and execute files (<filename>X.</filename>)
that are queued. The <option role="nodash">p</option> prints process
information for networking processes
that are listed in the lock files
(<filename>/var/spool/locks</filename>). </para>
</listitem><listitem><para>Sends resulting status
information to the <command>uucp</command> administrative
login by using <command>mail</command>.
  </para>
</listitem>
</itemizedlist>
</sect2><sect2 id="uucptasks-38"><title><filename>uudemon.cleanup</filename> Shell Script</title><itemizedlist><para>The default <filename>uudemon.cleanup</filename> shell script does the
following:   </para><listitem><para>Collects log files for
individual machines from the <filename>/var/uucp/.Log</filename> directory, merges these
files, and places the files in the <filename>/var/uucp/.Old</filename> directory
with other old log information  </para>
</listitem><listitem><para>Removes work files (<filename>C.</filename>) seven days old or older,
data files (<filename>D.</filename>)
seven days old or older, and execute
files (<filename>X.</filename>) two
days old or older from the spool files</para>
</listitem><listitem><para>Returns mail that
cannot be delivered to the sender </para>
</listitem><listitem><para>Mails a summary of the
status information that was gathered
during the current day to the UUCP
administrative login (<filename>uucp</filename>) </para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="uucptasks-12"><title>Running
UUCP Over TCP/IP</title><para>To run UUCP on a TCP/IP
network, you need to make a few modifications,
as described in this section.   </para><task id="uucptasks-13a"><title>How
to Activate UUCP for TCP/IP</title><procedure>&rolestepA;<step id="uucptasks-step-21"><para>Edit the <filename>/etc/uucp/Systems</filename> file to ensure that the
entries have the following fields:</para><para><replaceable>System-Name Time
TCP Port networkname Standard-Login-Chat</replaceable></para><para>A typical entry would resemble
the following: </para><screen>rochester Any TCP - ur-seneca login: Umachine password: xxx</screen><para>Notice that the <emphasis>networkname</emphasis> field permits you to specify
explicitly the TCP/IP host name. This
capability is important for some sites.
In the previous example, the site
has the UUCP node name <literal>rochester</literal>, which is different from
its TCP/IP host name <literal>ur-seneca</literal>.
Moreover, a completely different machine
could easily run UUCP and have the
TCP/IP host name of <literal>rochester</literal>.</para><para>The Port field in the <filename>Systems</filename> file should have
the entry <literal>-</literal>. This
syntax is equivalent to listing the
entry as <literal>uucp</literal>.
In almost every situation, the <emphasis>networkname</emphasis> is the same
as the system name, and the Port field
is <literal>-</literal>, which says
to use the standard uucp port from
the <filename>services</filename> database.
The <command>in.uucpd</command> daemon
expects the remote machine to send
its login and password for authentication,
and <command>in.uucpd</command> prompts
for them, much as <command>getty</command> and <command>login</command> do.  </para>
</step><step id="uucptasks-step-22"><para>Edit the <filename>/etc/inet/services</filename> file to set up a port
for UUCP:   </para><screen>uucp    540/tcp    uucpd        # uucp daemon</screen><para>You should not have to
change the entry. However, if your
machine runs NIS or NIS+ as its name
service, you should change the <literal>/etc/nsswitch.conf</literal> entry for <filename>/etc/services</filename> to check <filename>files</filename> first,
then check <filename>nis</filename> or <filename>nisplus</filename>.</para>
</step><step><para>Verify that UUCP is enabled.</para><screen># <userinput>svcs network/uucp</userinput></screen><para>The UUCP service is managed
by the Service Management Facility.
To query the status of this service,
you can use the <command>svcs</command> command.
For an overview of the Service Management
Facility, refer to <olink targetdoc="sysadv1" targetptr="hbrunlevels-25516" remap="external">Chapter 14, <citetitle remap="chapter">Managing Services (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step performance="optional"><para>If
necessary, enable UUCP by typing the
following:</para><screen># <userinput>inetadm -e network/uucp</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="uucptasks-16"><title>UUCP
Security and Maintenance</title><para>After you have set up UUCP,
maintenance is straightforward. This
section explains ongoing UUCP tasks
that relate to security, maintenance,
and troubleshooting.</para><sect2 id="uucptasks-17a"><title>Setting
Up UUCP Security</title><para>The default <filename>/etc/uucp/Permissions</filename> file provides the maximum
amount of security for your UUCP links.
The default <filename>Permissions</filename> file
contains no entries.</para><itemizedlist><para>You can set additional parameters
for each remote machine to define
the following: </para><listitem><para>Ways that the remote
machine can receive files from your
machine </para>
</listitem><listitem><para>Directories for which
the remote machine has read and write
permission </para>
</listitem><listitem><para>Commands that the
remote machine can use for remote
execution </para>
</listitem>
</itemizedlist><para>A typical <filename>Permissions</filename> entry
follows: </para><screen>MACHINE=datsun LOGNAME=Udatsun VALIDATE=datsun 
COMMANDS=rmail REQUEST=yes SENDFILES=yes</screen><para>This entry allows files to be
sent and be received to and from the &ldquo;normal&rdquo;
UUCP directories, not from anywhere
in the system. The entry also causes
the UUCP user name to be validated
at login time.</para>
</sect2><sect2 id="uucptasks-18"><title>Regular
UUCP Maintenance</title><para>UUCP does not require
much maintenance. However, you must
ensure that the <filename>crontab</filename> file
is in place, as described in the section <olink targetptr="uucptasks-11a" remap="internal">How to Start
UUCP</olink>. Your concern should
be the growth of mail files and the
public directory.  </para><sect3 id="uucptasks-19"><title>Email
for UUCP</title><para>All email messages that
are generated by the UUCP programs
and scripts are sent to the user ID <literal>uucp</literal>. 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 <filename>/etc/mail/aliases</filename> and redirect
that email either to <filename>root</filename> or
to yourself and others who are responsible
for maintaining UUCP. Remember to
run the <command>newaliases</command> command
after modifying the <filename>aliases</filename> file.
     </para>
</sect3><sect3 id="uucptasks-20"><title>UUCP
Public Directory</title><para>The directory <filename>/var/spool/uucppublic</filename> is the one place in every
system to which UUCP by default is
able to copy files. Every user has
permission to change to <filename>/var/spool/uucppublic</filename> and read and write files
in the directory. However, the directory's
sticky bit is set, so the directory's
mode is 01777. As a result, users
cannot remove files that have been
copied to it and that belong to <command>uucp</command>. Only you, as UUCP
administrator logged in as <filename>root</filename> or <command>uucp</command>,
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.          </para><para>If this maintenance is
inconvenient for users, encourage
them to use <command>uuto</command> and <command>uupick</command> rather than removing
the sticky bit, which is set for security
reasons. See the <olink targetdoc="refman1" targetptr="uuto-1c" remap="external"><citerefentry><refentrytitle>uuto</refentrytitle><manvolnum>1C</manvolnum></citerefentry></olink> man
page for instructions for using <command>uuto</command> and <command>uupick</command>.
You can also restrict the mode of
the directory to only one group of
people. If you do not want to risk
someone filling your disk, you can
even deny UUCP access to it.      </para>
</sect3>
</sect2>
</sect1><sect1 id="uucptasks-21"><title>Troubleshooting
UUCP</title><para>These procedures describe
how to solve common UUCP problems.
 </para><task id="uucptasks-22"><title>How
to Check for Faulty Modems or ACUs</title><tasksummary><para>You can check if the modems
or other ACUs are not working properly
in several ways.</para>
</tasksummary><procedure>&rolestepA;<step id="uucptasks-step-29a"><para>Obtain counts and reasons
for contact failure by running the
following command:   </para><screen># <command>uustat</command> <option>q</option></screen>
</step><step id="uucptasks-step-25a"><para>Call
over a particular line and print debugging
information on the attempt.</para><para>The line must be defined
as <literal>direct</literal> in the <filename>/etc/uucp/Devices</filename> file.
You must add a telephone number to
the end of the command line if the
line is connected to an autodialer
or the device must be set up as <literal>direct</literal>. Type:   </para><screen># <command>cu</command> <option>d</option> <option>l</option><replaceable>line</replaceable></screen><para><replaceable>line</replaceable> is <literal>/dev/cua/a</literal>. </para>
</step>
</procedure>
</task><task id="uucptasks-24"><title>How
to Debug Transmissions</title><tasksummary><para>If you cannot contact
a particular machine, you can check
communications to that machine with <command>Uutry</command> and <command>uucp</command>.
    </para>
</tasksummary><procedure>&rolestepA;<step id="uucptasks-step-26"><para>Try to make contact:  </para><screen># <userinput>/usr/lib/uucp/Uutry -r</userinput> <replaceable>machine</replaceable></screen><itemizedlist><para>Replace <replaceable>machine</replaceable> with
the host name of the machine you are
unable to contact. This command does
the following: </para><listitem><para>Starts the transfer
daemon (<command>uucico</command>)
with debugging. You can get more debugging
information if you are <filename>root</filename>.</para>
</listitem><listitem><para>Directs the debugging
output to <filename>/tmp/</filename><replaceable>machine</replaceable>.</para>
</listitem><listitem><para>Prints the debugging
output to your terminal by issuing
the following command:</para><screen># <command>tail</command> <option>f</option></screen><para>Press Control-C to end output.
You can copy the output from <filename>/tmp/</filename><replaceable>machine</replaceable> if
you want to save the output.</para>
</listitem>
</itemizedlist>
</step><step id="uucptasks-step-30"><para>If <command>Uutry</command> does
not isolate the problem, try to queue
a job:   </para><screen># <userinput>uucp -r</userinput> <replaceable>file</replaceable> <replaceable>machine</replaceable><userinput>\!</userinput><replaceable>/dir/file</replaceable></screen><variablelist><varlistentry><term><replaceable>file</replaceable></term><listitem><para>Use the name of the
file that you want to transfer.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>machine</replaceable></term><listitem><para>Use the name of the
machine that you want to copy to.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/dir/file</replaceable></term><listitem><para>Specify the location
of the file for the other machine.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="uucptasks-step-31"><para>Issue
the following command:</para><screen># <command>Uutry</command></screen><para>If you still cannot solve the
problem, you might need to call your
local support representative. Save
the debugging output, which can help
diagnose the problem.</para><note><para>You might also decrease
or increase the level of debugging
that is provided by <command>Uutry</command> through
the <option>x</option> <replaceable>n</replaceable> option. <replaceable>n</replaceable> indicates the debug
level. The default debug level for <command>Uutry</command> is 5. </para><para>Debug level 3 provides
basic information about when and how
the connection is established, but
not much information about the transmission.
Debug level 9, however, provides exhaustive
information about the transmission
process. Be aware that debugging occurs
at both ends of the transmission.
If you intend to use a level higher
than 5 on a moderately large text,
contact the other site's administrator
and decide when to change the level.</para>
</note>
</step>
</procedure>
</task><sect2 id="uucptasks-23"><title>Checking
the UUCP <filename>/etc/uucp/Systems</filename> File</title><itemizedlist><para>Verify that you have up-to-date
information in your <filename>Systems</filename> file
if you are having trouble contacting
a particular machine. Some information
that might be out of date for a machine
is the following:</para><listitem><para>Phone number </para>
</listitem><listitem><para>Login ID</para>
</listitem><listitem><para>Password</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="uucptasks-32"><title>Checking
UUCP Error Messages</title><para>UUCP has two types of
error messages: <returnvalue>ASSERT</returnvalue> and <returnvalue>STATUS</returnvalue>.   </para><itemizedlist><listitem><para>When a process is aborted, <returnvalue>ASSERT</returnvalue> error messages
are recorded in <filename>/var/uucp/.Admin/errors</filename>. These messages include
the file name, <filename>sccsid</filename>,
line number, and text. These messages
usually result from system problems.
      </para>
</listitem><listitem><para><returnvalue>STATUS</returnvalue> error
messages are stored in the <filename>/var/uucp/.Status</filename> directory. The directory
contains a separate file for each
remote machine that your computer
attempts to communicate with. These
files contain status information about
attempted communication and whether
the communication was successful.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="uucptasks-33"><title>Checking
Basic Information</title><itemizedlist><para>Several commands are available
for checking basic networking information:
    </para><listitem><para>Use the <command>uuname</command> command
to list those machines that your machine
can contact. </para>
</listitem><listitem><para>Use the <command>uulog</command> command
to display the contents of the log
directories for particular hosts.
 </para>
</listitem><listitem><para>Use the <command>uucheck</command> <option>v</option> command to check for the
presence of files and directories
that are needed by <command>uucp</command>.
This command also checks the <filename>Permissions</filename> file and displays information
about the permissions that you have
set up.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
</chapter>