LPRngLogo LPRngTool

LPRng Reference Manual

24 Sep 2004 (For LPRng-3.8.28)

Patrick A Powell


AStArt Technologies
6741 Convoy Court,
San Diego, CA 92111
Phone 858-874-6543
Fax 858-751-2435

The LPRng; Printing Software consists of the LPRng print spooler, the ifhp print filter, and the LPRngTool graphical user interface.

The LPRng print spooler 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; printer pooling and load balancing; automatic job holding; highly verbose diagnostics; 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. Included in the LPRng print spooler distribution is a set of customizable banner page generation programs.

The SVR4 lp and lpstat functionality is provided by a set of emulator programs, and LPRng can be easily integrated with the Samba SMB support package. For users that require secure and/or authenticated printing support, LPRng supports SSL (using OpenSSL), Kerberos 5, MIT Kerberos 4 extensions to LPR, PGP, and simple MD5 based authentication. Additional authentication support is extremely simple to add.

The ifhp print filter converts print jobs into formats compatible with PostScript, PCL, text, and other printers and provides diagnostic and error information as well as accounting information.

The ;LPRngTool& Graphical User Interface provides a simple to use configuration and monitoring tool. It allows users to monitor printers and generate printcap entries in a simple manner, as well as providing extensive help and diagnostics.

Important: THIS DOCUMENTATION AND THE DESCRIBED SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Table of Contents
Preface
1. Introduction
2. Acknowledgements
3. Shell Prompts
4. Typographic Conventions
5. Notes, warnings, and examples
1. Introduction
1.1. What is LPRng?
1.2. Additional Resources
1.3. Frequently Asked Questions
1.4. License, Copyright, and Disclaimer
1.5. Commercial Support
1.6. Web Site
1.7. FTP Sites
1.8. Mailing List
1.9. PGP Public Key
1.10. References and Standards
1.10.1. RFCs
1.10.2. PostScript
1.10.3. HP PCL 5
1.10.4. HP PJL
1.10.5. PDF
2. Installation
2.1. Getting Source Code and Support Programs
2.2. PATH Environment Variable and Utilities
2.3. Network Mounted File System and Spool Directories
2.4. Daemon User and Daemon Group
2.5. Configuration
2.6. System and User Printcap, lpd.conf, and lpd.perms files
2.7. Checking System Installation with checkpc
2.8. Compilation and Install
2.9. Installation Problems
2.10. Updating Print Spooler Software and Startup Scripts
2.10.1. SunOS, Linux, and BSD Derived Systems
2.10.2. Solaris, HP-UX, and other SysVR4 Derived Systems
2.11. Emulation for UNIX SystemV lp and lpstat
2.12. SAMBA and LPRng
2.13. Security Concerns
3. System Specific Notes
3.1. Solaris
3.2. Linux
3.3. AIX
3.4. AppleTalk Support
4. Print Spooling Tutorial
4.1. Overview
4.2. Sample Printcap Entry
4.3. Setting Up the Tutorial Configuration
4.4. Restoring Original Configuration
4.5. Printing a File and Checking Status
4.6. Selecting the Print Queue
4.7. Controlling the Print Queue
4.8. Job Removal
4.9. Print Job Filters
4.9.1. Control Files and Filter Options
4.9.2. Filter Environment Variables
4.9.3. Using Command Line and Printcap Options In Filters
4.9.4. Filter Exit Codes
4.9.5. Job Formats and Filter Selection
4.10. Job File Format Conversion with Filters
4.10.1. Simple Filter with File Format Detection
4.10.2. The ifhp Filter
4.10.3. The Jaggies - LF to CR-LF Conversion With lpf
4.10.4. Store and Forward Spool Queues
4.10.5. Filtering Job Files In Transit
4.11. Printcap Basics
4.11.1. Printcap Processing Format
4.11.2. Printcap Information From Programs and Databases
4.11.3. User Printcap Information
4.12. Banner Printing and the OF filter
4.13. Printing from lpr Directly To A Device
4.14. Moving Jobs From Queue to Queue and Redirecting Queues
4.15. Print Job Classes, User Requested Job Priority, and Form Support
4.16. Holding and Releasing Jobs
4.17. Load Balance Queues and Printer Pools
4.18. Routing Jobs To Print Queues
4.19. Job Options and the Z Control File Entry
4.19.1. Setting Job Options Using the Printcap
4.19.2. Converting SystemV Options to LPRng Options
4.19.3. Selecting a Single Option - Muliple Queues
4.19.4. Selecting Multiple Options - Single Queue
4.20. Interfacing to Non-LPRng Spoolers
4.21. Debugging, Tracing, and Log Files
5. LPRng Clients - lpr, lprm, lpq, lpc, lpstat
5.1. Printer and Server Information
5.2. Command Line -Pprinter@host
5.3. Command Line -Pprinter
5.4. PRINTER, LPDEST, NPRINTER, and NGPRINTER Environment Variables
5.5. Wildcard Printcap Entry
5.6. First Printcap Entry
5.7. Default Printer and Server Host
5.8. Force Connection to Localhost
5.9. User Identification
6. lpr - Job Spooler Program
6.1. Job Format Options
6.2. Job Pretty Printing, Banners, Priority, and Accounting
6.3. Job Class and Priority
6.4. Job Copies and Job Size
6.5. Job Completion Notification Requested
6.6. Remove Files After Spooling
6.7. The -Z Passthrough to Filter Options
6.8. Record Queue Name in Control File
6.9. Check For Nonprintable File
6.10. Job Filtering By LPR
6.11. Restrict Queue Use to Group Members
6.12. Fixing Bad Control Files and Metacharacters
6.13. Minimum Spool Queue Free Space
6.14. FQDN Host Information
7. lpq - Status Monitoring Program
7.1. lpq Queue Selection (lpq -Pprinter, lpq -a)
7.2. lpq Job Selection
7.3. lpq Short Format (lpq -s)
7.4. lpq Long Format (lpq, lpq -l, lpq -L)
7.5. lpq Verbose Format (lpq -v)
7.6. Job Taking Too Long - Stalled
7.7. Configuring Format and Displayed Information
7.7.1. Display Class Information
7.7.2. Reverse Short and Long lpq Formats
7.7.3. Status Line Length and Line Count
7.7.4. lpq Status Format Determined by Requesting Host Address
8. lprm - Job Removal Program
8.1. lprm Queue Selection (lprm -Pprinter, lprm -a)
8.2. lprm Job Selection
9. lpc - Administration Program
9.1. Informational Commands - status, flush, active, reread
9.2. Queue Management - enable, disable, up, down
9.3. Printing Management - start, stop, up, down
9.4. Problem Management - abort, redo, kill
9.5. Job Scheduling - topq, holdall, noholdall, hold, release
9.6. Queue Management - class, redirect, move
10. checkpc - Configuration Validation Utility
10.1. Maintenance
10.2. Printcap Information
11. Printer Communication and Protocols
11.1. Network Printers
11.2. RFC1179 (LPD) Connection
11.3. Socket API
11.4. AppSocket TCP/IP Protocol
11.5. Network Print Server Boxes
11.6. Network Print Server Configuration Information
11.7. HP JetDirect Interface
11.7.1. Resetting To Factory Defaults
11.7.2. Setting Up IP Networking and Address
11.7.3. BOOTP Information
11.7.4. Telnet Configuration
11.7.5. Disabling Banner Page Generation
11.8. Problems With Network Print Servers
11.8.1. Network Print Server Not Responding
11.8.2. Network Print Server Does Not Handle LPQ, LPRM
11.8.3. Incomplete Job Transfers
11.9. Printing to a SMB (MicroSoft) Printer
11.10. Printing to AppleTalk Printers
11.11. Parallel Port Printers
11.12. Serial Printers
12. Printcap Database
12.1. The Printcap Parsing Rules
12.2. Simple Client Printcap Entry
12.3. Simple Server Printcap Example
12.4. Using :oh To Select Printcap Information
12.5. Using the Wildcard Printcap Entry
12.6. Enterprise Strength Printcap Example
12.7. Remote Printer Using RFC1179
12.8. Remote Printer Using Socket API
12.9. Parallel Printer
12.10. Serial Printer
12.11. Bounce Queue
12.12. Job Format Translation
12.13. Dynamic Routing
12.14. Printer Load Balancing
12.15. Locations of Printcap Files
12.15.1. Separate Server and Client Printcap Files
12.15.2. all Printcap Entry
12.16. Single Printcap File for Large Installation
12.17. Management Strategies for Large Installations
12.18. Using Programs To Get Printcap Information
12.18.1. How to use NIS and LPRng
12.18.2. How to use NIS and LPRng - Sven Rudolph
12.19. Lexmark Printers
12.20. Tektronix Phaser Printers
12.21. Duplex Printing
12.22. Solaris, Newsprint and FrameMaker
13. Spool Queues and Files
13.1. Spool Queue
13.2. Queue Lock File
13.3. Spool Control File
13.4. Log and Status Files
13.5. Job Files
13.6. Job Hold File
13.7. Job State
13.8. Job Identifier
14. Configuration File, Defaults and Overrides
14.1. Configuration File Format
14.2. Legacy Compatibility
15. Job Processing
15.1. Configuration and Setup Options
15.2. Submitting Jobs and Service Requests
15.3. Job Reception
15.4. Spool Queue Processing
15.5. Opening the Output Device
15.6. Printing Banners
15.7. Printing Job Files
15.8. Printing Banner At End of Job
15.9. Normal Termination
15.10. Abnormal Termination
15.11. Forwarding Jobs
15.12. Debugging
16. Filters
16.1. Filter Functions
16.2. Filter Exit Codes
16.2.1. JSUCC
16.2.2. JFAIL
16.2.3. JABORT
16.2.4. JREMOVE
16.2.5. JHOLD
16.2.6. JNOSPOOL and JNOPRINT
16.2.7. JSIGNAL
16.2.8. JFAILNORETRY
16.2.9. Other Values
16.3. Print Job Formats
16.4. OF Filter
16.5. lpr -p format
16.6. lpr binary (-l) format
16.7. Chaining Filters
16.8. Filter Command Line Options and Environment Variables
16.9. LPRng Supported Filters
16.9.1. Filter Support Conventions
16.10. lpf
16.11. ifhp Filter
17. Permissions and Authentication
17.1. Permission Checking Algorithm
17.2. Rule Matching Procedures
17.2.1. DEFAULT
17.2.2. SERVICE
17.2.3. USER
17.2.4. REMOTEUSER
17.2.5. HOST
17.2.6. REMOTEHOST
17.2.7. REMOTEPORT
17.2.8. PORT
17.2.9. IP
17.2.10. REMOTEIP
17.2.11. LPC
17.2.12. SAMEUSER
17.2.13. SAMEHOST
17.2.14. SERVER
17.2.15. FORWARD
17.2.16. GROUP
17.2.17. REMOTEGROUP
17.2.18. CONTROLLINE
17.2.19. AUTH
17.2.20. AUTHTYPE
17.2.21. AUTHUSER
17.2.22. IFIP
17.3. Permission File Location
17.4. Example Permission File
17.5. Complex Permission Checking
17.6. More Examples
17.7. Authentication and Encryption
17.8. User Identification
17.9. RFC1179 Protocol Extensions
17.10. Authentication Operations
17.11. Permission Checking
17.12. PGP Authentication Support
17.12.1. Printcap Configuration
17.12.2. User Files and Environment Variables
17.13. Using Kerberos 5 for Authentication
17.13.1. LPRng Configuration
17.13.2. Kerberos Installation Procedure
17.13.3. LPRng Configuration
17.13.4. Printcap Entries
17.13.5. User Environment Variables and Files
17.14. Using Kerberos 4 for Authentication
17.14.1. Printcap Entries
17.15. Using SSL for Authentication
17.15.1. Certificate Management
17.15.2. Creating Root Certificate
17.15.3. Creating Client and Server Certificates
17.15.4. Creating Signing Certificates
17.15.5. Permissions and Certificate Revocation
17.16. Using MD5 for Authentication
17.16.1. Printcap Entries
17.16.2. User Environment Variables and Files
17.17. Adding Authentication Support
17.17.1. Printcap Support
17.17.2. Code Support
17.17.3. Connection and Transfer Authentication
18. Accounting
18.1. Accounting Printcap Options
18.2. Accounting Information
18.3. Accounting File
18.4. Authorization and Quotas
18.5. Accessing Printer Hardware Pagecounters
18.6. Reliable Accounting
18.7. LPRng accounting.pl Utility
19. RFC 1179 - Line Printer Daemon Protocol
19.1. Ports and Connections
19.2. Protocol Requests and Replies
19.3. Job Transfer
19.4. Data File Transfer
19.5. Control File Contents
19.6. lpq Requests
19.7. lprm Requests
19.8. LPC Requests
19.9. Block Job Transfer
19.10. Authenticated Transfer
20. The Most Frequently Asked Questions
20.1. Why do I get malformed from address errors?
20.2. It was working normally, then I get connection refused errors
20.3. Job is not in print queue, but it gets printed!
20.4. Job disappears and is never printed, but lpr works
20.5. I get messages about bad control file format
20.6. What is RFC 1179, the Line Printer Daemon Protocol?
20.7. I want to replace lp, lpstat, etc, but my programs need them
21. Remote Logger Operation
21.1. Logger Network Communication
21.2. Logger Messages
21.3. Message Format
21.4. Dump Messages
21.5. LPD Messages
21.6. Job Status Messages - UPDATE
21.7. Printer Status Messages - PRSTATUS
A. Index To All The Configuration and Printcap Options
B. License
C. Testing and Diagnostic Facilities
C.1. Compiling the Test Version
C.2. Setting Up The Test Version Spool Queues
C.3. Running the Test Version Software
Index
List of Tables
4-1. Filter Options
4-2. Job Formats and Filter Selection
4-3. :ifhp= Options
11-1. Network Print Server Configuration Information
13-1. Control File Lines
16-1. Print Filter Command Line Options
16-2. Filter Command Line Options and Values
16-3. Filter Command Line Option Format
16-4. Filter Environment Variables
17-1. Permission Keywords and Purpose
19-1. RFC1179 Commands
19-2. Control File Lines and Purpose
19-3. LPC Commands
A-1. LPRng Options