1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Configuration File, Defaults and Overrides</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="PREVIOUS" title="Job Identifier " href= 12 "useidentifier.htm"> 13 <link rel="NEXT" title="Legacy Compatibility" href="x6798.htm"> 14 </head> 15 16 <body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link= 17 "#0000FF" vlink="#840084" alink="#0000FF"> 18 <div class="NAVHEADER"> 19 <table summary="Header navigation table" width="100%" border= 20 "0" cellpadding="0" cellspacing="0"> 21 <tr> 22 <th colspan="3" align="center">LPRng Reference Manual: 5 23 Sep 2003 (For LPRng-3.8.22)</th> 24 </tr> 25 26 <tr> 27 <td width="10%" align="left" valign="bottom"><a href= 28 "useidentifier.htm" accesskey="P">Prev</a></td> 29 30 <td width="80%" align="center" valign="bottom"> 31 </td> 32 33 <td width="10%" align="right" valign="bottom"><a href= 34 "x6798.htm" accesskey="N">Next</a></td> 35 </tr> 36 </table> 37 <hr align="LEFT" width="100%"> 38 </div> 39 40 <div class="CHAPTER"> 41 <h1><a name="CONFIGFILE"></a>Chapter 14. Configuration File, 42 Defaults and Overrides</h1> 43 44 <div class="TOC"> 45 <dl> 46 <dt><b>Table of Contents</b></dt> 47 48 <dt>14.1. <a href="configfile.htm#AEN6784">Configuration 49 File Format</a></dt> 50 51 <dt>14.2. <a href="x6798.htm">Legacy 52 Compatibility</a></dt> 53 </dl> 54 </div> 55 56 <p>Options used:</p> 57 58 <ul> 59 <li> 60 <p><var class="LITERAL">allow_getenv</var> FLAG <span 61 class="emphasis"><i class="EMPHASIS">use GETENV 62 environment variable</i></span></p> 63 </li> 64 </ul> 65 <br> 66 <br> 67 68 <p>The <b class="APPLICATION">LPRng</b> options are obtained 69 as follows:</p> 70 71 <ul> 72 <li> 73 <p>The compile time defaults. These are in the <tt class= 74 "FILENAME">LPRng/src/common/vars.c</tt> file.</p> 75 </li> 76 77 <li> 78 <p>If the <b class="APPLICATION">LPRng</b> software has 79 been compiled with the regression testing <acronym class= 80 "ACRONYM">GETENV</acronym> option enabled, the 81 configuration information in the file specified by the 82 <var class="LITERAL">LPD_CONF</var> environment variable 83 will be used. This can only be used if you are not setuid 84 ROOT or as ROOT as it opens severe security 85 loopholes.</p> 86 </li> 87 88 <li> 89 <p>The file specified by the <var class= 90 "LITERAL">config_file</var> compile time option, usually 91 <tt class="FILENAME">/etc/lpd.conf</tt> or <tt class= 92 "FILENAME">/usr/local/etc/lpd.conf</tt>, and referred to 93 a the <tt class="FILENAME">lpd.conf</tt> file. If the 94 <var class="LITERAL">config_file</var> option value has 95 the form <tt class="FILENAME">|/pathname</tt>, then <tt 96 class="FILENAME">/pathname</tt> must be an executable 97 program and will be run with the standard set of filter 98 options. It must write configuration option values to its 99 <acronym class="ACRONYM">STDOUT</acronym> and exit with a 100 0 status.</p> 101 </li> 102 103 <li> 104 <p>In order to protect system security, the <tt class= 105 "FILENAME">lpd.conf</tt> (and the <tt class= 106 "FILENAME">printcap</tt>) file should be read only.</p> 107 </li> 108 109 <li> 110 <p>If the <var class="LITERAL">require_configfiles</var> 111 option is set in the compile time options, then the 112 preceeding step must be successful, i.e. - there must be 113 a configuration file or the program must execute and exit 114 with a 0 status.</p> 115 </li> 116 117 <li> 118 <p>If a printer or spooling operation is done, then the 119 values in the <tt class="FILENAME">printcap</tt> entry 120 for the spooler are used to override the default and <tt 121 class="FILENAME">ifhp.conf</tt> file values.</p> 122 </li> 123 </ul> 124 <br> 125 <br> 126 127 <div class="SECT1"> 128 <h1 class="SECT1"><a name="AEN6784">14.1. Configuration 129 File Format</a></h1> 130 131 <p>The configuration file format is similar to a the fields 132 of a printcap entry with the difference that the leading 133 colon is optional and there can only be one option per 134 line:</p> 135 136 <div class="INFORMALEXAMPLE"> 137 <a name="AEN6787"></a> 138<pre class="SCREEN"> 139 # comment 140 # set option value to 1 or ON 141 ab 142 :ab 143 # set option value to 0 or OFF 144 ab@ 145 :ab 146 # set option value to string 147 str=name 148</pre> 149 </div> 150 <br> 151 <br> 152 153 <p>During system installation the <b class= 154 "APPLICATION">LPRng</b> software processes the default 155 values in the <tt class= 156 "FILENAME">LPRng/src/common/vars.c</tt> file and generates 157 a sample <tt class="FILENAME">lpd.conf</tt> file that has 158 the format:</p> 159 160 <div class="INFORMALEXAMPLE"> 161 <a name="AEN6793"></a> 162<pre class="SCREEN"> 163 # Purpose: always print banner, ignore lpr -h option 164 # default ab@ (FLAG off) 165 # Purpose: query accounting server when connected 166 # default achk@ (FLAG off) 167 # Purpose: accounting at end (see also af, la, ar, as) 168 # default ae=jobend $H $n $P $k $b $t (STRING) 169 # Purpose: name of accounting file (see also la, ar) 170 # default af=acct (STRING) 171 172 # change: 173 # --- we change the af value to none, i.e. - no accounting 174 # --- file by default 175 af= 176</pre> 177 </div> 178 <br> 179 <br> 180 181 <p>You can change option values by editing the file as 182 shown above then then to force the <b class= 183 "APPLICATION">lpd</b> server to use the new options, use 184 the <tt class="COMMAND">lpc reread</tt> command.</p> 185 </div> 186 </div> 187 188 <div class="NAVFOOTER"> 189 <hr align="LEFT" width="100%"> 190 191 <table summary="Footer navigation table" width="100%" border= 192 "0" cellpadding="0" cellspacing="0"> 193 <tr> 194 <td width="33%" align="left" valign="top"><a href= 195 "useidentifier.htm" accesskey="P">Prev</a></td> 196 197 <td width="34%" align="center" valign="top"><a href= 198 "index.htm" accesskey="H">Home</a></td> 199 200 <td width="33%" align="right" valign="top"><a href= 201 "x6798.htm" accesskey="N">Next</a></td> 202 </tr> 203 204 <tr> 205 <td width="33%" align="left" valign="top">Job 206 Identifier</td> 207 208 <td width="34%" align="center" valign="top"> </td> 209 210 <td width="33%" align="right" valign="top">Legacy 211 Compatibility</td> 212 </tr> 213 </table> 214 </div> 215 </body> 216</html> 217 218