LinuxCommandLibrary

cups-lpd

Accept print jobs from legacy LPD clients

SYNOPSIS

cups-lpd [ -o option=value ]

PARAMETERS

-o option=value
    Specifies CUPS options to be passed to the underlying lp(1) command when submitting a print job. Multiple options can be comma-separated. These options must precede any other command-line arguments. For example, job-sheets=none,none can be used to suppress banner pages.

DESCRIPTION

cups-lpd is a mini-daemon provided by the CUPS (Common Unix Printing System) project. Its primary function is to enable CUPS to receive print jobs and respond to printer status requests from clients using the legacy LPD (Line Printer Daemon) protocol, as defined in RFC 1179. This allows older or non-CUPS-aware systems to print to CUPS-managed printers.

cups-lpd is typically not run directly by users but is invoked by an inetd(8) or xinetd(8) super-server when a connection is made to the standard LPD port (port 515). When a client sends a print job, cups-lpd translates the LPD request into a CUPS job, passing any specified LPD options as CUPS options to the underlying lp(1) command. Similarly, it retrieves printer status information from CUPS and formats it for LPD clients. It integrates with CUPS configuration files like cupsd.conf(5) and printers.conf and logs activity via syslog.

CAVEATS

cups-lpd implements a subset of the RFC 1179 LPD protocol. It is inherently insecure as the LPD protocol itself does not support authentication or encryption, making it unsuitable for untrusted networks without additional security measures (e.g., VPNs or firewalls). Proper configuration of Allow and Deny rules in cupsd.conf(5) is crucial to restrict access to the LPD service. Because of its security limitations and the availability of more modern and secure printing protocols like IPP, cups-lpd is often used for backward compatibility with legacy systems.

CONFIGURATION WITH SUPER-SERVERS

cups-lpd is typically not run as a standalone daemon but rather launched by a super-server like inetd(8) or xinetd(8). These super-servers listen on the LPD port (515) and invoke cups-lpd for each incoming connection. A typical xinetd service entry for LPD might look like this:
service lpd
{
  socket_type = stream
  protocol = tcp
  wait = no
  user = lp
  server = /usr/lib/cups/cups-lpd
  server_args = -o job-sheets=none,none
  disable = no
}

The server_args line demonstrates how to pass options like suppressing banner pages to cups-lpd via the super-server.

HISTORY

The Line Printer Daemon (LPD) protocol, defined in RFC 1179, was a foundational network printing protocol widely used in Unix-like systems. When CUPS (Common Unix Printing System) was developed as a modern, modular printing system, it aimed to replace and enhance the traditional LPD-based printing. To ensure compatibility with existing LPD clients and infrastructure, CUPS included cups-lpd as a bridge. This daemon allows CUPS to accept jobs from systems still relying on the LPD protocol, effectively translating the LPD requests into the internal CUPS job format. Over time, while IPP (Internet Printing Protocol) became the preferred and more secure protocol for CUPS, cups-lpd has remained a vital component for backward compatibility and integration in heterogeneous network environments.

SEE ALSO

cupsd(8), cupsd.conf(5), lp(1), lpq(1), lprm(1), printcap(5), inetd(8), xinetd(8)

Copied to clipboard