# NAME # lpd.conf - configuration file for the LPRng line printer spooler system # # DESCRIPTION # The file lpd.conf is used to provide configuration information for the # LPRng Printer spooler system and defaults for printcap information. Lead- # ing spaces on lines are ignored, and blank lines and lines whose first non- # blank character is a sharp (``#'') are ignored. Trailing blanks and tabs # (whitespace) for an option value are deleted unless the last one is escaped # with a backslash (``\''). All other lines specify parameters and should be # of the following form: # keyword # keyword@ # keyword#value # keyword=value # Note that these values are the same format as printcap(5) values. Values # in the configuration can contain host or machine dependent information; to # assist with this, the following escape sequences in the configuration # information are replaced as follows: # # %h the short form of the host name (i.e.- non fully qualified). # # %H the fully qualified host name. # # %a the abbreviated architecture name, sun4, sol2, hpux, aix, irix5, etc. # This value can be set using the architecture keyword in the configura- # tion file and is set to a default value at compile_time. # # %P the printer name from the printcap entry (see below). # # %R the remote printer name from the printcap entry. # # %M the remote host name from the printcap entry. This is truncated to # the short host name. # # For example, on host dickory.sdsu.edu, the strings short=%h long=%H arch=%a # would be expanded as short=dickory long=dickory.sdsu.edu arch=sun4 . # # The P, R, and M tags are provided for use with combined configuration and # printcap information. These values are not expanded when the printcap # information is initially processed, and can be used only in a limited # number of printcap or other entries. Currently only the printcap :sd: # (spool directory) and :forward_server: (forward server) entries use these. # # GENERAL CONFIGURATION PARAMETERS # # Some of the following paramters take lists of files or directories. Unless # otherwise explicitly stated, these lists can be separated by commas (,), # semicolons (;), or colons, (punctuation) and possibly tabs or spaces (whi- # tespace) as well. # # Keyword names can use either underscores (_) or hyphens (-) in their names, # but the underscore is preferred. # # include (no default) # This can be used to include files into the lpd.conf file. The include # file parameter can be a punctuation or whitespace separated list of # files; the files must have absolute pathnames and must be readable. # # ae (default: "jobend $H $n $P $k $b $t") # This specifies either a script or a filter to be invoked at the send # of a job for accounting purposes. See as for the matching accounting # at start, and the printcap(5) and lpd(8) man pages for details. # # allow_getenv (default: "LPD_CONF") # This option specifies an enviorinment variable whose value is a confi- # guration file. Use of this is restricted to test purposes, and SUID # ROOT client and server will not run when the variable is enabled. # # ar (default: yes) # See printcap(5) for details. # # architecture # The default value is set at compile time and can be overwritten with # this parameter. The default value of this parameter is set at compile # time and it is used when expanding the special sequence %a in pathname # and filename strings in this config file. # # as (default: "jobstart $H $n $P $k $b $t") # See as. # # bk (default: no) # See printcap(5) for details. # # bk_filter_options # (default: "$P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a") If the "bkf" # (backwards compatible filter) flags is set in the printcap entry and # the original filter specification does not have a `$` in it, this # option string is appended to a filter specification, and the string # expanded with values from the printcap information and job informa- # tion. (see of_filter_options, filter_options, bk_filter_options, # bk_of_filter_options) # # bk_of_filter_options # (default: "$w $l $x $y") If the "bkf" (backwards compatible filter) # flags is set in the printcap entry and the original filter specifica- # tion does not have a `$` in it, this option string is appended to the # OF filter specification, and the string expanded with values from the # printcap information and job information. (see of_filter_options, # filter_options, bk_filter_options, bk_of_filter_options) # ##check_for_nonprintable ## May not need this: we do checks in /usr/sms/bin/lpr and in /usr/sms/share/LPRng/etc/ifilter # check_for_nonprintable (default: "") # (Used by LPR) check f and p formats for non_printable characters # unless -b (binary) or -l (literal) command_line option is supplied. # Note that files containing HPGL or other printer control languages # would often be classed as ``non_printable''. # # client_auth_command (defaults: "") # The default authorization command for a client to use. # # connect_grace (default: 0 seconds) # The time to pause before opening a new connection to a printer. This # allows the printer time to recover from the previous job. # # connect_interval (default: 10 (seconds)) # The time to pause after a failed connection or open of the printing # device before attempting a new connection or open. # # connect_timeout (default: 10 (seconds)) # The time to wait for a device open or connection to complete. A zero # value is infinite timeout. # # retry_nolink (default: true) # When TRUE and the LPD server is printing or transfering a job, then an # indefinate number of attempts to connect to or open the IO device will # be made. # # default_auth (default: "") # The default authentication type to be used when requested by a user. # See the use_auth entry. # ##default_banner_printer /usr/sms/share/LPRng/bin/lpbanner ## Do not want any banners (other than given by /usr/sms/share/LPRng/etc/ifilter) # default_banner_printer (default: "") # The default banner printer program to be used for printing banners. # This should be specified in the LPD configuration file. # # default_format (default: "f") # Default format for printing jobs. # # default_logger_port # (default: 2001) specifies a default port number for logger informa- # tion. See logger_destination for details. # # default_logger_protocol # (default: UDP) specifies a default protocol for logger information. # See logger_destination for details. # # default_permission (default: ACCEPT) # Default permission for operations. # # default_printer (default: "") # The default printer to use if there is no PRINTER environment vari- # able, the user has not specified a printer, or there is no printcap # information. # # default_priority (default: "A") # Default priority (class) for printing jobs. This is also used as the # job class. # # default_remote_host (default: "%H") # The default remote host to use. # default_tmp_dir /usr/tmp # default_tmp_dir (default: /tmp) # Directory for temporary files. # # domain_name (default: "") # This parameter is optional, and is appended to the hostname to make it # into a fully_qualified domain name, ie. class.iona.ie. It will only be # used if the software cannot determine the domain name using other # means, such as gethostbyname(3n). # # ff (default: # Formfeed string. # filter_ld_path "" # filter_ld_path # (default: /lib:/usr/lib:/usr/5lib:/usr/ucblib) The value for the # environment variable LD_LIBRARY_PATH, both used when executing, and # passed on to filters. This variable is used to find shared libraries # on SunOS, Solaris and Linux. # # filter_options "$A $B $C $D $E $F $G $H $I $J $K $L $M $N $O $P $Q $R $S $T $U $V $W $X $Y $Z $a $b $c $d $e $f $g $h $i $j $k $l $m $n $o $p $q $r $s $t $u $v $w $x $y $z" filter_options $C $F $H $J $L $P $Q $R $Z $a $b $c $d $e $f $h $i $j $k $l $m $n $p $r $s $t $w $x $y # Note: If we made filter_options a single (quoted) string, then filters # would get all options as a single argument, bracketed by underscores # (e.g. '-L_psz_', because all 'funny' characters are replaced). # filter_options # (default: "$C $F $H $J $L $P $Q $R $Z $a $c $d $e $f $h $i $j $k $l $n # $p $r $s $w $x $y $-a") If the "bkf" (backwards compatible filter) # flags is not set in the printcap entry and the original filter specif- # ication does not have a `$` in it, this option string is appended to a # filter specification, and the string expanded with values from the # printcap information and job information. (see of_filter_options, # filter_options, bk_filter_options, bk_of_filter_options) # # The options for the filter command line will be replaced by # appropriate values. Specifications have the form $[0| ][-][']X. # The default option expansion has the form $X -> -X'value'; the # form $0X or $(space)X adds a space after the -X, i.e. $0X -> -X # 'value'; the form $-X suppresses the -X, i.e. $-X -> 'value'; and # the form $'X' suppresses the quotes around the value. Note that the # 0,-, and ' can be combined. For example, $-'X -> value. # Seems that null values are not passed to the filter. # The options will be expanded as follows: # Key Value # a Accounting file (printcap 'af') # b Job size, i.e. total data file size, in bytes # c if binary (format 'l') expands to -c # d Control directory # e job data file # f original print file name (== N) # h hostname (== H) # i indent (== I) # j job number from control file name # k Control file name # l printcap Page length (pl) value # m printcap Cost factor (co) value # n user logname (== P, also == L??) # p Remote Printer name for forwarded jobs (== P ??) # r Remote Host name for forwarded jobs # s printer Status file (ps) value # t current time in simple format # w printcap Page width (pw) value # x printcap x dimension (px) value # y printcap y dimension (py) value # C class # F data file format character # H hostname # J jobname # L username (?) # P Printer name # S printcap Comment tag (cm) value # 0-9 control file line starting with digit # A-Z control file line starting with letter. These seem to be (in # conflict with stuff above): # A Job identifier controlled by the use_identifier variable. # C Class String to be used for the class line on the burst page. # H Host Name. Name of the machine where lpr was invoked. # I Indent. The number of characters to indent the output by (in ascii). # J Job Name. String to be used for the job name on the burst page. # L Banner user name. Information for banner page. # P Person. Login name of the person who invoked lpr. This is used to verify ownership by lprm. # M Send mail to the specified user when the current print job completes. # N File name. The original name of a data file which is in the job. # T Title. String to be used as the title for pr(1) when the LPR -p option was specified. # U Unlink. Job file to remove when printing completed. # W Width. The page width (in characters) to used for printing. # Z zoptions. Options passed by lpr -Zzoptions. These are passed to output filters to aid in printing. # filter_path / # filter_path # (default: /bin:/usr/bin:/usr/ucb:/usr/sbin:/usr/etc:/etc) The value # for the environment variable PATH, both used to find filters and # passed on to filters run by lpd and lpr. # fix_bad_job yes ## The default for fix_bad_job seems to be 'no'. ## Need it to replace '~' by '_' in PC spool file names, or ## get errors like "bad job line 'NC:/SPOOL/~LP00045.TMP'". # fix_bad_job (default: yes) # Fix a bad job file - usually by ignoring multiple U (unlink) entries, # badly formatted file names, or other common botches produced by vari- # ous PC based LPR clients. # force_poll yes # force_poll (default: no) # Some software packages put print jobs directly into the spool queues. # The force_poll flag forces lpd to periodically poll spool queues look- # ing for jobs and no server. The poll_time variable sets the interval # between polls. # # forward_auth (default use_auth value) # Server uses authentication when forwarding a command. Only done if # the original command was authenticated. # ## full_time yes # full_time (default: no) # Use full time and date format in logging and error messages. # # fx (default: flp) # See printcap(5) for details. # group lprngd # group (default "daemon") # The group to use for file ownership and process permissions. Used # only by lpd; this can be the name of a group or a number. All filters # will run as the specified group. Note that if the group value is 0, # then the real user group of the process at startup will be used. # # kerberos_keytab (default "/etc/lpd.keytab") # The keytab file to be used by the LPD server when using built-in ker- # beros authentication. The keytab file should be owned by the LPD # server, and be readable/writable only by it (i.e. - 600 permissions). # # kerberos_life (default NULL) # The lifetime of a Kerberos ticket. NULL selects the default lifetime. # Time should be specified using the standard Kerberos time representa- # tions. # # kerberos_renew (default NULL) # The renewal of a Kerberos ticket. NULL selects a non-renewable # ticket. Time should be specified using the standard Kerberos time # representations. # # kerberos_service (default "lpr") # The service name used to make requests to the LPD server when using # kerberos authentication. For example, if kerberos_service has the # value lpr, the server is on host alpha.com, and the kerberos domain is # ALPHA.COM, then the kerberos principal name would be: # lpr/alpha.com@ALPHA.COM. # # la (default: yes) # See printcap(5) for details. # # lf (default: log) # Name of the log file. # # lo (default: lock) # Name of the lock file. # # localhost # (default "localhost") The name of the localhost entry to be used for # the TCP/IP loopback interface. The TCP/IP connection may originate # from the local host; use this name to check to see if the local host # address is in the IP address database, and use it as the origination # address for local connections. This is done to avoid problems with # multi-homed hosts who originate connections from different interfaces. # lockfile /var/spool/LPRng/lpd.lock.%h # lockfile (default: /var/spool/lpd/lpd.lock.%h) # The file used to indicate the presence of an lpd server running on the # host. # logfile /var/spool/LPRng/lpd.log # logfile # (default: /var/spool/lpd/lpd.log.%h) The file that lpd initially logs # debugging and informational messages to. Individual printcap entries # can also specify log files for each printer. # ##logger_destination siv%514,UDP ## We do not really want this: logs each file being printed, ## but is not very informative # logger_destination # (default: "") This specifies a destination for logger information gen- # erated by the lpd server. The formation of the destination specifica- # tion is host[%port][,(TCP|UDP)]. For example, localhost%2001,UDP # would send logger information to the localhost IP address, on port # 2001 using the UPD protocol. The default port and protocol are set by # the default_logger_port and default_logger_protocol configuration # variables respectively. # # longnumber # (default: no) RFC1179 requires 3 digit job numbers; setting longnumber # to yes allows 6 digit numbers. If the backwards_compatible flag is # set, only 3 digit numbers will be used. # ##lpd_port 5515 # lpd_port (default: printer) # The port that lpd binds to, and that lpr and the other client programs # send their requests to. If this is numeric and within the valid IP # port range, that port number is used; otherwise, a service lookup is # performed and the corresponding service port is used; see services(5). # This parameter is useful for debugging a new installation of LPRng, in # that running LPRng on a different port from the default will not # interfere with a previous installation of LPD or LPRng. # lpd_printcap_path /usr/sms/share/LPRng/etc/lpd_printcap # lpd_printcap_path (default: "/etc/lpd_printcap:/usr/etc/lpd_printcap") # The location of additional lpd server printcap database information. # This list is searched after the printcap_path list is searched. See # PRINTCAP LOOKUP for details. # mail_operator_on_error psz # mail_operator_on_error (default: "") # Put this person on the CC-list of the mail, if it is not a success # mail. (So in addition to the person who made the printer request, also # this person gets error messages, but no success messages.) # # max_status_line (default: 79) # An integer value specifying the numbers of characters to be used for # displaying simple job status; this includes the queue position, job # identifier, job contents, size, and time. A 0 (zero) value indicates # no restrictions. # max_status_size 50 # max_status_size (default: 10 (Kbytes)) # An integer value specifying (in K bytes) the maximum size of the # status file to be generated during printing operations. A 0 value # will create unlimited size status files. When the file size exceeds # this value, it is truncated to min_status_size K bytes. # # mc (default: 1) # See printcap(5) for details. # min_status_size 25 # min_status_size (default: 0 (Kbytes)) # Minimum status size. If 0, defaults to 20 percent of max_status_size. # minfree 100000 # minfree (default: 0) # The amount of free space (in Kbytes) needed in the spool directory in # order for a job to be accepted. If 0, there is no limit; if the # parameter is the name of a file rather than a number, the file must # contain a numerical minimum free value (in Kbytes). This value is # overriden by the printcap mi field value. # # ms_time_resolution # (default: FALSE) This flag causes the time information to be printed # to millisecond accuracy. This is overkill for most purposes. # # of_filter_options # (default: "") If this is not set, the value defaults to the same as # the filter_options value. This string is appended to a OF filter # specification, and the string expanded with values from the printcap # information and job information. If the "bkf" (backwards compatible # filter) flags is set in the printcap entry, of bk_of_filter_options # value is appended instead (see of_filter_options, filter_options, # bk_filter_options, bk_of_filter_options) # # originate_port # (default: "721 731") A range of port numbers to orginate requests # from. When sending service requests, the software will try to open # and bind to these ports to originate a request to a server. If no # port is given, or all of the requested ports are unavailable or cannot # be bound to, then a normal use port is requested. Note that on UNIX # systems, if a port in the range 0-1023 is requested the EUID of the # process must be root for the request to be granted. Note that RFC1179 # specifies that requests must originate from ports in the range 721- # 731. # # pass_env # (default: "PGPPASS,PGPPATH") Client programs such as LPR, LPC, etc., # will pass these environment variables to any filter programs they # start. # poll_time 600 # poll_time (default: 6000) # Interval in seconds at which LPD checks for queues with jobs and no # server active. See force_poll as well. # # pl (default: 66) # See printcap(5) for details. # # pr (default: /bin/pr) # See printcap(5) for details. # printcap_path /usr/sms/share/LPRng/etc/printcap # printcap_path # (default: "etc/printcap:/usr/etc/printcap:/var/spool/lpd/printcap.%h") # The location of the printcap database information. If a file or # filter does not exist, it is skipped. All valid entries in these # files will be used. See PRINTCAP LOOKUP for details. # perms_path /usr/sms/share/LPRng/etc/lpd.perms # perms_path # (default: # /etc/lpd.perms:/usr/etc/lpd.perms:/var/spool/lpd/lpd.perms.%h) The # location of the printer permissions database. If a file or filter # does not exist, it is skipped. The first file or filter that exists # and is readable will be used. See PERMISSIONS LOOKUP for details. # # pw (default: 80) # See printcap(5) for details. # # remote_user (default: "") # The authentication information name of the remote server. If no value # provided for this name, the default is the "user" value. This name # can have a %X field which is expanded in the same manner as the confi- # guration information. # # save_on_error # (default: no) Save a job in the spool queue if it has an error rather # than removing it. # # save_when_done # (default: no) Save a job in the spool queue after completion rather # than removing it. # # send_data_first # (default: no) Send data files of a job first, followed by the control # file. # # send_failure_action (default: "") # The lpd server uses this to determine the action to take when unable # to print or process a job. The keyword abort will cause it to ter- # minate operations, leaving the job in the queue, remove will cause it # to remove the job, retry will cause it to retry the job, and hold will # cause it to hold the job with an error indication. If the value is a # filter, then the filter will be invoked and the exit status of the # filter used to determine the actions. # send_job_rw_timeout 604800 ## A week: we do not want things to time out, ever. ## Once stlw ran out of paper in the afternoon, and was not ## filled until the morning. We do not want to lose jobs. ## (In fact jobs sent to the printer in the morning were ## also lost: printer bug/confusion?) # send_job_rw_timeout (default: 6000) # When printing or sending a job to a remote printer, use this as a # write to the device or remote host timeout value. If a timeout # occurs, then a FAIL status is returned and the send_failure_action # value is used to determine what to do on failure. # # send_try (default: 3) # Numbers of times to try to send a job to the printer or remote host. # A 0 value means an infinite number of times. # sendmail "" # sendmail (default: "/usr/lib/sendmail -oi -t") # If the argument is empty then all mail_related functionality is dis- # abled. The arguments are the command to run when mail is to be sent. # The command used needs to be able to accept the message on stdin, with # no arguments. The message will contain the To:, From:, Cc: and Sub- # ject: headers. # # server_auth_command (default: "") # The authentication program to be used by the server. # server_tmp_dir /usr/tmp # server_tmp_dir (default: /tmp) # Temporary dir for the server. # server_user lprngd # server_user (default: "daemon") # The authentication userid for a server. Note that this entry will # have %P, %R, %M keys replaced by the printer, remote printer, and # remote host names. # # spool_dir_perms (default: 042700) # Permissions of the spool directories. # # spool_file_perms (default: 0600) # Permissions of the spool files. # syslog_device /dev/log # syslog_device (default: /dev/console) # Log to this device if all else fails. # # use_auth (default: "") # The authenication type to be used when sending a command. # # use_date (default: no) # No information about this parameter available. # # use_identifier (default: no) # Add a job identifier line to the control file, using the 'A' entry in # the control file. # # use_info_cache (default: yes) # If this is set to yes, lpd.perms and printcap information lookups will # be cached for later use. Only lookups in the main databases will be # cached, not lookups in the per_printer databases. You can force the # lpd to flush its cache and reread the permissions file by sending it a # SIGHUP. # use_queuename yes # use_queuename (default: no) # Put an entry into control files identifying the spool queue the job # was originally sent to. The entry has the form 'Qspoolname', and its # value can be passed to filters. This is useful for setting up a spool # queue which formats jobs in different ways, depending on the name of # the queue. # # use_shorthost (default: no) # By default, names of lpr job files used the originating host fully # qualified domain name. This can exceed 14 characters, the limit of # file names on some UNIX systems. If this is set to yes, the non- # qualified name will be used, and if the host name is at most 8 charac- # ters the file name will be at most 14 characters long. # user lprngd # user (default: daemon) # The user that lpd and its filters runs as, and the owner of the spool # directories and other lpd_writable files. This can be the name of a # user or a number. If the user value is 0, then the real UID of the # program when started will be used. This allows a non_root user to # test the functionality of the LRPng software. # # # SERVER=U AND ALLOW_LPC CONFIGURATION VARIABLE # (stolen from lpd.perms file) # allow_lpc=hold,release # The allow_lpc configuration variable can be used to specify a subset of the # standard lpc operations will be classified as U operations. The candidates # for selection include hold, release, move, and topq. For example, if the # allow_lpc variable had the value: # allow_lpc=hold,release # # Then the following permissions entry would allows users to hold or release # their own jobs: # ACCEPT SERVICE=U SAMEUSER SAMEHOST REJECT SERVICE=U # # When checking permissions, if permission is explicitly granted for # SERVICE=C operations, it must be done before the checks for U or S ser- # vices. # # # PRINTCAP LOOKUP, DATABASE FILES AND FILTERS # # The printcap_path and printer_perms_path variables specify a list of either # data base files or filters to use to get printcap or permission entries for # a printer. To get information, the filter is started and a single line # with the printer name is sent to it. Note that the printer name all is # used to request information either about all printers, or a specific # printer entry that has a list of all printers. See printcap(5) for more # details. # # To find the printcap information, client programs will first search the # database files specified in the printcap_path entry. The lpd server will # also search the lpd_printcap_path entries as well. After having searched # the various files, if a filter has been specified the filter will be # started and the required printer name will be sent to the filter. The out- # put from the filter will be used as the printcap information. # user_auth_command (defaults: "") No description available. # # # SECURITY-RELATED PARAMETERS # # Environment variables are sanitized by lpd and the other executables, in # that the variables IFS, LD_PRELOAD and LD_PROFILE are all deleted from the # environment passed to filters and any other sub_processes. For more relia- # bility, script filters should set their own PATH and LD_LIBRARY_PATH vari- # ables. # # All filters will run as the user and group specified by the group and user # variables. # # # EXAMPLE # # LPRng configuration file # # user daemon # remote_user daemon_%M # server_user daemon_%H # # logfile /var/spool/lpd/lpd.log.%h # lockfile /var/spool/lpd/lpd.lock.%h # # printcap_path /etc/printcap:/var/spool/lpd/printcap.%h # lpd.perms_path /etc/lpd.perms:/var/spool/lpd/lpd.perms.%h # # filter_path /bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local/bin.%a # filter_ld_path /lib:/usr/lib:/usr/ucblib:/usr/5lib:/usr/ccs/lib:/usr/openwin/lib # # lpd_port printer # minfree 1024