don't allow remote to specify path; bug report 4.3BSD-tahoe/usr.bin/30
[unix-history] / usr / src / usr.sbin / lpr / lpd / lpd.8
CommitLineData
929f44b0
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
c6216a8d 3.\"
929f44b0
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)lpd.8 6.4 (Berkeley) %G%
c6216a8d 17.\"
278a48a0 18.TH LPD 8 ""
c6216a8d
KM
19.UC 5
20.ad
21.SH NAME
22lpd \- line printer daemon
23.SH SYNOPSIS
24.B /usr/lib/lpd
2c7812a9
EA
25[
26.B \-l
27] [ port # ]
c6216a8d
KM
28.SH DESCRIPTION
29.I Lpd
30is the line printer daemon (spool area handler) and is normally invoked
31at boot time from the
32.IR rc (8)
33file. It makes a single pass through the
34.IR printcap (5)
35file to find out about the existing printers and
36prints any files left after a crash. It then uses the system calls
37.IR listen (2)
38and
39.IR accept (2)
40to receive requests to print files in the queue,
41transfer files to the spooling area, display the queue,
42or remove jobs from the queue. In each case, it forks a child to handle
43the request so the parent can continue to listen for more requests.
44The Internet port number used to rendezvous
45with other processes is normally obtained with
46.IR getservbyname (3)
47but can be changed with the
48.IR port #
2c7812a9 49argument.
c6216a8d
KM
50The
51.B \-l
52flag causes
53.I lpd
54to log valid requests received from the network. This can be useful
55for debugging purposes.
56.PP
57Access control is provided by two means. First, All requests must come from
58one of the machines listed in the file
278a48a0
KM
59.I /etc/hosts.equiv
60or
61.IR /etc/hosts.lpd .
c6216a8d
KM
62Second, if the ``rs'' capability is specified in the
63.I printcap
64entry for the printer being accessed,
65.I lpr
66requests will only be honored for those users with accounts on the
67machine with the printer.
68.PP
69The file
278a48a0
KM
70.I minfree
71in each spool directory contains the number of disk blocks to leave free
72so that the line printer queue won't completely fill the disk.
73The
74.I minfree
75file can be edited with your favorite text editor.
76.PP
77The file
c6216a8d
KM
78.I lock
79in each spool directory is used to prevent multiple daemons from
80becoming active simultaneously, and to store information
81about the daemon process for
82.IR lpr (1),
83.IR lpq (1),
84and
85.IR lprm (1).
86After the daemon has successfully set the lock, it scans the directory
87for files beginning with
88.IR cf .
89Lines in each
90.I cf
91file specify files to be printed or non-printing actions to be
92performed. Each such line begins with a key character
93to specify what to do with the remainder of the line.
94.in +3
95.IP J
96Job Name. String to be used for the job name on the burst page.
97.IP C
98Classification. String to be used for the classification line
99on the burst page.
100.IP L
101Literal. The line contains identification info from
102the password file and causes the banner page to be printed.
103.IP T
104Title. String to be used as the title for
105.IR pr (1).
106.IP H
107Host Name. Name of the machine where
108.I lpr
109was invoked.
110.IP P
111Person. Login name of the person who invoked
112.IR lpr .
113This is used to verify ownership by
114.IR lprm .
115.IP M
116Send mail to the specified user when the current print job completes.
117.IP f
118Formatted File. Name of a file to print which is already formatted.
119.IP l
120Like ``f'' but passes control characters and does not make page breaks.
121.IP p
122Name of a file to print using
123.IR pr (1)
124as a filter.
125.IP t
126Troff File. The file contains
127.IR troff (1)
128output (cat phototypesetter commands).
278a48a0
KM
129.IP n
130Ditroff File. The file contains device independent troff
131output.
c6216a8d
KM
132.IP d
133DVI File. The file contains
134.IR Tex (l)
135output (DVI format from Standford).
136.IP g
137Graph File. The file contains data produced by
138.IR plot (3X).
139.IP c
140Cifplot File. The file contains data produced by
141.IR cifplot .
142.IP v
143The file contains a raster image.
144.IP r
145The file contains text data with FORTRAN carriage control characters.
146.IP 1
147Troff Font R. Name of the font file to use instead of the default.
148.IP 2
149Troff Font I. Name of the font file to use instead of the default.
150.IP 3
151Troff Font B. Name of the font file to use instead of the default.
152.IP 4
153Troff Font S. Name of the font file to use instead of the default.
154.IP W
155Width. Changes the page width (in characters) used by
156.IR pr (1)
157and the text filters.
158.IP I
159Indent. The number of characters to indent the output by (in ascii).
160.IP U
161Unlink. Name of file to remove upon completion of printing.
162.IP N
163File name. The name of the file which is being printed, or a blank
164for the standard input (when
165.I lpr
166is invoked in a pipeline).
167.in -5
168.PP
2c7812a9
EA
169If a file can not be opened, a message will be logged via
170.IR syslog (3)
171using the
172.I LOG_LPR
173facility.
c6216a8d
KM
174.I Lpd
175will try up to 20 times
176to reopen a file it expects to be there, after which it will
177skip the file to be printed.
178.PP
179.I Lpd
180uses
181.IR flock (2)
182to provide exclusive access to the lock file and to prevent multiple
183deamons from becoming active simultaneously. If the daemon should be killed
184or die unexpectedly, the lock file need not be removed.
185The lock file is kept in a readable ASCII form
186and contains two lines.
187The first is the process id of the daemon and the second is the control
188file name of the current job being printed. The second line is updated to
189reflect the current status of
190.I lpd
191for the programs
192.IR lpq (1)
193and
194.IR lprm (1).
195.SH FILES
196.nf
197.ta \w'/etc/printcap 'u
198/etc/printcap printer description file
199/usr/spool/* spool directories
278a48a0 200/usr/spool/*/minfree minimum free space to leave
c6216a8d
KM
201/dev/lp* line printer devices
202/dev/printer socket for local requests
203/etc/hosts.equiv lists machine names allowed printer access
31c59742
KM
204/etc/hosts.lpd lists machine names allowed printer access,
205 but not under same administrative control.
c6216a8d
KM
206.fi
207.SH "SEE ALSO"
208lpc(8),
209pac(1),
210lpr(1),
211lpq(1),
212lprm(1),
2c7812a9 213syslog(3),
c6216a8d
KM
214printcap(5)
215.br
216.ul
2174.2BSD Line Printer Spooler Manual