Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [436]

By Root 2928 0
’t work with the Solaris 2.7 version of make. To get LPRng to compile correctly, include in your path a directory that contains the GNU make before the directory that contains the default Solaris make (/usr/ccs/bin).

/etc/lpd.conf: configure lpd


The LPRng lpd server is highly configurable through the /etc/lpd.conf file. In fact, as of this writing 185 different parameters can be set in this file. Most of the parameters set directory and operating system defaults. Also provided is a mechanism by which you provide default values for unspecified /etc/printcap variables.

The best way to create an lpd.conf file for your site is to copy the lpd.conf file in the root of the LPRng distribution. This file contains an option-by-option description with examples. If you do not have time to wade through this long list of options, refer to the on-line man page for lpd.conf, which contains explanations of all the settings and even an example.

/etc/lpd.perms: configure access control


With /etc/lpd.perms, you can establish very complex printing policies. Rules for controlling print access are applied to print jobs in the order in which they appear in the lpd.perms file.

Rules are made up of two parts. The first part is simply an ACCEPT or REJECT token that determines whether the specified operation will be allowed. It’s followed by a series of clauses that specify which people, hosts, printers, or operations the rule should apply to.

For example, the following line tells the printing system that the user evi on the remote host beast can print jobs, spool jobs, remove jobs, and check the status of jobs on the printer howler-lw.

ACCEPT SERVICE=P,R,M,Q REMOTEHOST=beast REMOTEUSER=evi

PRINTER=howler-lw

The one-letter codes in the SERVICE clause determine which operations the rule is referring to. Table 23.6 shows the values it can contain.

Table 23.6 SERVICE codes in /etc/lpd.perms

The best way to set up your site’s lpd.perms file is to copy the example from the root of your LPRng distribution. This file describes the ACCEPT and REJECT lines in detail and includes several enlightening examples. All possible configuration flags are described in this file.

Setting up the printcap file


The most important thing to remember about the LPRng printcap file is that it is completely backward compatible with the traditional BSD printcap file. That is, all traditional printcap files are also valid LPRng printcap files.

However, LPRng provides many new printcap features as well. Lines can be continued simply by indentation instead of an appended backslash. Variable names are no longer limited to two characters. Several macros are available to help simplify configuration. Entries can be targeted at particular hosts.

Probably the coolest configuration tool LPRng brings us is the checkpc program. Installed as /usr/local/bin/checkpc by default, this program checks the validity and consistency of the printcap file. It warns of missing spool directories, missing files, and incorrect permissions. If you run checkpc with the -f flag, it attempts to fix simple problems (such as making a directory or changing the permissions of a file). Running checkpc with the -D5 flag produces verbose diagnostics.

Filters


In addition to providing BSD filter functionality, LPRng allows filters to be applied to jobs that are sent to remote printers. This feature allows customized data formatting for a host instead of for a printer.

The output filter (of) and input filter (if) printcap variables act a little differently in LPRng. The output filter under traditional BSD lpr is applied to both the document and the banner. Under LPRng, the output filter is used only for the banner. The LPRng input filter is used only for printing text. Filters for other file types are specified with tags named xf, where x is a one-letter type abbreviation. You can completely disable filters for a job by adding -Y to the lpr command line.

Included in LPRng are the lpbanner, pclbanner, and psbanner commands. These commands create text, PCL, and PostScript

Return Main Page Previous Page Next Page

®Online Book Reader