Next Previous Contents

# LPRng-HOWTO

## Patrick Powell `papowell@astart.com`

11 May 1998 (For LPRng-3.5.1)

The LPRng software is an enhanced, extended, and portable implementation of the Berkeley LPR print spooler functionality. While providing the same interface and meeting RFC1179 requirements, the implementation is completely new and provides support for the following features: lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic redirection of print queues; automatic job holding; highly verbose diagnostics; multiple printers serving a single queue; client programs do not need to run SUID root; greatly enhanced security checks; and a greatly improved permission and authorization mechanism. The source software compiles and runs on a wide variety of UNIX systems, and is compatible with other print spoolers and network printers that use the LPR interface and meet RFC1179 requirements. The package comes with filters for PostScript and HP printers, as well as the usual 'dumb' printers. Note that the PostScript and HP filters do page counting and produce accounting information accounting. In addition, there are a wide variety of other filters that can do page formatting, and produce banner pages. For users that require compatibility with the SVR4 lp and lpstat interface, lpr and lpq will simulate this interface, eliminating the need for another print spooler package. In addition, a publically available PCNFSD server is distributed with LPRng, and interfaces with the PC/DOS/Windows based NFS style print spoolers. For users that require secure and/or authenticated printing support, LPRng supports Kerberos V and/or PGP authentication methods. Additional authentication support is extremely simple to add.

## 1. Introduction

- 1.1 What is LPRng?
- 1.2 More Information
- 1.3 Copyright
- 1.4 Disclaimer
- 1.5 Commercial Support
- 1.6 Web Site
- 1.7 FTP Sites
- 1.8 Mailing List
- 1.9 PGP Public Key

## 2. The Most Frequently Asked Questions

- 2.1 Why do I get malformed from address errors?
- 2.2 It was working normally, then I get connection refused errors
- 2.3 Job is not in print queue, but it gets printed!
- 2.4 Job disappears and is never printed, but lpr works
- 2.5 I get messages about bad control file format
- 2.6 What is RFC 1179, the Line Printer Daemon Protocol?
- 2.7 I want to replace lp, lpstat, etc, but my programs need them
- 2.8 What are the drawbacks to LPRng?

## 3. Installing your printer

- 3.1 Parallel Printers
- 3.2 Serial Printers
- 3.3 Network Printers

## 4. Installing the programs

- 4.1 Files and Setup
- 4.2 Source Code and Installation
- 4.3 Preparing to run the daemon
- 4.4 Replacing UNIX SystemV lp, lpstat Printing Services
- 4.5 Setuid ROOT and Security Issues
- 4.6 System specific notes
- 4.7 Appletalk Support
- 4.8 SAMBA Support
- 4.9 Printer Specific notes
- 4.10 TESTVERSION and Portability Testing

## 5. /etc/printcap Print Spool Database File

- 5.1 Index To All The Options
- 5.2 A very simple example
- 5.3 A serial printer queue
- 5.4 A remote printer queue
- 5.5 Network Printing With /etc/printcap
- 5.6 Spooling To Local Server
- 5.7 Shared printcap files
- 5.8 Master Printcap Files
- 5.9 Printcap options for lpr, lpq, lprm, and lpc
- 5.10 Bounce queues
- 5.11 LPR Filtering
- 5.12 Dynamic Routing
- 5.13 Support for Network Print Servers
- 5.14 Printer load balancing
- 5.15 The Missing Details
- 5.16 Management Strategy for Large Sites
- 5.17 Using Programs To Get Printcap Information
- 5.18 The Record Queue Name qq and force_queuename flags
- 5.19 Using the check_for_nonprintable Flag
- 5.20 The fd Forwarding Off Option
- 5.21 The rg Restrict Use to Group Members Option
- 5.22 The fx Allowed Formats Option
- 5.23 Fixing Bad Control Files and Metacharacters
- 5.24 Maximum Copies
- 5.25 The mi Minimum Spool Queue Space Option
- 5.26 Debugging
- 5.27 LPD Specific
- 5.28 Legacy Compatibility
- 5.29 Unused Legacy Printcap Options
- 5.30 Compatibility with BSD printcap

## 6. Filters

- 6.1 What are filters?
- 6.2 What are print formats?
- 6.3 OF Filter
- 6.4 The lpr -p format and pr option
- 6.5 The lpr -l format and binary format
- 6.6 Job Processing and Printcap Options
- 6.7 Filter Command Line Flags
- 6.8 Bounce queues and filters: caveats
- 6.9 The lpr -p format and :pr filter
- 6.10 LPRng Supported Filters
- 6.11 CTI-ifhp ifhp Filters
- 6.12 psfilter PostScript Printer Filter
- 6.13 lp_pipe Filters
- 6.14 apsfilter Filter
- 6.15 Using your own filters

## 7. Spool Queues and Files

- 7.1 Spool Queue and Control Queue
- 7.2 Job State
- 7.3 Printer Lock File
- 7.4 Spool Control File
- 7.5 Log and Status Files
- 7.6 Job Control File
- 7.7 Job Hold File
- 7.8 Job Identifier

## 8. /etc/lpd.conf Configuration File

- 8.1 Configuration File Format
- 8.2 Obtaining Configuration Information
- 8.3 Useful Configuration Options

## 9. The /etc/lpd.perms Permissions File

- 9.1 Information for matching
- 9.2 Permission Checks
- 9.3 Match Procedure
- 9.4 Permission File Location
- 9.5 Example Permission File
- 9.6 Complex Permission Checking
- 9.7 More Examples

## 10. Running the software

- 10.1 LPRng's little helper: checkpc
- 10.2 Starting the daemon

## 11. Accounting

- 11.1 Printer Accounting Reality Check
- 11.2 How HP Printers Implement Page Counters
- 11.3 Accounting Printcap Options
- 11.4 Accounting File
- 11.5 Remote Server Accounting
- 11.6 Using Filters For Accounting
- 11.7 Accounting Utility accounting.pl

## 12. Authentication and Encryption

- 12.1 Authentication
- 12.2 Identifiers
- 12.3 RFC1179 Protocol Extensions
- 12.4 Client Operations for Client To lpd Server Authentication
- 12.5 Server Operations for Client To lpd Server Authentication
- 12.6 lpd Server to Server Authentication
- 12.7 Permission Checking
- 12.8 Using PGP for Authentication
- 12.9 Using Kerberos for Authentication

## 13. Status Monitoring and Logging

- 13.1 LPQ status reporting
- 13.2 LPQ Short Format (lpq -s)
- 13.3 LPQ Long Format (lpq default)
- 13.4 LPQ Verbose Format (lpq -v)
- 13.5 lpc status
- 13.6 Remote Logger Operation

## 14. RFC 1179 - Line Printer Daemon Protocol

- 14.1 Ports and Connections
- 14.2 Protocol Requests and Replies
- 14.3 Job Transfer
- 14.4 Data File Transfer
- 14.5 Control File Contents
- 14.6 LPQ Requests
- 14.7 LPRM Requests
- 14.8 LPC Requests
- 14.9 Block Job Transfer
- 14.10 Authenticated Transfer

## 15. Acknowledgements

Next Previous Contents