Next Previous Contents

# LPRng-HOWTO

## Patrick Powell `papowell@astart.com`

11 Feb 2000 (For LPRng-3.6.13)

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 independent 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 SETUID root; greatly enhanced security checks; load balancing across multiple printers; 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, and the PostScript and HP filters support page counting and produce accounting information accounting. In addition there are a wide variety of filters for page formatting and to produce banner pages. For users that require compatibility with the SVR4 lp and lpstat programs, the LPRng package provides emulation of these programs. In addition, a publicly available PCNFSD server is distributed with LPRng and interfaces with the PC/DOS/Windows based NFS style print spoolers. In addition, LPRng can be easily integrated with the Samba SMB support package. For users that require secure and/or authenticated printing support, LPRng supports Kerberos 5, MIT Kerberos 4 extensions to LPR, PGP, and simple MD5 based authentication. Additional authentication support is extremely simple to add.

## 1. Introduction

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

## 2. Print Spooling Overview

- 2.1 Overview
- 2.2 Sample Printcap Entry
- 2.3 Print Server Configuration

## 3. Attaching Your Printer

- 3.1 Network Printers
- 3.2 Network Print Server Boxes
- 3.3 Parallel Printers
- 3.4 Serial Printers

## 4. Installing the Software

- 4.1 Source Code and Support Programs
- 4.2 Configuration
- 4.3 Installation
- 4.4 Solving Installation Problems
- 4.5 Advanced Configuration Options
- 4.6 Printcap and lpd.conf files
- 4.7 Security, Permissions, and CHECKPC
- 4.8 Stopping Existing Spooler Software
- 4.9 Initial System Testing
- 4.10 Startup Scripts
- 4.11 Replacing UNIX SystemV lp, lpstat Printing Services

## 5. System Specific Notes

- 5.1 Solaris 2.4, 2.5, 2.6, 2.7
- 5.2 Solaris, Newsprint and FrameMaker
- 5.3 Linux
- 5.4 AIX
- 5.5 AppleTalk Support
- 5.6 Apple to LPRng Printing
- 5.7 LPRng to AppleTalk Printing
- 5.8 SAMBA, SMB and LPRng
- 5.9 Printing to a NetBEUI Printer
- 5.10 Printer Specific notes
- 5.11 HP Deskjet
- 5.12 HP LaserJet IIISiMX
- 5.13 HP JetDirect Interface
- 5.14 Lexmark Printers
- 5.15 Network Base Tektronix Phaser Printers
- 5.16 Duplex Printing
- 5.17 Test Version and Portability Testing

## 6. The Most Frequently Asked Questions

- 6.1 Why do I get malformed from address errors?
- 6.2 It was working normally, then I get connection refused errors
- 6.3 Job is not in print queue, but it gets printed!
- 6.4 Job disappears and is never printed, but lpr works
- 6.5 I get messages about bad control file format
- 6.6 What is RFC 1179, the Line Printer Daemon Protocol?
- 6.7 I want to replace lp, lpstat, etc, but my programs need them
- 6.8 What are the drawbacks to LPRng?

## 7. Client To Server Connection Information

- 7.1 Printer Name and Server IP Address
- 7.2 LPD Server Runnning on Localhost

## 8. Using the Printcap Database

- 8.1 Simple Client Printcap Entry
- 8.2 Simple Server Printcap Example
- 8.3 The Printcap Parsing Rules
- 8.4 Displaying Printcap Information
- 8.5 Remote Printer Using RFC1179
- 8.6 Remote Printer Using Socket API
- 8.7 Parallel Printer
- 8.8 A serial printer queue
- 8.9 Single Printcap File for Large Installation
- 8.10 Bounce queues
- 8.11 Changing Job Formats
- 8.12 LPR Filters Files
- 8.13 Dynamic Routing
- 8.14 Printer Load Balancing
- 8.15 Locations of Printcap Files
- 8.16 Management Strategies for Large Installations
- 8.17 Using Programs To Get Printcap Information

## 9. LPRng checkpc Utility

- 9.1 Maintenance
- 9.2 Printcap Information

## 10. Spool Queues and Files

- 10.1 Spool Queue
- 10.2 Queue Lock File
- 10.3 Spool Control File
- 10.4 Log and Status Files
- 10.5 Job Files
- 10.6 Job Hold File
- 10.7 Job State
- 10.8 Job Identifier

## 11. Configuration File lpd.conf and Options

- 11.1 Configuration File Format
- 11.2 Configuration Information
- 11.3 Configuration Options
- 11.4 The Record Queue Name qq and force_queuename flags
- 11.5 The check_for_nonprintable Flag
- 11.6 The rg Restrict Use to Group Members Option
- 11.7 The fx Allowed Formats Option
- 11.8 Fixing Bad Control Files and Metacharacters
- 11.9 Using the bk Option and Control File Filters
- 11.10 Maximum Copies
- 11.11 The minfree Minimum Spool Queue Space Option
- 11.12 Debugging
- 11.13 LPD Specific
- 11.14 Legacy Compatibility

## 12. Job Processing

- 12.1 Opening the Output Device
- 12.2 Printing Banner At Beginning
- 12.3 Printing Job Files
- 12.4 Printing Banner At End
- 12.5 Normal Termination
- 12.6 Abnormal Termination
- 12.7 LPD Spool Queue Processing

## 13. Filters

- 13.1 What are filters?
- 13.2 What are print formats?
- 13.3 OF Filter
- 13.4 LPR -p format
- 13.5 LPR binary (-l) format
- 13.6 Filter Command Line Flags
- 13.7 LPRng Supported Filters
- 13.8 lpf
- 13.9 IFHP Filter
- 13.10 Using your own filters

## 14. Permissions and Authentication

- 14.1 Information for matching
- 14.2 Permission Checks
- 14.3 Match Procedure
- 14.4 Permission File Location
- 14.5 Example Permission File
- 14.6 Complex Permission Checking
- 14.7 More Examples

## 15. Accounting

- 15.1 Printer Accounting Reality Check
- 15.2 How HP Printers Implement Page Counters
- 15.3 Accounting Printcap Options
- 15.4 Accounting File
- 15.5 Accounting Using an Accounting Server
- 15.6 Using Filters For Accounting
- 15.7 Accounting Utility accounting.pl

## 16. Authentication and Encryption

- 16.1 Authentication
- 16.2 Identifiers
- 16.3 RFC1179 Protocol Extensions
- 16.4 Authentication Operations
- 16.5 Permission Checking
- 16.6 PGP Authentication Support
- 16.7 Using Kerberos 5 for Authentication
- 16.8 Using Kerberos 4 for Authentication
- 16.9 Using MD5 for Authentication
- 16.10 Adding Authentication Support

## 17. Status Monitoring and Logging

- 17.1 LPQ status reporting
- 17.2 LPQ Short Format (lpq -s)
- 17.3 LPQ Long Format (lpq default, lpq -l, lpq -L)
- 17.4 LPQ Verbose Format (lpq -v)
- 17.5 lpc status
- 17.6 Remote Logger Operation
- 17.7 LPR -mhost%port and user logging support

## 18. RFC 1179 - Line Printer Daemon Protocol

- 18.1 Ports and Connections
- 18.2 Protocol Requests and Replies
- 18.3 Job Transfer
- 18.4 Data File Transfer
- 18.5 Control File Contents
- 18.6 LPQ Requests
- 18.7 LPRM Requests
- 18.8 LPC Requests
- 18.9 Block Job Transfer
- 18.10 Authenticated Transfer

## 19. Defective RFC1179 Implementations

- 19.1 OS2 Print Spoolers
- 19.2 Serious Security Loophole

## 20. Acknowledgements

## 21. Index To All The Configuration and Printcap Options

Next Previous Contents