1.ds VE LPRng-3.9.0
2.TH LPD.CONF 5 \*(VE "LPRng"
3.SH NAME
4.nf
5lpd.conf \- configuration file for the LPRng line printer spooler system
6.fi
7.SH DESCRIPTION
8The file \fBlpd.conf\fR is used to provide configuration information for
9the LPRng Printer spooler system and defaults for printcap information.
10Leading spaces on lines are ignored,
11and blank lines and lines whose first nonblank character is a sharp
12(``#'') are ignored.
13Trailing blanks and tabs (whitespace) for an option value
14are deleted unless the last one is escaped with a backslash
15(``\\'').
16All other lines
17specify parameters and should be of the following form:
18.RS
19.nf
20keyword
21keyword@
22keyword#value
23keyword=value
24.RE
25.fi
26Note that these values are the same format as
27.BR printcap (5)
28values.
29Values in the configuration can contain
30host or machine dependent information;
31to assist with this,
32the following
33.I "escape sequences"
34in the configuration information are
35replaced as follows:
36.TP
37\fB%h\fR
38the short form
39of the host name
40(i.e.- non fully qualified).
41.TP
42\fB%H\fR
43the fully qualified host name.
44.TP
45\fB%a\fR
46the abbreviated architecture name,
47\fIsun4\fR, \fIsol2\fR, \fIhpux\fR, \fIaix\fR, \fIirix5\fR, etc.
48This value can be set using the \fBarchitecture\fR
49keyword in the configuration file and is set to a
50default value at compile_time.
51.TP
52\fB%P\fR
53the printer name from the printcap entry
54(see below).
55.TP
56\fB%R\fR
57the remote printer name from the printcap entry.
58.TP
59\fB%M\fR
60the remote host name from the printcap entry.
61This is truncated to the short host name.
62.PP
63For example,
64on host
65.I dickory.sdsu.edu,
66the strings
67.I "short=\fB%h\fR"
68.I "long=\fB%H\fR"
69.I "arch=\fB%a\fR"
70would be expanded as
71.I "short=dickory"
72.I "long=dickory.sdsu.edu"
73.I "arch=sun4" .
74.PP
75The P, R, and M tags are provided for use with combined
76configuration and printcap information.
77These values are not expanded when the printcap information is
78initially processed,
79and can be used only in a limited number of printcap or
80other entries.
81Currently only the
82printcap :sd: (spool directory)
83and :forward_server: (forward server) entries use these.
84.PP
85.SH "GENERAL CONFIGURATION PARAMETERS"
86.PP
87Some of the following paramters take lists of files or directories.
88Unless otherwise explicitly stated,
89these lists can be separated by commas (,),
90semicolons (;), or colons, (punctuation)
91and possibly tabs or spaces (whitespace) as well.
92.PP
93Keyword names can use either underscores (_) or hyphens (-)
94in their names,
95but the underscore is preferred.
96.TP
97\fBinclude\fR pathname [pathname*] (no default)
98This can be used to include files into
99the \fBlpd.conf\fR file.
100The include file parameter a whitespace separated 
101list of files; the files must have absolute pathnames and must
102be readable.
103.TP
104\fBae\fR (default: "jobend $H $n $P $k $b $t")
105This specifies either a script or a filter to be invoked
106at the send of a job for accounting purposes.
107See \fBas\fP for the matching accounting at start,
108and the
109.BR printcap (5)
110and
111.BR lpd (8)
112man pages for details.
113.TP
114\fBallow_getenv\fR (default: "LPD_CONF")
115This option specifies an enviorinment variable
116whose value is a configuration file.
117Use of this is restricted to test purposes,
118and SUID ROOT client and server will not run when the variable is enabled.
119.TP
120\fBar\fR (default: yes)
121See
122.BR printcap (5)
123for details.
124.TP
125\fBarchitecture\fR
126The default value is set at compile time and can be
127overwritten with this parameter.
128The default value of this parameter is set at compile time
129and it is used when
130expanding the special sequence \fB%a\fR in 
131pathname and filename strings in this config file.
132.TP
133\fBauth\fR (default: NULL)
134Authentication type to be used for client to server communication.
135.TP
136\fBauth_client_filter\fR (default: NULL)
137Program to be used for client to server communication.
138.TP
139\fBauth_forward\fR (default: NULL)
140Authentication type to be used for server to server communication.
141.TP
142\fBauth_forward_filter\fR (default: NULL)
143Program to be used for server to server communication.
144.TP
145\fBauth_forward_id\fR (default: NULL)
146Authentication id of remote server for server to server communication.
147.TP
148\fBauth_receive_filter\fR (default: NULL)
149Program to be used by server receive server or client communication.
150.TP
151\fBauth_server_id\fR (default: NULL)
152Authentication id of originating client or server.
153.TP
154\fBas\fR (default: "jobstart $H $n $P $k $b $t")
155See \fBas\fR.
156.TP
157\fBbk\fR (default: no)
158See \fBprintcap\fP(5) for details.
159.TP
160\fBbk_filter_options\fR
161(default: "$P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a")
162If the "bkf" (backwards compatible filter) flags is set in the
163printcap entry and the original filter specification does not have
164a `$` in it,
165this option string is appended to a filter specification,
166and the string expanded with values from the printcap information
167and job information.
168(see of_filter_options, filter_options, bk_filter_options, bk_of_filter_options)
169.TP
170\fBbk_of_filter_options\fR
171(default: "$w $l $x $y")
172If the "bkf" (backwards compatible filter) flags is set in the
173printcap entry and the original filter specification does not have
174a `$` in it,
175this option string is appended to the OF filter specification,
176and the string expanded with values from the printcap information
177and job information.
178(see of_filter_options, filter_options, bk_filter_options, bk_of_filter_options)
179.TP
180\fBcheck_for_nonprintable\fR (default: "")
181(Used by LPR) check f and p formats
182for non_printable characters unless
183\fB\-b\fR (binary)
184or
185\fB\-l\fR (literal)
186command_line option is supplied. Note that
187files containing HPGL or other printer control
188languages would often be classed as ``non_printable''.
189.TP
190\fBconnect_grace\fR (default: 0 seconds)
191The time to pause before opening a new connection to a printer.
192This allows the printer time to recover from the previous job.
193.TP
194\fBconnect_interval\fR (default: 10 (seconds))
195The time to pause after a failed connection or open
196of the printing device before attempting a new connection or open.
197.TP
198\fBconnect_timeout\fR (default: 10 (seconds))
199The time to wait for a device open or connection to complete.
200A zero value is infinite timeout.
201.TP
202\fBretry_nolink\fR (default: true)
203When TRUE and the LPD server is printing or transfering a job,
204then an indefinate number of attempts to connect to or open the IO device
205will be made.
206.TP
207\fBdefault_banner_printer\fR (default: "")
208The default banner printer program to be used for printing banners.
209This should be specified in the LPD configuration file.
210.TP
211\fBdefault_format\fR (default: "f")
212Default format for printing jobs.
213.TP
214\fBdefault_logger_port\fR
215(default: 2001)
216specifies a default port number for logger information.
217See logger_destination for details.
218.TP
219\fBdefault_logger_protocol\fR
220(default: UDP)
221specifies a default protocol for logger information.
222See logger_destination for details.
223.TP
224\fBdefault_permission\fR (default: ACCEPT)
225Default permission for operations.
226.TP
227\fBdefault_printer\fR (default: "")
228The default printer to use if there is no
229PRINTER environment variable,
230the user has not specified a printer,
231or there is no printcap information.
232.TP
233\fBdefault_priority\fR (default: "A")
234Default priority (class) for printing jobs.
235This is also used as the job class.
236.TP
237\fBdefault_remote_host\fR (default: "%H")
238The default remote host to use.
239.TP
240\fBdefault_tmp_dir\fR (default: /tmp)
241Directory for temporary files.
242.TP
243\fBdomain_name\fR (default: "")
244This parameter is optional, and is appended to
245the hostname to make it into a fully_qualified
246domain name, ie. \fIclass.iona.ie\fR. It will only
247be used if the software cannot determine the domain name
248using other means, such as \fBgethostbyname(3n)\fR.
249.TP
250\fBff\fR (default: \\f)
251Formfeed string.
252.TP
253\fBfilter_ld_path\fR
254(default: /lib:/usr/lib:/usr/5lib:/usr/ucblib)
255The value for the environment variable LD_LIBRARY_PATH, 
256both used when executing, and passed on to filters.
257This variable is used to find shared libraries on
258SunOS, Solaris and Linux.
259.TP
260\fBfilter_options\fR
261(default: "$C $F $H $J $L $P $Q $R $Z
262$a $c $d $e $f $h $i $j $k $l $n $p $r $s $w $x $y $-a")
263If the "bkf" (backwards compatible filter) flags is not set in the
264printcap entry and the original filter specification does not have
265a `$` in it,
266this option string is appended to a filter specification,
267and the string expanded with values from the printcap information
268and job information.
269(see of_filter_options, filter_options, bk_filter_options, bk_of_filter_options)
270.TP
271\fBfilter_path\fR
272(default: /bin:/usr/bin:)
273The value for the environment variable PATH, both used to find filters
274and passed on to filters run by \fBlpd\fR and \fBlpr\fR.
275.TP
276\fBforce_poll\fR (default: no)
277Some software packages put print jobs directly into the spool queues.
278The
279\fBforce_poll\fR flag forces lpd to periodically poll spool queues
280looking for jobs and no server.
281The
282\fBpoll_time\fR variable sets the interval between polls.
283.TP
284\fBfull_time\fR (default: no)
285Use full time and date format in logging and error messages.
286.TP
287\fBfx\fR (default: "")
288See \fBprintcap\fP(5) for details.
289This specifies the job formats allowed for this queue.
290.TP
291\fBgroup\fR (default "daemon")
292The group to use for file ownership and process permissions.
293Used only by lpd;
294this can be the name of a group or a number.
295All filters will run as the specified group.
296Note that if the group value is 0,
297then the real user group of the process at startup will be used.
298.TP
299\fBkerberos_keytab\fR (default "/etc/lpd.keytab")
300The keytab file to be used by the LPD server when using
301built-in kerberos authentication.
302The keytab file should be owned by the LPD server,
303and be readable/writable only by it (i.e. - 600 permissions).
304.TP
305\fBkerberos_life\fR (default NULL)
306The lifetime of a Kerberos ticket.
307NULL selects the default lifetime.
308Time should be specified using the standard Kerberos time representations.
309.TP
310\fBkerberos_forward_principal\fR (default NULL)
311remote principal used by server when forwarding
312.TP
313\fBkerberos_renew\fR (default NULL)
314The renewal of a Kerberos ticket.
315NULL selects a non-renewable ticket.
316Time should be specified using the standard Kerberos time representations.
317.TP
318\fBkerberos_server_principal\fR (default "lpr")
319Server principal used when client sending to server or
320when server is originating connection to another server for forwarding.
321.TP
322\fBkerberos_service\fR (default "lpr")
323The service name used to make requests to the LPD server
324when using kerberos authentication.
325For example,
326if kerberos_service has the value lpr,
327the server is on host alpha.com,
328and the kerberos domain is ALPHA.COM,
329then the kerberos principal name would be:
330.br
331lpr/alpha.com@ALPHA.COM.
332.br
333.TP
334\fBla\fR (default: yes)
335See \fBprintcap\fP(5) for details.
336.TP
337\fBlf\fR (default: log)
338Name of the log file.
339.TP
340\fBlo\fR (default: lock)
341Name of the lock file.
342.TP
343\fBlocalhost\fR
344(default "localhost")
345The name of the localhost entry to be used for the TCP/IP
346loopback interface.
347The TCP/IP connection may originate from the local host;
348use this name to check to see if the local host address
349is in the IP address database,
350and use it as the origination address for local connections.
351This is done to avoid problems with multi-homed hosts
352who originate connections from different interfaces.
353.TP
354\fBlockfile\fR (default: /var/spool/lpd/lpd)
355The file used to indicate the presence of an \fBlpd\fR
356server running on the host.  The lpd_port value is appended
357to the lockfile value to provide a unique lockfile
358even when different versions of LPRng are running
359on the same system.
360.TP
361\fBlogger_destination\fR
362(default: "")
363This specifies a destination for logger information generated by the lpd server.
364The formation of the destination specification is
365host[%port][,(TCP|UDP)].
366For example, 
367localhost%2001,UDP would send logger information to the localhost IP address,
368on port 2001 using the UPD protocol.
369The default port and protocol are set by the
370default_logger_port and default_logger_protocol configuration variables respectively.
371.TP
372\fBlongnumber\fR
373(default: no)
374RFC1179 requires 3 digit job numbers;
375setting longnumber to yes allows 6 digit numbers.
376If the backwards_compatible flag is set,
377only 3 digit numbers will be used.
378.TP
379\fBlpd_port\fR (default: \fIprinter\fR)  [ipaddr%]port
380The port that \fBlpd\fR binds to, and that \fBlpr\fR and
381the other client programs send their requests to.
382The specification has the format ipaddr%port.
383If the ipaddress is specified then a bind to only this address and
384port is done.
385If the port value is not a number
386a service lookup is performed and the corresponding
387service port is used; see services(5).
388This parameter is useful for debugging a new
389installation of LPRng, in that running LPRng on
390a different port from the default will not
391interfere with a previous installation of
392LPD or LPRng.
393.TP
394\fBlpd_printcap_path\fR (default: "")
395The location of
396.B lpd
397server only printcap database information.
398If this is nonblank the \fBprintcap_path\P will not be used by the
399.B lpd
400server.
401.TP
402\fBmail_operator_on_error\fR (default: "")
403Put this person on the CC-list of the mail, if it is not
404a success mail. (So in addition to the person who made the
405printer request, also this person gets error messages, but
406no success messages.)
407.TP
408\fBmax_status_line\fR (default: 79)
409An integer value specifying the numbers of characters to be
410used for displaying simple job status;  this includes the queue position,
411job identifier,  job contents, size, and time.
412A 0 (zero) value indicates no restrictions.
413.TP
414\fBmax_status_size\fR (default: 10 (Kbytes))
415An integer value specifying (in K bytes)
416the maximum size of the status file
417to be generated during printing operations.
418A 0 value will create unlimited size status files.
419When the file size exceeds this value,
420it is truncated to
421.B min_status_size
422K bytes.
423.TP
424\fBmc\fR (default: 1)
425See \fBprintcap\fP(5) for details.
426.TP
427\fBmin_status_size\fR (default: 0 (Kbytes))
428Minimum status size.
429If 0, defaults to 20 percent of max_status_size.
430.TP
431\fBminfree\fR (default: 0)
432The amount of free space (in Kbytes)
433needed in the spool directory in order
434for a job to be accepted.
435If 0, there is no limit;
436if the parameter is the name of a file rather than a number,
437the file must contain a numerical minimum free value (in Kbytes).
438This value is overriden by the printcap
439.I mi
440field value.
441.TP
442\fBms_time_resolution\fR
443(default: FALSE)
444This flag causes the time information to be printed to millisecond
445accuracy.
446This is overkill for most purposes.
447.TP
448\fBof_filter_options\fR
449(default: "")
450If this is not set,
451the value defaults to the same as the filter_options value.
452This string is appended to a OF filter specification,
453and the string expanded with values from the printcap information
454and job information.
455If the "bkf" (backwards compatible filter) flags is set in the
456printcap entry,
457of bk_of_filter_options value is appended instead
458(see of_filter_options, filter_options, bk_filter_options, bk_of_filter_options)
459.TP
460\fBoriginate_port\fR
461(default: "721 731")
462A range of port numbers to orginate requests from.
463When sending service requests,
464the software will try to open and bind to these ports to
465originate a request to a server.
466If no port is given,
467or all of the requested ports are unavailable or cannot be
468bound to,
469then a normal use port is requested.
470Note that on UNIX systems,
471if a port in the range 0-1023 is requested the EUID of the
472process must be root for the request to be granted.
473Note that RFC1179 specifies that requests must
474originate from ports in the range 721-731.
475.TP
476\fBpass_env\fR
477(default: "PGPPASS,PGPPATH")
478Client programs such as LPR, LPC, etc., will pass these
479environment variables to any filter programs they start.
480.TP
481\fBpoll_time\fR (default: 6000)
482Interval in seconds at which LPD checks for queues with jobs and no
483server active.
484See 
485\fBforce_poll\fR as well.
486.TP
487\fBpl\fR (default: 66)
488See \fBprintcap\fP(5) for details.
489.TP
490\fBpr\fR (default: /bin/pr)
491See \fBprintcap\fP(5) for details.
492.TP
493\fBprintcap_path\fR
494(default: "_PRINTCAP_PATH_")
495The location of the printcap database file.
496If a file or filter does not exist, it is considered a fatal error.
497All valid entries in these files will be used.
498See PRINTCAP LOOKUP for details.
499.TP
500\fBperms_path\fR
501(default: /etc/lpd.perms:/usr/etc/lpd.perms:/var/spool/lpd/lpd.perms.%h)
502The location of the printer permissions database.
503If a file or filter does not exist, it is skipped.
504The first file or filter that exists and is readable will be used.
505See PERMISSIONS LOOKUP for details.
506.TP
507\fBpw\fR (default: 80)
508See \fBprintcap\fP(5) for details.
509.TP
510\fBsave_on_error\fR
511(default: no)
512Save a job in the spool queue if it has an error
513rather than removing it.
514.TP
515\fBsave_when_done\fR
516(default: no)
517Save a job in the spool queue after completion
518rather than removing it.
519.TP
520\fBsend_data_first\fR
521(default: no)
522Send data files of a job first,
523followed by the control file.
524.TP
525\fBsend_failure_action\fR (default: "")
526The lpd server uses this to determine the action to take when
527unable to print or process a job.
528The keyword
529\fIabort\fR
530will cause it to terminate operations,
531leaving the job in the queue,
532\fIremove\fR
533will cause it to remove the job,
534\fIretry\fR
535will cause it to retry the job,
536and
537\fIhold\fR
538will cause it to hold the job with an error indication.
539If the value is a filter,
540then the filter will be invoked and the exit status of the
541filter used to determine the actions.
542.TP
543\fBsend_job_rw_timeout\fR (default: 6000)
544When printing or sending a job to a remote printer,
545use this as a write to the device or remote host timeout value.
546If a timeout occurs,
547then a FAIL status is returned and
548the send_failure_action value is used to determine what to do on failure.
549.TP
550\fBsend_try\fR (default: 3)
551Numbers of times to try to send a job to the printer or remote host.
552A 0 value means an infinite number of times.
553.TP
554\fBsendmail\fR (default: "/usr/lib/sendmail -oi -t")
555If the argument is empty then all mail_related
556functionality is disabled.
557The arguments are the command to run
558when mail is to be sent.
559The command used needs to be able to
560accept the message on stdin, with \fIno\fR arguments.
561The message will contain the \fBTo:\fR, \fBFrom:\fR,
562\fBCc:\fR and \fBSubject:\fR headers.
563.TP
564\fBserver_tmp_dir\fR (default: /tmp)
565Temporary dir for the server.
566.TP
567\fBspool_dir_perms\fR (default: 042700)
568Permissions of the spool directories.
569.TP
570\fBspool_file_perms\fR (default: 0600)
571Permissions of the spool files.
572.TP
573\fBsyslog_device\fR (default: /dev/console)
574Log to this device if all else fails.
575.TP
576\fBuse_date\fR (default: no)
577No information about this parameter available.
578.TP
579\fBuse_identifier\fR (default: no)
580Add a job identifier line to the control file,
581using the 'A' entry in the control file.
582.TP
583\fBuse_info_cache\fR (default: yes)
584If this is set to \fIyes\fR, lpd.perms and printcap information
585lookups will be cached for later use.
586Only lookups in the main databases will be cached,
587not lookups in the per_printer databases.
588You can force
589the \fBlpd\fR to flush its cache and reread the
590permissions file by sending it a SIGHUP.
591.TP
592\fBuse_queuename\fR (default: no)
593Put an entry into control files identifying the spool queue
594the job was originally sent to.
595The entry has the form 'Qspoolname',
596and its value can be passed to filters.
597This is useful for setting up a spool queue which formats
598jobs in different ways,
599depending on the name of the queue.
600.TP
601\fBuse_shorthost\fR (default: no)
602By default, names of lpr job files used the
603originating host fully qualified domain name.
604This can exceed 14 characters,
605the limit of file names on some UNIX systems.
606If this is set to \fIyes\fR, the non-qualified name will be used,
607and if the host name is at most 8 characters the file name will be at
608most 14 characters long.
609.TP
610\fBuser\fR (default: daemon)
611The user that \fBlpd\fR and its filters runs as,
612and the owner of the spool directories and
613other lpd_writable files.
614This can be the name of a user or a number.
615If the user value is 0,
616then the real UID of the program when started will be used.
617This allows a non_root user to test the functionality
618of the LRPng software.
619
620.SH "PRINTCAP LOOKUP, DATABASE FILES AND FILTERS"
621.PP
622The printcap_path 
623and
624printer_perms_path
625variables specify a list of either data base files or filters to use to
626get printcap or permission entries for a printer.
627To get information,
628the filter is started and a single line with the printer name is
629sent to it.
630Note that the printer name
631.I all
632is used to request information either about all printers,
633or a specific printer entry that has a list of
634all printers.
635See
636.BR printcap (5)
637for more details.
638.PP
639To find the printcap information,
640LPRng programs will read the database files specified in the
641.I printcap_path
642entry.
643The
644.I lpd
645server will read any additional files specified in the
646.I lpd_printcap_path
647entry.
648If any of the files is missing or non-readable a fatal error will result.
649After having searched the various files,
650if a filter has been specified the filter will be started and
651the required printer name will be sent to the filter.
652The output from the filter will be used as the printcap information.
653.SH "SECURITY-RELATED PARAMETERS"
654.PP
655Environment variables are sanitized by \fBlpd\fR and the other
656executables, in that the variables \fIIFS\fR, \fILD_PRELOAD\fR
657and \fILD_PROFILE\fR are all deleted from the environment passed
658to filters and any other sub_processes.
659For more reliability,
660script filters should set their own
661PATH and LD_LIBRARY_PATH variables.
662.PP
663All filters will run as the user and group specified by the
664group and user variables.
665
666.SH EXAMPLE
667.nf
668# lpd.conf generated from  on Wed Apr  7 07:59:48 PDT 1999
669
670#   The values in this file are the default values.
671#   If you modify the file,  set the value to something other than the default
672#   For example, '# default force_localhost' means
673#     the 'force_localhost' option value is on or 1.
674#   Uncomment this and change it to read 'force_localhost@'
675
676# Purpose: always print banner, ignore lpr -h option 
677#   default ab@
678# Purpose: query accounting server when connected 
679#   default achk@
680# Purpose: accounting at end (see also af, la, ar, as) 
681#   default ae=jobend $H $n $P $k $b $t
682# Purpose: name of accounting file (see also la, ar) 
683#   default af=
684af=acct
685# Purpose: automatically hold all jobs 
686#   default ah@
687ah
688# Purpose: Allow duplicate command line arguments (legacy requirement) 
689#   default allow_duplicate_args@
690.fi
691.SH FILES
692.PP
693The files used by LPRng are set by values in the
694printer configuration file.
695The following are a commonly used set of default values.
696.nf
697.ta \w'/var/spool/lpd/printcap.<hostname>           'u
698_LPD_CONF_PATH_	LPRng configuration file
699${HOME}/.printcap	user printer description file
700_PRINTCAP_PATH_	printer description file
701_LPD_PERMS_PATH_	permissions
702_LOCKFILE_	lock file for queue control
703/var/spool/lpd		spool directories
704/var/spool/lpd/QUEUE/control	queue control
705/var/spool/lpd/QUEUE/log	trace or debug log file
706/var/spool/lpd/QUEUE/acct	accounting file
707/var/spool/lpd/QUEUE/status	status file
708.fi
709.SH "SEE ALSO"
710lpc(8),
711lpd(8),
712checkpc(8),
713lpr(1),
714lpq(1),
715lprm(1),
716printcap(5),
717lpd.perms(5),
718pr(1), lprng_certs(1), lprng_index_certs(1).
719.SH DIAGNOSTICS
720.nf
721Most of the diagnostics are self explanatory.
722If you are puzzled over the exact cause of failure,
723set the debugging level on (-D5) and run again.
724The debugging information will 
725help you to pinpoint the exact cause of failure.
726.fi
727.SH "HISTORY"
728LPRng is a enhanced printer spooler system
729with functionality similar to the Berkeley LPR software.
730The LPRng mailing list is lprng@lprng.com;
731subscribe by sending mail to lprng-request@lprng.com with
732the word subscribe in the body.
733The software is available from ftp://ftp.lprng.com/pub/LPRng.
734.SH "AUTHOR"
735Patrick Powell <papowell@lprng.com>.
736