27.13. Sharing a Printer

The Printer Configuration Tool's ability to share configuration options can only be used if you are using the CUPS printing system. To configure sharing for LPRng, refer to Section 27.13.1 Sharing a Printer with LPRng.

Allowing users on a different computer on the network to print to a printer configured for your system is called sharing the printer. By default, printers configured with the Printer Configuration Tool are not shared.

To share a configured printer, start the Printer Configuration Tool and select a printer from the list. Then select Action => Sharing from the pulldown menu.

NoteNote
 

If a printer is not selected, Action => Sharing only shows the system-wide sharing options normally shown under the General tab.

On the Queue tab, select the option to make the queue available to other users.

Figure 27-17. Queue Options

After selecting to share the queue, by default, all hosts are allowed to print to the shared printer. Allowing all systems on the network to print to the queue can be dangerous, especially if the system is directly connected to the Internet. It is recommended that this option be changed by selecting the All hosts entry and clicking the Edit button to display the window shown in Figure 27-18.

If you have a firewall configured on the print server, it must be able to send and receive connections on the incoming UDP port, 631. If you have a firewall configured on the client (the computer sending the print request), it must be allowed to send and accept connections on port 631.

Figure 27-18. Allowed Hosts

The General tab configures settings for all printers, including those not viewable with the Printer Configuration Tool. There are two options:

Figure 27-19. System-wide Sharing Options

27.13.1. Sharing a Printer with LPRng

If you are running the LPRng printing system, sharing must be configured manually. To allow systems on the network to print to a configured printer on a Red Hat Linux system, use the following steps:

  1. Create the file /etc/accepthost. In this file, add the IP address or hostname of the system that you want to allow print access to, with one line per IP or hostname.

  2. Uncomment the following line in /etc/lpd.perms:

    ACCEPT SERVICE=X REMOTEHOST=</etc/accepthost
  3. Restart the daemon for the changes to take effect:

    service lpd restart