Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [435]

By Root 2817 0
the /etc/hosts.lpd file, no authentication is available. LPRng support Kerberos 5, SSL, and PGP authentication methods.

Finally, LPRng offers some great queue management features, most of which come from SysV. LPRng includes dynamic redirection of print queues, support for multiple printers on one queue, and even load balancing across several printers.

With all these advantages, why would you not want to start using LPRng? In small environments with few users and fewer printers, the BSD and System V print systems both work well. If you don’t plan on adding lots of new printers or if the features and added security of LPRng do not interest you, installing and configuring LPRng is probably not worth the effort.

At a minimum, consider installing LPRng on your print server. This simple step will buy you much of the security and functionality of a network-wide deployment with very little hassle.

The LPRng commands


LPRng’s version of lpr maintains backward compatibility with most other lpr implementations. The only exception is the -s flag, which is silently ignored by LPRng’s lpr. This flag was originally used to create a symbolic link to the file to be printed instead of making a new copy, which was useful for printing large files.

The LPRng version of lpr provides a wealth of new functionality. Particularly useful are the verbose flag (-V) and the debugging flag (-D5 for the most detail).

LPRng commands let you specify a printer’s host and port in addition to its name. This feature allows users to print to remote printers that are not defined in the local printcap file.

To specify the host to which a printer is attached, append @hostname to the printer’s name. A port is specified by further appending %port. For example:

% lpr -Phowler-lw@beast%8552 filename

This method of specifying a printer works for the LPRng versions of lpr, lpq, lprm, and lpc, which means that print clients often don’t need a printcap file at all.

If a printer isn’t specified on the command line, the value of the PRINTER environment variable is used. If the PRINTER environment variable is not set, the first entry of the /etc/printcap file is used. If no printcap file exists, the default printer specified in the lpd.conf file is used.

LPRng builds several new features into lpq. Several alternative output formats are available with the short (-s), long (-l), and verbose long (-L) flags. These options can be useful with scripts that depend on the output of lpq. The command now accepts a flag to make periodic repeated queries (-t seconds). Finally, the debugging flag described above is supported. With the flag -D5, the command output will include detailed status messages from local and remote printers and print spoolers.

Perhaps the greatest addition to LPRng’s lpc is its ability to prioritize queue entries based on something more useful than the order in which they were submitted. The rules for queuing priority can be made complex enough to accommodate almost any desired policy. Unlike the traditional lpc, LPRng’s lpc can be run across a network.

LPRng’s lprm allows job removal based on any of several criteria. In the traditional system, the jobid or username was required. With LPRng, jobs can also be removed from a spool by a regular expression that is matched against the jobid.

Obtaining and installing LPRng


The current LPRng distribution is available from www.astart.com. The documentation that comes with it should get you through the installation. A FAQ at the web site provides detailed installation and configuration instructions.

One of the coolest features of LPRng is its ability to operate with a minimum of setuid binaries. To compile LPRng in this manner, use the --disable-setuid option to configure when first setting up the compilation environment:

# ./configure --disable-setuid

However, if you want lpd to listen on its standard port, 515, it will need to run as root. You will have to fix the lpd permissions by hand:

# chmod 4755 /usr/local/sbin/lpd

As of LPRng version 3.6.12, the default Makefile doesn

Return Main Page Previous Page Next Page

®Online Book Reader