- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/docs-xml/Samba3-HOWTO/TOSHARG-CUPS-printing.xml
r746 r988 99 99 <indexterm><primary>Printcap</primary></indexterm> 100 100 <indexterm><primary>PrintcapFormat</primary></indexterm> 101 Printing with CUPS in the most basic &smb.conf; setup in Samba-3.0 (as was true for 2.2.x) requires just two 102 parameters: <smbconfoption name="printing">cups</smbconfoption> and <smbconfoption 103 name="printcap">cups</smbconfoption>. CUPS does not need a printcap file. However, the 101 Printing with CUPS in the most basic &smb.conf; setup in Samba requires just this parameter: <smbconfoption name="printing">cups</smbconfoption>. CUPS does not need a printcap file. However, the 104 102 <filename>cupsd.conf</filename> configuration file knows of two related directives that control how such a 105 103 file will be automatically created and maintained by CUPS for the convenience of third-party applications … … 117 115 <para> 118 116 <indexterm><primary>libcups.so</primary></indexterm> 119 Samba has a special relationship to CUPS . Samba canbe compiled with CUPS library support.117 Samba has a special relationship to CUPS, and to use CUPS Samba must be compiled with CUPS library support. 120 118 Most recent installations have this support enabled. By default, CUPS linking is compiled 121 into smbd and other Samba binaries. Of course, you can use CUPS even 122 if Samba is not linked against <filename>libcups.so</filename> &smbmdash; but 123 there are some differences in required or supported configuration. 124 </para> 125 126 <para> 127 <indexterm><primary>libcups</primary></indexterm> 128 <indexterm><primary>ldd</primary></indexterm> 129 When Samba is compiled and linked with <filename>libcups</filename>, <smbconfoption name="printcap">cups</smbconfoption> 130 uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V 131 commands with an additional <command>-oraw</command> option for printing. On a Linux 132 system, you can use the <command>ldd</command> utility to find out if smbd has been linked with the 133 libcups library (<command>ldd</command> may not be present on other OS platforms, or its function may be embodied 134 by a different command): 135 <screen> 136 &rootprompt;<userinput>ldd `which smbd`</userinput> 137 libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000) 138 libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000) 139 libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) 140 [....] 141 </screen> 142 </para> 143 144 <para> 145 <indexterm><primary>libcups.so.2</primary></indexterm> 146 The line <computeroutput>libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000)</computeroutput> shows 147 there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups 148 is set, then <emphasis>any otherwise manually set print command in &smb.conf; is ignored</emphasis>. 149 This is an important point to remember! 150 </para> 151 152 <tip><para> Should it be necessary, for any reason, to set your own print commands, you can do this by setting 153 <smbconfoption name="printing">sysv</smbconfoption>. However, you will lose all the benefits 154 of tight CUPS-Samba integration. When you do this, you must manually configure the printing system commands 155 (most important: 156 <smbconfoption name="print command"/>; other commands are 157 <smbconfoption name="lppause command"/>, 158 <smbconfoption name="lpresume command"/>, 159 <smbconfoption name="lpq command"/>, 160 <smbconfoption name="lprm command"/>, 161 <smbconfoption name="queuepause command"/> and 162 <smbconfoption name="queue resume command"/>). 163 </para></tip> 119 into smbd and other Samba binaries. The parameter 120 <smbconfoption name="printing">cups</smbconfoption> will only 121 be accepted if this is the case. 122 </para> 164 123 165 124 </sect2> … … 180 139 <smbconfoption name="load printers">yes</smbconfoption> 181 140 <smbconfoption name="printing">cups</smbconfoption> 182 <smbconfoption name="printcap name">cups</smbconfoption>183 141 184 142 <smbconfsection name="[printers]"/> … … 189 147 <smbconfoption name="writable">no</smbconfoption> 190 148 <smbconfoption name="printable">yes</smbconfoption> 191 <smbconfoption name="printer admin">root, @ntadmins, @smbprintadm</smbconfoption>192 149 </smbconfblock> 193 150 </example> … … 224 181 <smbconfsection name="[global]"/> 225 182 <smbconfoption name="printing">cups</smbconfoption> 226 <smbconfoption name="printcap name">cups</smbconfoption>227 183 <smbconfoption name="load printers">yes</smbconfoption> 228 184 … … 233 189 <smbconfoption name="writable">no</smbconfoption> 234 190 <smbconfoption name="printable">yes</smbconfoption> 235 <smbconfoption name="printer admin">root, @ntadmins, @smbprintadm</smbconfoption>236 191 237 192 <smbconfsection name="[special_printer]"/> … … 244 199 <smbconfoption name="writable">no</smbconfoption> 245 200 <smbconfoption name="printable">yes</smbconfoption> 246 <smbconfoption name="printer admin">kurt</smbconfoption>247 201 <smbconfoption name="hosts deny">0.0.0.0</smbconfoption> 248 202 <smbconfoption name="hosts allow">turbo_xp, 10.160.50.23, 10.160.51.60</smbconfoption> … … 252 206 <para> 253 207 This special share is only for testing purposes. It does not write the print job to a file. It just logs the job parameters 254 known to Samba into the <filename>/tmp/smbprn.log</filename> file and deletes the job-file. Moreover, the 255 <smbconfoption name="printer admin"/> of this share is <quote>kurt</quote> (not the <quote>@ntadmins</quote> group), 256 guest access is not allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it 208 known to Samba into the <filename>/tmp/smbprn.log</filename> file and deletes the job-file. Moreover, guest access is not 209 allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it 257 210 allows access from only three hosts. To prevent CUPS from kicking in and taking over the print jobs for that share, we need to set 258 211 <smbconfoption name="printing">sysv</smbconfoption> and <smbconfoption name="printcap">lpstat</smbconfoption>. … … 2203 2156 <smbconfblock> 2204 2157 <smbconfoption name="printing">cups</smbconfoption> 2205 <smbconfoption name="printcap">cups</smbconfoption>2206 2158 </smbconfblock> 2207 2159 … … 2209 2161 When these parameters are specified, all manually set print directives (like <smbconfoption name="print 2210 2162 command"/> or <smbconfoption name="lppause command"/>) in &smb.conf; (as well as in Samba itself) will be 2211 ignored. Instead, Samba will directly interface with CUPS through its application program interface (API), as 2212 long as Samba has been compiled with CUPS library (libcups) support. If Samba has not been compiled with CUPS 2213 support, and if no other print commands are set up, then printing will use the <emphasis>System V</emphasis> 2214 AT&T command set, with the -oraw option automatically passing through (if you want your own defined print 2215 commands to work with a Samba server that has CUPS support compiled in, simply use <smbconfoption 2216 name="classicalprinting">sysv</smbconfoption>). This is illustrated in <link linkend="f13small">the Printing via 2163 ignored. Instead, Samba will directly interface with CUPS through its 2164 application program interface (API). 2165 This is illustrated in <link linkend="f13small">the Printing via 2217 2166 CUPS/Samba Server diagram</link>. 2218 2167 </para> … … 4737 4686 <smbconfoption name="printing">cups</smbconfoption>.</para></listitem> 4738 4687 4739 <listitem><para>Another Samba &smb.conf; setting of4740 <smbconfoption name="printcap">cups</smbconfoption>.</para></listitem>4741 4688 </itemizedlist> 4742 4689 … … 4752 4699 </sect2> 4753 4700 4754 <sect2>4755 <title>Manual Configuration</title>4756 4757 <para>4758 If you want to do things manually, replace the <smbconfoption name="printing">cups</smbconfoption>4759 by <smbconfoption name="printing">bsd</smbconfoption>. Then your manually set commands may work4760 (I haven't tested this), and a <smbconfoption name="print command">lp -d %P %s; rm %s</smbconfoption>4761 may do what you need.4762 </para>4763 </sect2>4764 4701 </sect1> 4765 4702 … … 4911 4848 <para> 4912 4849 If <command>cupsaddsmb</command>, or <command>rpcclient addriver</command> emit the error message 4913 WERR_BAD_PASSWORD , refer to <link linkend="root-ask-loop">the previous common error</link>.4850 WERR_BAD_PASSWORD/WERR_INVALID_PASSWORD, refer to <link linkend="root-ask-loop">the previous common error</link>. 4914 4851 </para> 4915 4852
Note:
See TracChangeset
for help on using the changeset viewer.