11.1 The Printer Colon Files

11.2 Remote Printing

Remote printing allows different computers to share printers. To use remote printing facilities, the computers must be connected using the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol and must support the required TCP/IP applications, such as the lpd daemon.

Figure 105 shows the logic flow of a remote printer request:



Figure 105: Remote Print Request

The /etc/hosts.lpd file, one of the important files in remote printing, is discussed in the following section.

11.2.1 The /etc/hosts.lpd File

The /etc/hosts.lpd file defines which remote systems are permitted to print on the local system. The remote systems listed in this file do not have the full privileges given to files listed in the /etc/hosts.equiv file.

The hosts.lpd file supports the following host name entries:

+
Signifies that any host on the network can print using the local host.
HostName
The name of a remote host and signifies that HostName can print, using the local host.
-HostName
Signifies the host is not allowed to print using the local host.
+@NetGroup
Signifies all hosts in the netgroup are allowed to print using the local host.
-@NetGroup
Signifies that no hosts in the netgroup are allowed to print using the local host.

Entries in this file can be made using the System Management Interface Tool (SMIT) or the ruser command.

Note

Comments must be entered on separate lines in the hosts.lpd file. Comments should not be entered on lines containing host names.

To implement hosts.lpd file changes without restarting the system, use the System Resource Controller (SRC) refresh command.

11.2.2 The /etc/hosts.equiv File

The /etc/hosts.equiv file, along with any local $HOME/.rhosts files, defines the hosts (computers on a network) and user accounts that can invoke remote commands on a local host without supplying a password. A user or host that is not required to supply a password is considered trusted.

When a local host receives a remote command request, the appropriate local daemon first checks the /etc/hosts.equiv file to determine if the request originates with a trusted user or host. For example, if the local host receives a remote login request, the rlogind daemon checks for the existence of a hosts.equiv file on the local host. If the file exists but does not define the host or user, the system checks the appropriate $HOME/.rhosts file. This file is similar to the /etc/hosts.equiv file, except that it is maintained for individual users.

Both files, hosts.equiv and .rhosts must have permissions denying write access to group and other. If either group or other have write access to a file, that file is ignored.

Do not give write permission to the /etc/hosts.equiv file to group and other. Permissions of the /etc/hosts.equiv file should be set to 600 (read and write by owner only).

If a remote command request is made by the root user, the /etc/hosts.equiv file is ignored and only the /.rhosts file is read.

Note

Be careful when establishing trusted relationships. Networks that use trusted facilities can be less secure than those that do not.

11.2.3 Controlling the lpd Daemon

Controlling the lpd daemon includes starting and stopping the lpd subsystem and changing the characteristics of the lpd subsystem. Use the SMIT or System Resource Controller (SRC) commands to control the lpd daemon.

There are three ways to start the lpd daemon. If it is not currently running, you can start the daemon at any time. You also have the option of having the lpd daemon start at system restart or to have it start both at the current time and at system restart. The same options are available to stop the lpd daemon: stop now, stop at system restart, or stop both now and at system restart. You can run the lpd daemon with DEBUG, SYSLOG, both DEBUG and SYSLOG, or with neither.

To control the lpd daemon with SMIT, type smitty lpd, then select the desired options from the SMIT menus. To control the lpd daemon with the SRC, use the following SRC commands:

startsrc
Starts a subsystem, group of subsystems, or a subserver.
stopsrc
Stops a subsystem, group of subsystems, or a subserver.
lssrc
Gets the status of a subsystem, group of subsystems, or a subserver.
refresh
Causes the subsystem or group of subsystems to reread the appropriate configuration file.
traceson
Enables tracing of a subsystem, group of subsystems, or a subserver.
tracesoff
Disables tracing of a subsystem, group of subsystems, or a subserver.

11.3 Virtual Printers