System Administration Guide: Network Services

UUCP COMMANDS Option


Caution – Caution –

The COMMANDS option can compromise the security of your system. Use this option with extreme care.


You can use the COMMANDS option in MACHINE entries to specify the commands that a remote computer can execute on your machine. The uux program generates remote execution requests and queues the requests to be transferred to the remote computer. Files and commands are sent to the target computer for remote execution, which is an exception to the rule that MACHINE entries apply only when your system calls out.

Note that COMMANDS is not used in a LOGNAME entry. COMMANDS in MACHINE entries defines command permissions, whether you call the remote system or the remote system calls you.

The string COMMANDS=rmail specifies the default commands that a remote computer can execute on your computer. If a command string is used in a MACHINE entry, the default commands are overridden. For instance, the following entry overrides the COMMAND default so that the computers that are named owl, raven, hawk, and dove can now execute rmail, rnews, and lp on your computer.


MACHINE=owl:raven:hawk:dove COMMANDS=rmail:rnews:lp 

In addition to the names as just specified,you can have full path names of commands. For example, the following entry specifies that command rmail uses the default search path.


COMMANDS=rmail:/usr/local/rnews:/usr/local/lp 

The default search path for UUCP is /bin and /usr/bin. When the remote computer specifies rnews or /usr/local/rnews for the command to be executed, /usr/local/rnews is executed regardless of the default path. Likewise, /usr/local/lp is the lp command that is executed.

Including the ALL value in the list means that any command from the remote computers that are specified in the entry is executed. If you use this value, you give the remote computers full access to your machine.


Caution – Caution –

This value allows far more access than normal users have. You should use this value only when both machines are at the same site, are closely connected, and the users are trusted.


Here is the string with the ALL value added:


COMMANDS=/usr/local/rnews:ALL:/usr/local/lp 

This string illustrates two points:

You should use the VALIDATE option whenever you specify potentially dangerous commands, such as cat and uucp with the COMMANDS option. Any command that reads or writes files is potentially dangerous to local security when the command is executed by the UUCP remote execution daemon (uuxqt).