- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/docs/htmldocs/Samba3-HOWTO/classicalprinting.html
r44 r134 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 21. Classical Printing Support</title><link rel="stylesheet" href=" samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="msdfs.html" title="Chapter 20. Hosting a Microsoft Distributed File System Tree"><link rel="next" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Classical Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="msdfs.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="CUPS-printing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="classicalprinting"></a>Chapter 21. Classical Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH<br></span><div class="address"><p><code class="email"><<a href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="othername">(Jerry)</span> <span class="surname">Carter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a href="mailto:jerry@samba.org">jerry@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">May 31, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="classicalprinting.html#id383284">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id383486">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id383627">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id383681">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id383775">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id384040">Verifying Configuration with <code class="literal">testparm</code></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id384223">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id384567">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id385033">Detailed Explanation Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#cups-msrpc">Printing Developments Since Samba-2.2</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id387386">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id387540">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id387651">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id387858">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id388131">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id388254">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id388339">Add Printer Wizard Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#inst-rpc">Installing Print Drivers Using <code class="literal">rpcclient</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id390034">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id390048">First Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#prt-modeset">Setting Device Modes on New Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id390551">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id390662">Always Make First Client Connection as root or “<span class="quote">printer admin</span>”</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id390813">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id390833">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id391168">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id391404">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id391611">Error Message: “<span class="quote">Cannot connect under a different Name</span>”</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id391709">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id391934">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id392028">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id392061">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id392099">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id392129">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id392145">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id392158">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id392275">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id392517">The <code class="literal">addprinter</code> Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id392551">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id392682">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id392709">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id392714">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id392751">My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id383284"></a>Features and Benefits</h2></div></div></div><p>2 <a class="indexterm" name="id 383291"></a>1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 21. Classical Printing Support</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="The Official Samba 3.2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="msdfs.html" title="Chapter 20. Hosting a Microsoft Distributed File System Tree"><link rel="next" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Classical Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="msdfs.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="CUPS-printing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="classicalprinting"></a>Chapter 21. Classical Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="othername">(Jerry)</span> <span class="surname">Carter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jerry@samba.org">jerry@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">May 31, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="classicalprinting.html#id406449">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id406652">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id406793">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id406846">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id406941">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id407208">Verifying Configuration with <code class="literal">testparm</code></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id407391">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id407742">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id408182">Detailed Explanation Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#cups-msrpc">Printing Developments Since Samba-2.2</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id410712">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id410866">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id410977">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id411183">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id411476">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id411602">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id411687">Add Printer Wizard Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#inst-rpc">Installing Print Drivers Using <code class="literal">rpcclient</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id413392">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id413407">First Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#prt-modeset">Setting Device Modes on New Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id346362">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id346474">Always Make First Client Connection as root or “<span class="quote">printer admin</span>”</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id414319">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id414335">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id414671">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id414907">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415143">Error Message: “<span class="quote">Cannot connect under a different Name</span>”</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415242">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415466">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415565">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id415598">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id415641">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415671">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415684">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id415698">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id415814">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id416053">The <code class="literal">addprinter</code> Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id416087">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id416218">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id416245">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id416250">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id416288">My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406449"></a>Features and Benefits</h2></div></div></div><p> 2 <a class="indexterm" name="id406457"></a> 3 3 Printing is often a mission-critical service for the users. Samba can provide this service reliably and 4 4 seamlessly for a client network consisting of Windows workstations. 5 5 </p><p> 6 <a class="indexterm" name="id 383303"></a>7 <a class="indexterm" name="id 383310"></a>8 <a class="indexterm" name="id 383317"></a>9 <a class="indexterm" name="id 383323"></a>10 <a class="indexterm" name="id 383330"></a>11 <a class="indexterm" name="id 383337"></a>12 <a class="indexterm" name="id 383344"></a>13 <a class="indexterm" name="id 383351"></a>14 <a class="indexterm" name="id 383357"></a>15 <a class="indexterm" name="id 383364"></a>16 <a class="indexterm" name="id 383371"></a>17 <a class="indexterm" name="id 383378"></a>18 <a class="indexterm" name="id 383385"></a>19 <a class="indexterm" name="id 383391"></a>6 <a class="indexterm" name="id406469"></a> 7 <a class="indexterm" name="id406476"></a> 8 <a class="indexterm" name="id406482"></a> 9 <a class="indexterm" name="id406489"></a> 10 <a class="indexterm" name="id406496"></a> 11 <a class="indexterm" name="id406503"></a> 12 <a class="indexterm" name="id406510"></a> 13 <a class="indexterm" name="id406516"></a> 14 <a class="indexterm" name="id406523"></a> 15 <a class="indexterm" name="id406530"></a> 16 <a class="indexterm" name="id406537"></a> 17 <a class="indexterm" name="id406544"></a> 18 <a class="indexterm" name="id406550"></a> 19 <a class="indexterm" name="id406557"></a> 20 20 A Samba print service may be run on a standalone or domain member server, side by side with file serving 21 21 functions, or on a dedicated print server. It can be made as tightly or as loosely secured as needs dictate. … … 31 31 supported by the newer Common UNIX Printing System (CUPS) as the print subsystem underneath the Samba hood. 32 32 </p><p> 33 <a class="indexterm" name="id 383432"></a>34 <a class="indexterm" name="id 383438"></a>33 <a class="indexterm" name="id406597"></a> 34 <a class="indexterm" name="id406604"></a> 35 35 This chapter outlines the fundamentals of Samba printing as implemented by the more traditional UNIX 36 36 BSD- and System V-style printing systems. Much of the information in this chapter applies also to CUPS. If 37 37 you use CUPS, you may be tempted to jump to the next chapter, but you will certainly miss a few things if you 38 do. For further information refer to <a href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing Support</a>.38 do. For further information refer to <a class="link" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing Support</a>. 39 39 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 40 <a class="indexterm" name="id 383460"></a>41 <a class="indexterm" name="id 383467"></a>42 <a class="indexterm" name="id 383474"></a>40 <a class="indexterm" name="id406626"></a> 41 <a class="indexterm" name="id406633"></a> 42 <a class="indexterm" name="id406639"></a> 43 43 Most of the following examples have been verified on Windows XP Professional clients. Where this document 44 44 describes the responses to commands given, bear in mind that Windows 200x/XP clients are quite similar but may 45 45 differ in minor details. Windows NT4 is somewhat different again. 46 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 383486"></a>Technical Introduction</h2></div></div></div><p>47 <a class="indexterm" name="id 383494"></a>48 <a class="indexterm" name="id 383501"></a>49 <a class="indexterm" name="id 383508"></a>46 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406652"></a>Technical Introduction</h2></div></div></div><p> 47 <a class="indexterm" name="id406660"></a> 48 <a class="indexterm" name="id406666"></a> 49 <a class="indexterm" name="id406673"></a> 50 50 Samba's printing support always relies on the installed print subsystem of the UNIX OS it runs on. Samba is a 51 51 <code class="literal">middleman.</code> It takes print files from Windows (or other SMB) clients and passes them to the real … … 55 55 features and are accessed differently. 56 56 </p><p> 57 <a class="indexterm" name="id 383532"></a>58 <a class="indexterm" name="id 383539"></a>57 <a class="indexterm" name="id406698"></a> 58 <a class="indexterm" name="id406704"></a> 59 59 This chapter deals with the traditional way of UNIX printing. The next chapter covers in great detail the more 60 60 modern CUPS. 61 61 </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> 62 <a class="indexterm" name="id 383551"></a>62 <a class="indexterm" name="id406717"></a> 63 63 CUPS users, be warned: do not just jump on to the next chapter. You might miss important information only found here! 64 64 </p></div><p> 65 <a class="indexterm" name="id 383562"></a>66 <a class="indexterm" name="id 383569"></a>67 <a class="indexterm" name="id 383576"></a>68 <a class="indexterm" name="id 383582"></a>65 <a class="indexterm" name="id406728"></a> 66 <a class="indexterm" name="id406735"></a> 67 <a class="indexterm" name="id406741"></a> 68 <a class="indexterm" name="id406748"></a> 69 69 It is apparent from postings on the Samba mailing list that print configuration is one of the most problematic 70 70 aspects of Samba administration today. Many new Samba administrators have the impression that Samba performs … … 72 72 do any form of print filtering. 73 73 </p><p> 74 <a class="indexterm" name="id 383596"></a>75 <a class="indexterm" name="id 383602"></a>76 <a class="indexterm" name="id 383609"></a>77 <a class="indexterm" name="id 383616"></a>74 <a class="indexterm" name="id406761"></a> 75 <a class="indexterm" name="id406768"></a> 76 <a class="indexterm" name="id406775"></a> 77 <a class="indexterm" name="id406782"></a> 78 78 Samba obtains from its clients a data stream (print job) that it spools to a local spool area. When the entire 79 79 print job has been received, Samba invokes a local UNIX/Linux print command and passes the spooled file to it. 80 80 It is up to the local system printing subsystems to correctly process the print job and to submit it to the 81 81 printer. 82 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 383627"></a>Client to Samba Print Job Processing</h3></div></div></div><p>82 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406793"></a>Client to Samba Print Job Processing</h3></div></div></div><p> 83 83 Successful printing from a Windows client via a Samba print server to a UNIX 84 84 printer involves six (potentially seven) stages: … … 87 87 to the UNIX print subsystem's spooling area.</p></li><li><p>The UNIX print subsystem processes the print job.</p></li><li><p>The print file may need to be explicitly deleted 88 88 from the Samba spooling area. This item depends on your print spooler 89 configuration settings.</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 383681"></a>Printing-Related Configuration Parameters</h3></div></div></div><p>90 <a class="indexterm" name="id 383689"></a>91 <a class="indexterm" name="id 383695"></a>92 <a class="indexterm" name="id 383702"></a>89 configuration settings.</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406846"></a>Printing-Related Configuration Parameters</h3></div></div></div><p> 90 <a class="indexterm" name="id406854"></a> 91 <a class="indexterm" name="id406861"></a> 92 <a class="indexterm" name="id406868"></a> 93 93 There are a number of configuration parameters to control Samba's printing behavior. Please refer to the man 94 94 page for <code class="filename">smb.conf</code> for an overview of these. As with other parameters, there are global-level (tagged with a … … 104 104 setting defined for the same parameter, thus overriding the 105 105 global default). 106 </p></dd></dl></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 383775"></a>Simple Print Configuration</h2></div></div></div><p>107 <a class="indexterm" name="id 383783"></a>108 <a class="indexterm" name="id 383790"></a>109 <a class="indexterm" name="id 383796"></a>110 <a class="indexterm" name="id 383803"></a>111 <a href="classicalprinting.html#simpleprc" title="Example 21.1. Simple Configuration with BSD Printing">Simple Configuration with BSD Printing</a> shows a simple printing configuration.106 </p></dd></dl></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406941"></a>Simple Print Configuration</h2></div></div></div><p> 107 <a class="indexterm" name="id406949"></a> 108 <a class="indexterm" name="id406955"></a> 109 <a class="indexterm" name="id406962"></a> 110 <a class="indexterm" name="id406969"></a> 111 <a class="link" href="classicalprinting.html#simpleprc" title="Example 21.1. Simple Configuration with BSD Printing">Simple Configuration with BSD Printing</a> shows a simple printing configuration. 112 112 If you compare this with your own, you may find additional parameters that have been preconfigured by your OS 113 113 vendor. Following is a discussion and explanation of the parameters. This example does not use many 114 114 parameters. However, in many environments these are enough to provide a valid <code class="filename">smb.conf</code> file that enables 115 115 all clients to print. 116 </p><div class="example"><a name="simpleprc"></a><p class="title"><b>Example 21.1. Simple Configuration with BSD Printing</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id 383851"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id383864"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id383885"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id383898"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id383910"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id383923"></a><em class="parameter"><code>writable = no</code></em></td></tr></table></div></div><br class="example-break"><p>117 <a class="indexterm" name="id 383938"></a>118 <a class="indexterm" name="id 383945"></a>119 <a class="indexterm" name="id 383952"></a>116 </p><div class="example"><a name="simpleprc"></a><p class="title"><b>Example 21.1. Simple Configuration with BSD Printing</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id407017"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id407028"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id407049"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id407060"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407072"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407083"></a><em class="parameter"><code>writable = no</code></em></td></tr></table></div></div><br class="example-break"><p> 117 <a class="indexterm" name="id407098"></a> 118 <a class="indexterm" name="id407104"></a> 119 <a class="indexterm" name="id407111"></a> 120 120 This is only an example configuration. Samba assigns default values to all configuration parameters. The 121 121 defaults are conservative and sensible. When a parameter is specified in the <code class="filename">smb.conf</code> file, this overwrites … … 125 125 pager program. 126 126 </p><p> 127 <a class="indexterm" name="id 383990"></a>128 <a class="indexterm" name="id 383996"></a>129 <a class="indexterm" name="id 384003"></a>127 <a class="indexterm" name="id407149"></a> 128 <a class="indexterm" name="id407156"></a> 129 <a class="indexterm" name="id407163"></a> 130 130 The syntax for the configuration file is easy to grasp. You should know that is not very picky about its 131 131 syntax. As has been explained elsewhere in this book, Samba tolerates some spelling errors (such as 132 <a class=" indexterm" name="id384012"></a>browseable instead of <a class="indexterm" name="id384019"></a>browsable), and spelling is132 <a class="link" href="smb.conf.5.html#BROWSEABLE">browseable</a> instead of <a class="link" href="smb.conf.5.html#BROWSABLE">browsable</a>), and spelling is 133 133 case-insensitive. It is permissible to use <em class="parameter"><code>Yes/No</code></em> or <em class="parameter"><code>True/False</code></em> 134 134 for Boolean settings. Lists of names may be separated by commas, spaces, or tabs. 135 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 384040"></a>Verifying Configuration with <code class="literal">testparm</code></h3></div></div></div><p>136 <a class="indexterm" name="id 384053"></a>137 <a class="indexterm" name="id 384060"></a>138 <a class="indexterm" name="id 384066"></a>139 <a class="indexterm" name="id 384073"></a>140 <a class="indexterm" name="id 384080"></a>141 <a class="indexterm" name="id 384087"></a>142 <a class="indexterm" name="id 384094"></a>143 <a class="indexterm" name="id 384100"></a>144 <a class="indexterm" name="id 384107"></a>145 <a class="indexterm" name="id 384114"></a>146 <a class="indexterm" name="id 384121"></a>135 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407208"></a>Verifying Configuration with <code class="literal">testparm</code></h3></div></div></div><p> 136 <a class="indexterm" name="id407220"></a> 137 <a class="indexterm" name="id407227"></a> 138 <a class="indexterm" name="id407234"></a> 139 <a class="indexterm" name="id407241"></a> 140 <a class="indexterm" name="id407248"></a> 141 <a class="indexterm" name="id407255"></a> 142 <a class="indexterm" name="id407261"></a> 143 <a class="indexterm" name="id407268"></a> 144 <a class="indexterm" name="id407275"></a> 145 <a class="indexterm" name="id407282"></a> 146 <a class="indexterm" name="id407289"></a> 147 147 To see all (or at least most) printing-related settings in Samba, including the implicitly used ones, try the 148 148 command outlined below. This command greps for all occurrences of <code class="constant">lp</code>, … … 151 151 a convenient overview of the running <code class="literal">smbd</code> print configuration. This command does not show 152 152 individually created printer shares or the spooling paths they may use. Here is the output of my Samba setup, 153 with settings shown in <a href="classicalprinting.html#simpleprc" title="Example 21.1. Simple Configuration with BSD Printing">the example above</a>:153 with settings shown in <a class="link" href="classicalprinting.html#simpleprc" title="Example 21.1. Simple Configuration with BSD Printing">the example above</a>: 154 154 </p><pre class="screen"> 155 155 <code class="prompt">root# </code><strong class="userinput"><code>testparm -s -v | egrep "(lp|print|spool|driver|ports|\[)"</code></strong> … … 195 195 “<span class="quote">-v</span>” switch, it only shows you the settings actually written into! To see the complete 196 196 configuration used, add the “<span class="quote">-v</span>” parameter to testparm. 197 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 384223"></a>Rapid Configuration Validation</h3></div></div></div><p>198 <a class="indexterm" name="id 384231"></a>199 <a class="indexterm" name="id 384237"></a>200 <a class="indexterm" name="id 384244"></a>201 <a class="indexterm" name="id 384251"></a>197 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407391"></a>Rapid Configuration Validation</h3></div></div></div><p> 198 <a class="indexterm" name="id407398"></a> 199 <a class="indexterm" name="id407405"></a> 200 <a class="indexterm" name="id407412"></a> 201 <a class="indexterm" name="id407419"></a> 202 202 Should you need to troubleshoot at any stage, please always come back to this point first and verify if 203 203 <code class="literal">testparm</code> shows the parameters you expect. To give you a warning from personal experience, 204 try to just comment out the <a class=" indexterm" name="id384266"></a>load printersparameter. If your 2.2.x system behaves like204 try to just comment out the <a class="link" href="smb.conf.5.html#LOADPRINTERS">load printers</a> parameter. If your 2.2.x system behaves like 205 205 mine, you'll see this: 206 206 </p><pre class="screen"> … … 212 212 load printers = Yes 213 213 </pre><p> 214 <a class="indexterm" name="id 384296"></a>215 <a class="indexterm" name="id 384303"></a>214 <a class="indexterm" name="id407469"></a> 215 <a class="indexterm" name="id407475"></a> 216 216 I assumed that commenting out of this setting should prevent Samba from 217 217 publishing my printers, but it still did. It took some time to figure out … … 227 227 load printers = No 228 228 </pre><p> 229 <a class="indexterm" name="id 384343"></a>230 Only when the parameter is explicitly set to <a class=" indexterm" name="id384350"></a>load printers = Nowould229 <a class="indexterm" name="id407515"></a> 230 Only when the parameter is explicitly set to <a class="link" href="smb.conf.5.html#LOADPRINTERS">load printers = No</a> would 231 231 Samba conform with my intentions. So, my strong advice is: 232 232 </p><div class="itemizedlist"><ul type="disc"><li><p>Never rely on commented-out parameters.</p></li><li><p>Always set parameters explicitly as you intend them to … … 238 238 [printers] 239 239 </pre><p> 240 <a class="indexterm" name="id 384403"></a>241 <a class="indexterm" name="id 384410"></a>240 <a class="indexterm" name="id407579"></a> 241 <a class="indexterm" name="id407586"></a> 242 242 This example should show that you can use <code class="literal">testparm</code> to test any Samba configuration file. 243 243 Actually, we encourage you <span class="emphasis"><em>not</em></span> to change your working system (unless you know exactly … … 277 277 <code class="literal">testparm</code> issued two warnings: 278 278 </p><div class="itemizedlist"><ul type="disc"><li><p>We did not specify the <em class="parameter"><code>[printers]</code></em> section as printable.</p></li><li><p>We did not tell Samba which spool directory to use.</p></li></ul></div><p> 279 <a class="indexterm" name="id 384490"></a>280 <a class="indexterm" name="id 384496"></a>281 <a class="indexterm" name="id 384502"></a>282 <a class="indexterm" name="id 384507"></a>279 <a class="indexterm" name="id407665"></a> 280 <a class="indexterm" name="id407672"></a> 281 <a class="indexterm" name="id407678"></a> 282 <a class="indexterm" name="id407683"></a> 283 283 However, this was not fatal, and Samba will default to values that will work. Please, do not rely on this and 284 284 do not use this example. This was included to encourage you to be careful to design and specify your setup to … … 289 289 clearly says: <code class="literal">Internal whitespace in a parameter value is retained verbatim.</code> This means 290 290 that a line consisting of, for example, 291 </p><table class="simplelist" border="0" summary="Simple list"><tr><td># This defines LPRng as the printing system</td></tr><tr><td><a class="indexterm" name="id 384541"></a><em class="parameter"><code>printing = lprng</code></em></td></tr></table><p>291 </p><table class="simplelist" border="0" summary="Simple list"><tr><td># This defines LPRng as the printing system</td></tr><tr><td><a class="indexterm" name="id407717"></a><em class="parameter"><code>printing = lprng</code></em></td></tr></table><p> 292 292 </p><p> 293 293 will regard the whole of the string after the <code class="literal">=</code> sign as the value you want to define. This 294 294 is an invalid value that will be ignored, and a default value will be used in its place. 295 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 384567"></a>Extended Printing Configuration</h2></div></div></div><p>296 <a class="indexterm" name="id 384575"></a>297 <a class="indexterm" name="id 384582"></a>298 <a class="indexterm" name="id 384589"></a>299 <a class="indexterm" name="id 384596"></a>300 <a href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing Configuration</a> shows a more verbose configuration for295 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id407742"></a>Extended Printing Configuration</h2></div></div></div><p> 296 <a class="indexterm" name="id407750"></a> 297 <a class="indexterm" name="id407757"></a> 298 <a class="indexterm" name="id407763"></a> 299 <a class="indexterm" name="id407770"></a> 300 <a class="link" href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing Configuration</a> shows a more verbose configuration for 301 301 print-related settings in a BSD-style printing environment. What follows is a discussion and explanation of 302 302 the various parameters. We chose to use BSD-style printing here because it is still the most commonly used … … 305 305 are set by default. You could use a much leaner <code class="filename">smb.conf</code> file, or you can use <code class="literal">testparm</code> or 306 306 <code class="literal">SWAT</code> to optimize the <code class="filename">smb.conf</code> file to remove all parameters that are set at default. 307 </p><div class="example"><a name="extbsdpr"></a><p class="title"><b>Example 21.2. Extended BSD Printing Configuration</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id 384663"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id384676"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384688"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384701"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id384714"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id384726"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id384739"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id384751"></a><em class="parameter"><code>use client driver = no</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id384773"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id384785"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384798"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id384810"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id384823"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384836"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384848"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384861"></a><em class="parameter"><code>writable = no </code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[my_printer_name]</code></em></td></tr><tr><td><a class="indexterm" name="id384882"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id384895"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id384908"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id384920"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384933"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id384945"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id384958"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id384970"></a><em class="parameter"><code>hosts deny = turbo_xp, 10.160.50.23, 10.160.51.60</code></em></td></tr><tr><td><a class="indexterm" name="id384983"></a><em class="parameter"><code>guest ok = no</code></em></td></tr></table></div></div><br class="example-break"><p>308 <a class="indexterm" name="id 384998"></a>309 <a class="indexterm" name="id 385003"></a>310 <a class="indexterm" name="id 385009"></a>307 </p><div class="example"><a name="extbsdpr"></a><p class="title"><b>Example 21.2. Extended BSD Printing Configuration</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id407838"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id407850"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407861"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407873"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id407884"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id407896"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id407908"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id407919"></a><em class="parameter"><code>use client driver = no</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id407939"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id407951"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407962"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id407974"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id407985"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id407997"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id408008"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id408020"></a><em class="parameter"><code>writable = no </code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[my_printer_name]</code></em></td></tr><tr><td><a class="indexterm" name="id408040"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id408052"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id408063"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id408075"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id408086"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id408098"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id408109"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id408121"></a><em class="parameter"><code>hosts deny = turbo_xp, 10.160.50.23, 10.160.51.60</code></em></td></tr><tr><td><a class="indexterm" name="id408132"></a><em class="parameter"><code>guest ok = no</code></em></td></tr></table></div></div><br class="example-break"><p> 308 <a class="indexterm" name="id408146"></a> 309 <a class="indexterm" name="id408152"></a> 310 <a class="indexterm" name="id408157"></a> 311 311 This is an example configuration. You may not find all the settings that are in the configuration file that 312 312 was provided by the OS vendor. Samba configuration parameters, if not explicitly set, default to a sensible 313 313 value. To see all settings, as <code class="constant">root</code> use the <code class="literal">testparm</code> utility. 314 314 <code class="literal">testparm</code> gives warnings for misconfigured settings. 315 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 385033"></a>Detailed Explanation Settings</h3></div></div></div><p>316 The following is a discussion of the settings from <a href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing317 Configuration</a> <a href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing Configuration</a>.318 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 385057"></a>The [global] Section</h4></div></div></div><p>319 <a class="indexterm" name="id 385064"></a>320 <a class="indexterm" name="id 385071"></a>321 <a class="indexterm" name="id 385078"></a>322 <a class="indexterm" name="id 385085"></a>315 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408182"></a>Detailed Explanation Settings</h3></div></div></div><p> 316 The following is a discussion of the settings from <a class="link" href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing 317 Configuration</a> <a class="link" href="classicalprinting.html#extbsdpr" title="Example 21.2. Extended BSD Printing Configuration">Extended BSD Printing Configuration</a>. 318 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id408205"></a>The [global] Section</h4></div></div></div><p> 319 <a class="indexterm" name="id408213"></a> 320 <a class="indexterm" name="id408219"></a> 321 <a class="indexterm" name="id408226"></a> 322 <a class="indexterm" name="id408233"></a> 323 323 The <em class="parameter"><code>[global]</code></em> section is one of four special sections (along with <em class="parameter"><code>[homes]</code></em>, <em class="parameter"><code>[printers]</code></em>, and <em class="parameter"><code>[print$]</code></em>). The 324 324 <em class="parameter"><code>[global]</code></em> contains all parameters that apply to the server as a whole. It is the place … … 327 327 setting the same value repeatedly. (Within each individual section or share, you may, however, override these 328 328 globally set share settings and specify other values). 329 </p><div class="variablelist"><dl><dt><span class="term"><a class=" indexterm" name="id385131"></a>printing = bsd</span></dt><dd><p>330 <a class="indexterm" name="id 385142"></a>331 <a class="indexterm" name="id 385149"></a>332 <a class="indexterm" name="id 385156"></a>333 <a class="indexterm" name="id 385162"></a>334 <a class="indexterm" name="id 385169"></a>335 <a class="indexterm" name="id 385176"></a>336 <a class="indexterm" name="id 385182"></a>337 <a class="indexterm" name="id 385189"></a>338 <a class="indexterm" name="id 385196"></a>339 <a class="indexterm" name="id 385203"></a>340 <a class="indexterm" name="id 385209"></a>341 <a class="indexterm" name="id 385216"></a>329 </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd </a></span></dt><dd><p> 330 <a class="indexterm" name="id408294"></a> 331 <a class="indexterm" name="id408300"></a> 332 <a class="indexterm" name="id408307"></a> 333 <a class="indexterm" name="id408314"></a> 334 <a class="indexterm" name="id408321"></a> 335 <a class="indexterm" name="id408327"></a> 336 <a class="indexterm" name="id408334"></a> 337 <a class="indexterm" name="id408341"></a> 338 <a class="indexterm" name="id408348"></a> 339 <a class="indexterm" name="id408354"></a> 340 <a class="indexterm" name="id408361"></a> 341 <a class="indexterm" name="id408368"></a> 342 342 Causes Samba to use default print commands applicable for the BSD (also known as RFC 1179 style or LPR/LPD) 343 343 printing system. In general, the <em class="parameter"><code>printing</code></em> parameter informs Samba about the print 344 344 subsystem it should expect. Samba supports CUPS, LPD, LPRNG, SYSV, HPUX, AIX, QNX, and PLP. Each of these 345 systems defaults to a different <a class=" indexterm" name="id385232"></a>print command(and other queue control commands).345 systems defaults to a different <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a> (and other queue control commands). 346 346 </p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3><p> 347 <a class="indexterm" name="id 385243"></a>348 <a class="indexterm" name="id 385250"></a>349 The <a class=" indexterm" name="id385257"></a>printingparameter is normally a service-level parameter. Since it is included347 <a class="indexterm" name="id408400"></a> 348 <a class="indexterm" name="id408406"></a> 349 The <a class="link" href="smb.conf.5.html#PRINTING">printing</a> parameter is normally a service-level parameter. Since it is included 350 350 here in the <em class="parameter"><code>[global]</code></em> section, it will take effect for all printer shares that are not 351 351 defined differently. Samba-3 no longer supports the SOFTQ printing system. 352 </p></div></dd><dt><span class="term"><a class=" indexterm" name="id385276"></a>load printers = yes</span></dt><dd><p>353 <a class="indexterm" name="id 385288"></a>354 <a class="indexterm" name="id 385294"></a>355 <a class="indexterm" name="id 385301"></a>356 <a class="indexterm" name="id 385308"></a>352 </p></div></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#LOADPRINTERS">load printers = yes </a></span></dt><dd><p> 353 <a class="indexterm" name="id408450"></a> 354 <a class="indexterm" name="id408456"></a> 355 <a class="indexterm" name="id408463"></a> 356 <a class="indexterm" name="id408470"></a> 357 357 Tells Samba to create automatically all available printer shares. Available printer shares are discovered by 358 358 scanning the printcap file. All created printer shares are also loaded for browsing. If you use this … … 361 361 <em class="parameter"><code>load printers = no</code></em> setting will allow you to specify each UNIX printer you want to 362 362 share separately, leaving out some you do not want to be publicly visible and available). 363 </p></dd><dt><span class="term"><a class=" indexterm" name="id385336"></a>show add printer wizard = yes</span></dt><dd><p>364 <a class="indexterm" name="id 385347"></a>365 <a class="indexterm" name="id 385354"></a>366 <a class="indexterm" name="id 385361"></a>367 <a class="indexterm" name="id 385367"></a>368 <a class="indexterm" name="id 385374"></a>363 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#SHOWADDPRINTERWIZARD">show add printer wizard = yes </a></span></dt><dd><p> 364 <a class="indexterm" name="id408512"></a> 365 <a class="indexterm" name="id408519"></a> 366 <a class="indexterm" name="id408526"></a> 367 <a class="indexterm" name="id408532"></a> 368 <a class="indexterm" name="id408539"></a> 369 369 Setting is normally enabled by default (even if the parameter is not specified in <code class="filename">smb.conf</code>). It causes the 370 370 <span class="guiicon">Add Printer Wizard</span> icon to appear in the <span class="guiicon">Printers</span> folder of the Samba … … 374 374 the <em class="parameter"><code>[print$]</code></em> share and associate it with a printer (if the respective queue exists 375 375 before the action), or exchange a printer's driver for any other previously uploaded driver. 376 </p></dd><dt><span class="term"><a class=" indexterm" name="id385434"></a>max print jobs = 100</span></dt><dd><p>377 <a class="indexterm" name="id 385446"></a>376 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#MAXPRINTJOBS">max print jobs = 100 </a></span></dt><dd><p> 377 <a class="indexterm" name="id408614"></a> 378 378 Sets the upper limit to 100 print jobs being active on the Samba server at any one time. Should a client 379 379 submit a job that exceeds this number, a "no more space available on server" type of error message will be 380 380 returned by Samba to the client. A setting of zero (the default) means there is <span class="emphasis"><em>no</em></span> limit 381 381 at all. 382 </p></dd><dt><span class="term"><a class=" indexterm" name="id385463"></a>printcap name = /etc/printcap</span></dt><dd><p>383 <a class="indexterm" name="id 385474"></a>384 <a class="indexterm" name="id 385481"></a>385 <a class="indexterm" name="id 385488"></a>382 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTCAPNAME">printcap name = /etc/printcap </a></span></dt><dd><p> 383 <a class="indexterm" name="id408647"></a> 384 <a class="indexterm" name="id408653"></a> 385 <a class="indexterm" name="id408660"></a> 386 386 Tells Samba where to look for a list of available printer names. Where CUPS is used, make sure that a printcap 387 387 file is written. This is controlled by the <code class="constant">Printcap</code> directive in the 388 388 <code class="filename">cupsd.conf</code> file. 389 </p></dd><dt><span class="term"><a class=" indexterm" name="id385509"></a>printer admin = @ntadmin</span></dt><dd><p>390 <a class="indexterm" name="id 385520"></a>391 <a class="indexterm" name="id 385527"></a>392 <a class="indexterm" name="id 385534"></a>393 <a class="indexterm" name="id 385541"></a>389 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin = @ntadmin </a></span></dt><dd><p> 390 <a class="indexterm" name="id408695"></a> 391 <a class="indexterm" name="id408701"></a> 392 <a class="indexterm" name="id408708"></a> 393 <a class="indexterm" name="id408715"></a> 394 394 Members of the ntadmin group should be able to add drivers and set printer properties 395 395 (<code class="constant">ntadmin</code> is only an example name; it needs to be a valid UNIX group name); root is 396 implicitly always a <a class=" indexterm" name="id385553"></a>printer admin. The <code class="literal">@</code> sign precedes group names396 implicitly always a <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a>. The <code class="literal">@</code> sign precedes group names 397 397 in the <code class="filename">/etc/group</code>. A printer admin can do anything to printers via the remote 398 administration interfaces offered by MS-RPC (see <a href="classicalprinting.html#cups-msrpc" title="Printing Developments Since Samba-2.2">Printing Developments Since399 Samba-2.2</a>). In larger installations, the <a class=" indexterm" name="id385582"></a>printer adminparameter is normally a398 administration interfaces offered by MS-RPC (see <a class="link" href="classicalprinting.html#cups-msrpc" title="Printing Developments Since Samba-2.2">Printing Developments Since 399 Samba-2.2</a>). In larger installations, the <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> parameter is normally a 400 400 per-share parameter. This permits different groups to administer each printer share. 401 </p></dd><dt><span class="term"><a class=" indexterm" name="id385592"></a>lpq cache time = 20</span></dt><dd><p>402 <a class="indexterm" name="id 385604"></a>403 <a class="indexterm" name="id 385611"></a>401 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#LPQCACHETIME">lpq cache time = 20 </a></span></dt><dd><p> 402 <a class="indexterm" name="id408788"></a> 403 <a class="indexterm" name="id408795"></a> 404 404 Controls the cache time for the results of the lpq command. It prevents the lpq command being called too often 405 405 and reduces the load on a heavily used print server. 406 </p></dd><dt><span class="term"><a class=" indexterm" name="id385622"></a>use client driver = no</span></dt><dd><p>407 <a class="indexterm" name="id 385634"></a>406 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#USECLIENTDRIVER">use client driver = no </a></span></dt><dd><p> 407 <a class="indexterm" name="id408821"></a> 408 408 If set to <code class="constant">yes</code>, only takes effect for Windows NT/200x/XP clients (and not for Win 409 409 95/98/ME). Its default value is <code class="constant">No</code> (or <code class="constant">False</code>). It must … … 412 412 explanations, see the <code class="filename">smb.conf</code> man page. 413 413 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ptrsect"></a>The [printers] Section</h4></div></div></div><p> 414 <a class="indexterm" name="id 385684"></a>415 <a class="indexterm" name="id 385691"></a>414 <a class="indexterm" name="id408871"></a> 415 <a class="indexterm" name="id408878"></a> 416 416 The printers section is the second special section. If a section with this name appears in the <code class="filename">smb.conf</code>, 417 417 users are able to connect to any printer specified in the Samba host's printcap file, because Samba on startup … … 420 420 settings that should apply as default to all printers. (For more details, see the <code class="filename">smb.conf</code> man page.) 421 421 Settings inside this container must be share-level parameters. 422 </p><div class="variablelist"><dl><dt><span class="term"><a class=" indexterm" name="id385720"></a>comment = All printers</span></dt><dd><p>423 The <a class=" indexterm" name="id385731"></a>commentis shown next to the share if422 </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#COMMENT">comment = All printers </a></span></dt><dd><p> 423 The <a class="link" href="smb.conf.5.html#COMMENT">comment</a> is shown next to the share if 424 424 a client queries the server, either via <span class="guiicon">Network Neighborhood</span> or with 425 425 the <code class="literal">net view</code> command, to list available shares. 426 </p></dd><dt><span class="term"><a class=" indexterm" name="id385755"></a>printable = yes</span></dt><dd><p>426 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTABLE">printable = yes </a></span></dt><dd><p> 427 427 The <em class="parameter"><code>[printers]</code></em> service <span class="emphasis"><em>must</em></span> 428 428 be declared as printable. If you specify otherwise, smbd will refuse to load at 429 429 startup. This parameter allows connected clients to open, write to, and submit spool files 430 into the directory specified with the <a class=" indexterm" name="id385778"></a>path430 into the directory specified with the <a class="link" href="smb.conf.5.html#PATH">path</a> 431 431 parameter for this service. It is used by Samba to differentiate printer shares from 432 432 file shares. 433 </p></dd><dt><span class="term"><a class=" indexterm" name="id385790"></a>path = /var/spool/samba</span></dt><dd><p>433 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PATH">path = /var/spool/samba </a></span></dt><dd><p> 434 434 Must point to a directory used by Samba to spool incoming print files. <span class="emphasis"><em>It 435 435 must not be the same as the spool directory specified in the configuration of your UNIX 436 436 print subsystem!</em></span> The path typically points to a directory that is world 437 437 writable, with the <span class="emphasis"><em>sticky</em></span> bit set to it. 438 </p></dd><dt><span class="term"><a class=" indexterm" name="id385816"></a>browseable = no</span></dt><dd><p>438 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#BROWSEABLE">browseable = no </a></span></dt><dd><p> 439 439 Is always set to <code class="constant">no</code> if 440 <a class=" indexterm" name="id385831"></a>printable = yes. It makes440 <a class="link" href="smb.conf.5.html#PRINTABLE">printable = yes</a>. It makes 441 441 the <em class="parameter"><code>[printer]</code></em> share itself invisible in the list of 442 442 available shares in a <code class="literal">net view</code> command or in the Explorer browse 443 443 list. (You will of course see the individual printers.) 444 </p></dd><dt><span class="term"><a class=" indexterm" name="id385855"></a>guest ok = yes</span></dt><dd><p>444 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#GUESTOK">guest ok = yes </a></span></dt><dd><p> 445 445 If this parameter is set to <code class="constant">yes</code>, no password is required to 446 446 connect to the printer's service. Access will be granted with the privileges of the 447 <a class=" indexterm" name="id385871"></a>guest account. On many systems the guest447 <a class="link" href="smb.conf.5.html#GUESTACCOUNT">guest account</a>. On many systems the guest 448 448 account will map to a user named "nobody." This user will usually be found 449 449 in the UNIX passwd file with an empty password, but with no valid UNIX login. On some … … 453 453 </p><p> 454 454 <strong class="userinput"><code>lpr -P printername /etc/motd</code></strong> 455 </p></dd><dt><span class="term"><a class=" indexterm" name="id385901"></a>public = yes</span></dt><dd><p>456 Is a synonym for <a class=" indexterm" name="id385912"></a>guest ok = yes.457 Since we have <a class=" indexterm" name="id385919"></a>guest ok = yes, it455 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PUBLIC">public = yes </a></span></dt><dd><p> 456 Is a synonym for <a class="link" href="smb.conf.5.html#GUESTOK">guest ok = yes</a>. 457 Since we have <a class="link" href="smb.conf.5.html#GUESTOK">guest ok = yes</a>, it 458 458 really does not need to be here. (This leads to the interesting question, “<span class="quote">What if I 459 459 by accident have two contradictory settings for the same share?</span>” The answer is that the … … 462 462 lines for the <em class="parameter"><code>guest account</code></em> parameter with different usernames, 463 463 and then run testparm to see which one is actually used by Samba.) 464 </p></dd><dt><span class="term"><a class=" indexterm" name="id385950"></a>read only = yes</span></dt><dd><p>464 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#READONLY">read only = yes </a></span></dt><dd><p> 465 465 Normally (for other types of shares) prevents users from creating or modifying files 466 466 in the service's directory. However, in a <span class="emphasis"><em>printable</em></span> service, it is 467 467 <span class="emphasis"><em>always</em></span> allowed to write to the directory (if user privileges allow the 468 468 connection), but only via print spooling operations. Normal write operations are not permitted. 469 </p></dd><dt><span class="term"><a class=" indexterm" name="id385975"></a>writable = no</span></dt><dd><p>470 Is a synonym for <a class=" indexterm" name="id385987"></a>read only = yes.471 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 385998"></a>Any [my_printer_name] Section</h4></div></div></div><p>472 <a class="indexterm" name="id 386006"></a>473 <a class="indexterm" name="id 386013"></a>469 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#WRITABLE">writable = no </a></span></dt><dd><p> 470 Is a synonym for <a class="link" href="smb.conf.5.html#READONLY">read only = yes</a>. 471 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id409231"></a>Any [my_printer_name] Section</h4></div></div></div><p> 472 <a class="indexterm" name="id409238"></a> 473 <a class="indexterm" name="id409245"></a> 474 474 If a <em class="parameter"><code>[my_printer_name]</code></em> section appears in the <code class="filename">smb.conf</code> file, which includes the 475 parameter <a class=" indexterm" name="id386032"></a>printable = yesSamba will configure it as a printer share.475 parameter <a class="link" href="smb.conf.5.html#PRINTABLE">printable = yes</a> Samba will configure it as a printer share. 476 476 Windows 9x/Me clients may have problems with connecting or loading printer drivers if the share name has more 477 477 than eight characters. Do not name a printer share with a name that may conflict with an existing user or file 478 478 share name. On client connection requests, Samba always tries to find file shares with that name first. If it 479 479 finds one, it will connect to this and will not connect to a printer with the same name! 480 </p><div class="variablelist"><dl><dt><span class="term"><a class=" indexterm" name="id386052"></a>comment = Printer with Restricted Access</span></dt><dd><p>480 </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#COMMENT">comment = Printer with Restricted Access </a></span></dt><dd><p> 481 481 The comment says it all. 482 </p></dd><dt><span class="term"><a class=" indexterm" name="id386067"></a>path = /var/spool/samba_my_printer</span></dt><dd><p>482 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PATH">path = /var/spool/samba_my_printer </a></span></dt><dd><p> 483 483 Sets the spooling area for this printer to a directory other than the default. It is not 484 484 necessary to set it differently, but the option is available. 485 </p></dd><dt><span class="term"><a class=" indexterm" name="id386084"></a>printer admin = kurt</span></dt><dd><p>485 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin = kurt </a></span></dt><dd><p> 486 486 The printer admin definition is different for this explicitly defined printer share from the general 487 487 <em class="parameter"><code>[printers]</code></em> share. It is not a requirement; we did it to show that it is possible. 488 </p></dd><dt><span class="term"><a class=" indexterm" name="id386108"></a>browseable = yes</span></dt><dd><p>488 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#BROWSEABLE">browseable = yes </a></span></dt><dd><p> 489 489 This makes the printer browseable so the clients may conveniently find it when browsing the 490 490 <span class="guiicon">Network Neighborhood</span>. 491 </p></dd><dt><span class="term"><a class=" indexterm" name="id386130"></a>printable = yes</span></dt><dd><p>492 See <a href="classicalprinting.html#ptrsect" title="The [printers] Section">Section 20.4.1.2</a>.493 </p></dd><dt><span class="term"><a class=" indexterm" name="id386154"></a>writable = no</span></dt><dd><p>494 See <a href="classicalprinting.html#ptrsect" title="The [printers] Section">Section 20.4.1.2</a>.495 </p></dd><dt><span class="term"><a class=" indexterm" name="id386176"></a>hosts allow = 10.160.50.,10.160.51.</span></dt><dd><p>496 Here we exercise a certain degree of access control by using the <a class=" indexterm" name="id386188"></a>hosts allow497 and <a class=" indexterm" name="id386196"></a>hosts denyparameters. This is not by any means a safe bet. It is not a491 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTABLE">printable = yes </a></span></dt><dd><p> 492 See <a class="link" href="classicalprinting.html#ptrsect" title="The [printers] Section">Section 20.4.1.2</a>. 493 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#WRITABLE">writable = no </a></span></dt><dd><p> 494 See <a class="link" href="classicalprinting.html#ptrsect" title="The [printers] Section">Section 20.4.1.2</a>. 495 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#HOSTSALLOW">hosts allow = 10.160.50.,10.160.51. </a></span></dt><dd><p> 496 Here we exercise a certain degree of access control by using the <a class="link" href="smb.conf.5.html#HOSTSALLOW">hosts allow</a> 497 and <a class="link" href="smb.conf.5.html#HOSTSDENY">hosts deny</a> parameters. This is not by any means a safe bet. It is not a 498 498 way to secure your printers. This line accepts all clients from a certain subnet in a first evaluation of 499 499 access control. 500 </p></dd><dt><span class="term"><a class=" indexterm" name="id386208"></a>hosts deny = turbo_xp,10.160.50.23,10.160.51.60</span></dt><dd><p>500 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#HOSTSDENY">hosts deny = turbo_xp,10.160.50.23,10.160.51.60 </a></span></dt><dd><p> 501 501 All listed hosts are not allowed here (even if they belong to the allowed subnets). As 502 502 you can see, you could name IP addresses as well as NetBIOS hostnames here. 503 </p></dd><dt><span class="term"><a class=" indexterm" name="id386226"></a>guest ok = no</span></dt><dd><p>503 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#GUESTOK">guest ok = no </a></span></dt><dd><p> 504 504 This printer is not open for the guest account. 505 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 386242"></a>Print Commands</h4></div></div></div><p>506 <a class="indexterm" name="id 386250"></a>507 <a class="indexterm" name="id 386257"></a>508 <a class="indexterm" name="id 386263"></a>509 <a class="indexterm" name="id 386270"></a>505 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id409507"></a>Print Commands</h4></div></div></div><p> 506 <a class="indexterm" name="id409515"></a> 507 <a class="indexterm" name="id409522"></a> 508 <a class="indexterm" name="id409528"></a> 509 <a class="indexterm" name="id409535"></a> 510 510 In each section defining a printer (or in the <em class="parameter"><code>[printers]</code></em> section), 511 511 a <em class="parameter"><code>print command</code></em> parameter may be defined. It sets a command to process the files 512 512 that have been placed into the Samba print spool directory for that printer. (That spool directory was, 513 if you remember, set up with the <a class=" indexterm" name="id386291"></a>pathparameter). Typically,513 if you remember, set up with the <a class="link" href="smb.conf.5.html#PATH">path</a> parameter). Typically, 514 514 this command will submit the spool file to the Samba host's print subsystem, using the suitable system 515 515 print command. But there is no requirement that this needs to be the case. For debugging or … … 519 519 make sure you pay attention to the need to remove the files from the Samba spool directory. Otherwise, 520 520 your hard disk may soon suffer from shortage of free space. 521 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 386306"></a>Default UNIX System Printing Commands</h4></div></div></div><p>522 <a class="indexterm" name="id 386314"></a>521 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id409575"></a>Default UNIX System Printing Commands</h4></div></div></div><p> 522 <a class="indexterm" name="id409582"></a> 523 523 You learned earlier that Samba, in most cases, uses its built-in settings for many parameters if it cannot 524 find an explicitly stated one in its configuration file. The same is true for the <a class=" indexterm" name="id386322"></a>print command. The default print command varies depending on the <a class="indexterm" name="id386330"></a>printingparameter525 setting. In the commands listed in <a href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing Settings</a> , you will524 find an explicitly stated one in its configuration file. The same is true for the <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a>. The default print command varies depending on the <a class="link" href="smb.conf.5.html#PRINTING">printing</a> parameter 525 setting. In the commands listed in <a class="link" href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing Settings</a> , you will 526 526 notice some parameters of the form <span class="emphasis"><em>%X</em></span> where <span class="emphasis"><em>X</em></span> is <span class="emphasis"><em>p, s, 527 527 J</em></span>, and so on. These letters stand for printer name, spool file, and job ID, respectively. They are 528 explained in more detail in <a href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing Settings</a> presents an overview529 of key printing options but excludes the special case of CUPS, is discussed in <a href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing Support</a>.530 </p><div class="table"><a name="printOptions"></a><p class="title"><b>Table 21.1. Default Printing Settings</b></p><div class="table-contents"><table summary="Default Printing Settings" border="1"><colgroup><col align="left"><col align="left"></colgroup><thead><tr><th align="left">Setting</th><th align="left">Default Printing Commands</th></tr></thead><tbody><tr><td align="left"><a class=" indexterm" name="id386421"></a>printing = bsd|aix|lprng|plp</td><td align="left">print command is <code class="literal">lpr -r -P%p %s</code></td></tr><tr><td align="left"><a class="indexterm" name="id386442"></a>printing = sysv|hpux</td><td align="left">print command is <code class="literal">lp -c -P%p %s; rm %s</code></td></tr><tr><td align="left"> <a class="indexterm" name="id386464"></a>printing = qnx</td><td align="left">print command is <code class="literal">lp -r -P%p -s %s</code></td></tr><tr><td align="left"><a class="indexterm" name="id386484"></a>printing = bsd|aix|lprng|plp</td><td align="left">lpq command is <code class="literal">lpq -P%p</code></td></tr><tr><td align="left"><a class="indexterm" name="id386505"></a>printing = sysv|hpux</td><td align="left">lpq command is <code class="literal">lpstat -o%p</code></td></tr><tr><td align="left"><a class="indexterm" name="id386525"></a>printing = qnx</td><td align="left">lpq command is <code class="literal">lpq -P%p</code></td></tr><tr><td align="left"><a class="indexterm" name="id386546"></a>printing = bsd|aix|lprng|plp</td><td align="left">lprm command is <code class="literal">lprm -P%p %j</code></td></tr><tr><td align="left"><a class="indexterm" name="id386566"></a>printing = sysv|hpux</td><td align="left">lprm command is <code class="literal">cancel %p-%j</code></td></tr><tr><td align="left"><a class="indexterm" name="id386587"></a>printing = qnx</td><td align="left">lprm command is <code class="literal">cancel %p-%j</code></td></tr><tr><td align="left"><a class="indexterm" name="id386608"></a>printing = bsd|aix|lprng|plp</td><td align="left">lppause command is <code class="literal">lp -i %p-%j -H hold</code></td></tr><tr><td align="left"><a class="indexterm" name="id386628"></a>printing = sysv|hpux</td><td align="left">lppause command (...is empty)</td></tr><tr><td align="left"><a class="indexterm" name="id386644"></a>printing = qnx</td><td align="left">lppause command (...is empty)</td></tr><tr><td align="left"><a class="indexterm" name="id386660"></a>printing = bsd|aix|lprng|plp</td><td align="left">lpresume command is <code class="literal">lp -i %p-%j -H resume</code></td></tr><tr><td align="left"><a class="indexterm" name="id386681"></a>printing = sysv|hpux</td><td align="left">lpresume command (...is empty)</td></tr><tr><td align="left"><a class="indexterm" name="id386697"></a>printing = qnx</td><td align="left">lpresume command (...is empty)</td></tr></tbody></table></div></div><br class="table-break"><p>531 <a class="indexterm" name="id 386715"></a>532 <a class="indexterm" name="id 386722"></a>533 <a class="indexterm" name="id 386729"></a>534 <a class="indexterm" name="id 386735"></a>528 explained in more detail in <a class="link" href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing Settings</a> presents an overview 529 of key printing options but excludes the special case of CUPS, is discussed in <a class="link" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing Support</a>. 530 </p><div class="table"><a name="printOptions"></a><p class="title"><b>Table 21.1. Default Printing Settings</b></p><div class="table-contents"><table summary="Default Printing Settings" border="1"><colgroup><col align="left"><col align="left"></colgroup><thead><tr><th align="left">Setting</th><th align="left">Default Printing Commands</th></tr></thead><tbody><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd|aix|lprng|plp</a></td><td align="left">print command is <code class="literal">lpr -r -P%p %s</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = sysv|hpux</a></td><td align="left">print command is <code class="literal">lp -c -P%p %s; rm %s</code></td></tr><tr><td align="left"> <a class="link" href="smb.conf.5.html#PRINTING">printing = qnx</a></td><td align="left">print command is <code class="literal">lp -r -P%p -s %s</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd|aix|lprng|plp</a></td><td align="left">lpq command is <code class="literal">lpq -P%p</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = sysv|hpux</a></td><td align="left">lpq command is <code class="literal">lpstat -o%p</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = qnx</a></td><td align="left">lpq command is <code class="literal">lpq -P%p</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd|aix|lprng|plp</a></td><td align="left">lprm command is <code class="literal">lprm -P%p %j</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = sysv|hpux</a></td><td align="left">lprm command is <code class="literal">cancel %p-%j</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = qnx</a></td><td align="left">lprm command is <code class="literal">cancel %p-%j</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd|aix|lprng|plp</a></td><td align="left">lppause command is <code class="literal">lp -i %p-%j -H hold</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = sysv|hpux</a></td><td align="left">lppause command (...is empty)</td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = qnx</a></td><td align="left">lppause command (...is empty)</td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = bsd|aix|lprng|plp</a></td><td align="left">lpresume command is <code class="literal">lp -i %p-%j -H resume</code></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = sysv|hpux</a></td><td align="left">lpresume command (...is empty)</td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#PRINTING">printing = qnx</a></td><td align="left">lpresume command (...is empty)</td></tr></tbody></table></div></div><br class="table-break"><p> 531 <a class="indexterm" name="id410022"></a> 532 <a class="indexterm" name="id410029"></a> 533 <a class="indexterm" name="id410036"></a> 534 <a class="indexterm" name="id410042"></a> 535 535 For <em class="parameter"><code>printing = CUPS</code></em>, if Samba is compiled against libcups, it uses the CUPS API to 536 submit jobs. (It is a good idea also to set <a class=" indexterm" name="id386749"></a>printcap = cupsin case your536 submit jobs. (It is a good idea also to set <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = cups</a> in case your 537 537 <code class="filename">cupsd.conf</code> is set to write its autogenerated printcap file to an unusual place). 538 538 Otherwise, Samba maps to the System V printing commands with the -oraw option for printing; that is, it uses 539 539 <code class="literal">lp -c -d%p -oraw; rm %s</code>. With <em class="parameter"><code>printing = cups</code></em>, and if Samba is 540 540 compiled against libcups, any manually set print command will be ignored! 541 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 386779"></a>Custom Print Commands</h4></div></div></div><p>542 <a class="indexterm" name="id 386786"></a>543 <a class="indexterm" name="id 386793"></a>544 After a print job has finished spooling to a service, the <a class=" indexterm" name="id386801"></a>print commandwill be used541 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id410090"></a>Custom Print Commands</h4></div></div></div><p> 542 <a class="indexterm" name="id410098"></a> 543 <a class="indexterm" name="id410105"></a> 544 After a print job has finished spooling to a service, the <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a> will be used 545 545 by Samba via a system() call to process the spool file. Usually the command specified will submit the spool 546 546 file to the host's printing subsystem. But there is no requirement at all that this must be the case. The … … 548 548 that the spool file is deleted after it has been processed. 549 549 </p><p> 550 <a class="indexterm" name="id 386814"></a>551 <a class="indexterm" name="id 386821"></a>552 <a class="indexterm" name="id 386828"></a>553 <a class="indexterm" name="id 386835"></a>550 <a class="indexterm" name="id410133"></a> 551 <a class="indexterm" name="id410139"></a> 552 <a class="indexterm" name="id410146"></a> 553 <a class="indexterm" name="id410153"></a> 554 554 There is no difficulty with using your own customized print commands with the traditional printing systems. 555 555 However, if you do not wish to roll your own, you should be well informed about the default built-in commands 556 that Samba uses for each printing subsystem (see <a href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing556 that Samba uses for each printing subsystem (see <a class="link" href="classicalprinting.html#printOptions" title="Table 21.1. Default Printing Settings">Default Printing 557 557 Settings</a>). In all the commands listed in the last paragraphs, you see parameters of the form 558 558 <span class="emphasis"><em>%X</em></span>. These are <span class="emphasis"><em>macros</em></span>, or shortcuts, used as placeholders for the … … 561 561 printing, the following ones do have special relevance: 562 562 </p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>%s, %f</code></em> the path to the spool file name.</p></li><li><p><em class="parameter"><code>%p</code></em> the appropriate printer name.</p></li><li><p><em class="parameter"><code>%J</code></em> the job name as transmitted by the client.</p></li><li><p><em class="parameter"><code>%c</code></em> the number of printed pages of the spooled job (if known).</p></li><li><p><em class="parameter"><code>%z</code></em> the size of the spooled print job (in bytes).</p></li></ul></div><p> 563 <a class="indexterm" name="id 386926"></a>563 <a class="indexterm" name="id410244"></a> 564 564 The print command must contain at least one occurrence of <em class="parameter"><code>%s</code></em> or 565 565 <em class="parameter"><code>%f</code></em>. The <em class="parameter"><code>%p</code></em> is optional. If no printer name is supplied, … … 567 567 sent to the default printer. 568 568 </p><p> 569 <a class="indexterm" name="id 386961"></a>570 <a class="indexterm" name="id 386967"></a>569 <a class="indexterm" name="id410279"></a> 570 <a class="indexterm" name="id410286"></a> 571 571 If specified in the <em class="parameter"><code>[global]</code></em> section, the print command given will be 572 572 used for any printable service that does not have its own print command specified. If there is neither a … … 574 574 but not processed! Most importantly, print files will not be removed, so they will consume disk space. 575 575 </p><p> 576 <a class="indexterm" name="id 386986"></a>577 <a class="indexterm" name="id 386993"></a>576 <a class="indexterm" name="id410305"></a> 577 <a class="indexterm" name="id410311"></a> 578 578 Printing may fail on some UNIX systems when using the <span class="emphasis"><em>nobody</em></span> account. If this happens, create an 579 579 alternative guest account and give it the privilege to print. Set up this guest account in the 580 580 <em class="parameter"><code>[global]</code></em> section with the <em class="parameter"><code>guest account</code></em> parameter. 581 581 </p><p> 582 <a class="indexterm" name="id 387020"></a>583 <a class="indexterm" name="id 387027"></a>584 <a class="indexterm" name="id 387034"></a>582 <a class="indexterm" name="id410339"></a> 583 <a class="indexterm" name="id410345"></a> 584 <a class="indexterm" name="id410352"></a> 585 585 You can form quite complex print commands. You need to realize that print commands are just 586 586 passed to a UNIX shell. The shell is able to expand the included environment variables as 587 587 usual. (The syntax to include a UNIX environment variable <em class="parameter"><code>$variable</code></em> 588 588 in the Samba print command is <em class="parameter"><code>%$variable</code></em>.) To give you a working 589 <a class=" indexterm" name="id387055"></a>print commandexample, the following will log a print job589 <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a> example, the following will log a print job 590 590 to <code class="filename">/tmp/print.log</code>, print the file, then remove it. The semicolon (“<span class="quote">;</span>” 591 591 is the usual separator for commands in shell scripts: 592 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 387080"></a><em class="parameter"><code>print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s</code></em></td></tr></table><p>592 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id410402"></a><em class="parameter"><code>print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s</code></em></td></tr></table><p> 593 593 You may have to vary your own command considerably from this example depending on how you normally print 594 files on your system. The default for the <a class=" indexterm" name="id387098"></a>print command595 parameter varies depending on the setting of the <a class=" indexterm" name="id387105"></a>printing594 files on your system. The default for the <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a> 595 parameter varies depending on the setting of the <a class="link" href="smb.conf.5.html#PRINTING">printing</a> 596 596 parameter. Another example is: 597 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 387120"></a><em class="parameter"><code>print command = /usr/local/samba/bin/myprintscript %p %s</code></em></td></tr></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cups-msrpc"></a>Printing Developments Since Samba-2.2</h2></div></div></div><p>598 <a class="indexterm" name="id 387148"></a>599 <a class="indexterm" name="id 387155"></a>600 <a class="indexterm" name="id 387162"></a>597 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id410447"></a><em class="parameter"><code>print command = /usr/local/samba/bin/myprintscript %p %s</code></em></td></tr></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cups-msrpc"></a>Printing Developments Since Samba-2.2</h2></div></div></div><p> 598 <a class="indexterm" name="id410474"></a> 599 <a class="indexterm" name="id410481"></a> 600 <a class="indexterm" name="id410488"></a> 601 601 Prior to Samba-2.2.x, print server support for Windows clients was limited to <span class="emphasis"><em>LanMan</em></span> 602 602 printing calls. This is the same protocol level as Windows 9x/Me PCs offer when they share printers. … … 607 607 The additional functionality provided by the new SPOOLSS support includes: 608 608 </p><div class="itemizedlist"><ul type="disc"><li><p> 609 <a class="indexterm" name="id 387193"></a>609 <a class="indexterm" name="id410519"></a> 610 610 Support for downloading printer driver files to Windows 95/98/NT/2000 clients upon 611 611 demand (<span class="emphasis"><em>Point'n'Print</em></span>). 612 612 </p></li><li><p> 613 <a class="indexterm" name="id 387209"></a>613 <a class="indexterm" name="id410535"></a> 614 614 Uploading of printer drivers via the Windows NT <span class="emphasis"><em>Add Printer Wizard</em></span> (APW) 615 or the <a href="http://imprints.sourceforge.net/" target="_top">Imprints</a> tool set.615 or the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> tool set. 616 616 </p></li><li><p> 617 <a class="indexterm" name="id 387230"></a>618 <a class="indexterm" name="id 387237"></a>619 <a class="indexterm" name="id 387244"></a>620 <a class="indexterm" name="id 387250"></a>621 <a class="indexterm" name="id 387257"></a>617 <a class="indexterm" name="id410556"></a> 618 <a class="indexterm" name="id410563"></a> 619 <a class="indexterm" name="id410570"></a> 620 <a class="indexterm" name="id410576"></a> 621 <a class="indexterm" name="id410583"></a> 622 622 Support for the native MS-RPC printing calls such as StartDocPrinter, EnumJobs(), and so on. (See the 623 <a href="http://msdn.microsoft.com/" target="_top">MSDN documentation</a> for more information on the623 <a class="ulink" href="http://msdn.microsoft.com/" target="_top">MSDN documentation</a> for more information on the 624 624 Win32 printing API). 625 625 </p></li><li><p> 626 <a class="indexterm" name="id 387276"></a>627 <a class="indexterm" name="id 387282"></a>626 <a class="indexterm" name="id410602"></a> 627 <a class="indexterm" name="id410608"></a> 628 628 Support for NT Access Control Lists (ACL) on printer objects. 629 629 </p></li><li><p> 630 <a class="indexterm" name="id 387294"></a>630 <a class="indexterm" name="id410620"></a> 631 631 Improved support for printer queue manipulation through the use of internal databases for spooled 632 632 job information (implemented by various <code class="filename">*.tdb</code> files). 633 633 </p></li></ul></div><p> 634 <a class="indexterm" name="id 387312"></a>635 <a class="indexterm" name="id 387319"></a>634 <a class="indexterm" name="id410638"></a> 635 <a class="indexterm" name="id410645"></a> 636 636 A benefit of updating is that Samba-3 is able to publish its printers to Active Directory (or LDAP). 637 637 </p><p> 638 <a class="indexterm" name="id 387330"></a>638 <a class="indexterm" name="id410656"></a> 639 639 A fundamental difference exists between MS Windows NT print servers and Samba operation. Windows NT 640 640 permits the installation of local printers that are not shared. This is an artifact of the fact that … … 642 642 printers that are made available, either by default or by specific declaration via printer-specific shares. 643 643 </p><p> 644 <a class="indexterm" name="id 387344"></a>645 <a class="indexterm" name="id 387350"></a>646 <a class="indexterm" name="id 387357"></a>647 <a class="indexterm" name="id 387364"></a>648 <a class="indexterm" name="id 387370"></a>644 <a class="indexterm" name="id410670"></a> 645 <a class="indexterm" name="id410676"></a> 646 <a class="indexterm" name="id410683"></a> 647 <a class="indexterm" name="id410690"></a> 648 <a class="indexterm" name="id410696"></a> 649 649 Windows NT/200x/XP Professional clients do not have to use the standard SMB printer share; they can 650 650 print directly to any printer on another Windows NT host using MS-RPC. This, of course, assumes that … … 653 653 <span class="emphasis"><em>Everyone</em></span> group. (The older clients of type Windows 9x/Me can only print to shared 654 654 printers.) 655 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 387386"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p>656 <a class="indexterm" name="id 387394"></a>655 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id410712"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p> 656 <a class="indexterm" name="id410720"></a> 657 657 There is much confusion about what all this means. The question is often asked, “<span class="quote">Is it or is 658 658 it not necessary for printer drivers to be installed on a Samba host in order to support printing from 659 659 Windows clients?</span>” The answer to this is no, it is not necessary. 660 660 </p><p> 661 <a class="indexterm" name="id 387410"></a>662 <a class="indexterm" name="id 387417"></a>661 <a class="indexterm" name="id410736"></a> 662 <a class="indexterm" name="id410743"></a> 663 663 Windows NT/2000 clients can, of course, also run their APW to install drivers <span class="emphasis"><em>locally</em></span> 664 664 (which then connect to a Samba-served print queue). This is the same method used by Windows 9x/Me … … 666 666 require that the Samba server possess a valid driver for the printer. This was fixed in Samba 2.2.1). 667 667 </p><p> 668 <a class="indexterm" name="id 387434"></a>669 <a class="indexterm" name="id 387440"></a>668 <a class="indexterm" name="id410760"></a> 669 <a class="indexterm" name="id410766"></a> 670 670 But it is a new capability to install the printer drivers into the <em class="parameter"><code>[print$]</code></em> 671 671 share of the Samba server, and a big convenience, too. Then <span class="emphasis"><em>all</em></span> clients … … 683 683 Using <span class="emphasis"><em>cupsaddsmb</em></span> (only works for the CUPS printing system, not for LPR/LPD, LPRng, and so on). 684 684 </p></li></ul></div><p> 685 <a class="indexterm" name="id 387517"></a>686 <a class="indexterm" name="id 387524"></a>685 <a class="indexterm" name="id410843"></a> 686 <a class="indexterm" name="id410850"></a> 687 687 Samba does not use these uploaded drivers in any way to process spooled files. These drivers are utilized 688 688 entirely by the clients who download and install them via the “<span class="quote">Point'n'Print</span>” mechanism … … 690 690 (or the UNIX print system) requires. Print files received by Samba are handed over to the UNIX printing 691 691 system, which is responsible for all further processing, as needed. 692 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 387540"></a>The Obsoleted [printer$] Section</h3></div></div></div><p>693 <a class="indexterm" name="id 387548"></a>694 <a class="indexterm" name="id 387555"></a>692 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id410866"></a>The Obsoleted [printer$] Section</h3></div></div></div><p> 693 <a class="indexterm" name="id410874"></a> 694 <a class="indexterm" name="id410881"></a> 695 695 Versions of Samba prior to 2.2 made it possible to use a share named <em class="parameter"><code>[printer$]</code></em>. This 696 696 name was taken from the same named service created by Windows 9x/Me clients when a printer was shared by them. … … 702 702 be sent to the client. 703 703 </p><p> 704 <a class="indexterm" name="id 387594"></a>705 <a class="indexterm" name="id 387601"></a>706 <a class="indexterm" name="id 387608"></a>704 <a class="indexterm" name="id410920"></a> 705 <a class="indexterm" name="id410927"></a> 706 <a class="indexterm" name="id410934"></a> 707 707 These parameters, including the <em class="parameter"><code>printer driver file</code></em> parameter, 708 708 are now removed and cannot be used in installations of Samba-3. The share name … … 714 714 9x/Me clients are now thrown aside. They can use Samba's <em class="parameter"><code>[print$]</code></em> 715 715 share support just fine. 716 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 387651"></a>Creating the [print$] Share</h3></div></div></div><p>717 <a class="indexterm" name="id 387658"></a>716 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id410977"></a>Creating the [print$] Share</h3></div></div></div><p> 717 <a class="indexterm" name="id410984"></a> 718 718 In order to support the uploading and downloading of printer driver files, you must first configure a 719 719 file share named <em class="parameter"><code>[print$]</code></em>. The public name of this share is hard coded … … 723 723 You should modify the server's file to add the global parameters and create the 724 724 <em class="parameter"><code>[print$]</code></em> file share (of course, some of the parameter values, such 725 as <a class=" indexterm" name="id387685"></a>path, are arbitrary and should be replaced with appropriate values for your726 site). See <a href="classicalprinting.html#prtdollar" title="Example 21.3. [print$] Example">[print\$] Example</a>.727 </p><div class="example"><a name="prtdollar"></a><p class="title"><b>Example 21.3. [print$] Example</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># members of the ntadmin group should be able to add drivers and set</td></tr><tr><td># printer properties. root is implicitly always a 'printer admin'.</td></tr><tr><td><a class="indexterm" name="id 387732"></a><em class="parameter"><code>printer admin = @ntadmin</code></em></td></tr><tr><td># ...</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td># ...</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[print$]</code></em></td></tr><tr><td><a class="indexterm" name="id387769"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id387782"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id387794"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id387807"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id387819"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id387832"></a><em class="parameter"><code>write list = @ntadmin, root</code></em></td></tr></table></div></div><br class="example-break"><p>725 as <a class="link" href="smb.conf.5.html#PATH">path</a>, are arbitrary and should be replaced with appropriate values for your 726 site). See <a class="link" href="classicalprinting.html#prtdollar" title="Example 21.3. [print$] Example">[print\$] Example</a>. 727 </p><div class="example"><a name="prtdollar"></a><p class="title"><b>Example 21.3. [print$] Example</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># members of the ntadmin group should be able to add drivers and set</td></tr><tr><td># printer properties. root is implicitly always a 'printer admin'.</td></tr><tr><td><a class="indexterm" name="id411061"></a><em class="parameter"><code>printer admin = @ntadmin</code></em></td></tr><tr><td># ...</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td># ...</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[print$]</code></em></td></tr><tr><td><a class="indexterm" name="id411097"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id411109"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id411120"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id411132"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id411143"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id411155"></a><em class="parameter"><code>write list = @ntadmin, root</code></em></td></tr></table></div></div><br class="example-break"><p> 728 728 Of course, you also need to ensure that the directory named by the 729 <a class=" indexterm" name="id387848"></a>pathparameter exists on the UNIX file system.730 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 387858"></a>[print$] Stanza Parameters</h3></div></div></div><p>731 <a class="indexterm" name="id 387866"></a>732 <a class="indexterm" name="id 387873"></a>733 <a class="indexterm" name="id 387879"></a>734 <a class="indexterm" name="id 387886"></a>735 <a class="indexterm" name="id 387893"></a>729 <a class="link" href="smb.conf.5.html#PATH">path</a> parameter exists on the UNIX file system. 730 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id411183"></a>[print$] Stanza Parameters</h3></div></div></div><p> 731 <a class="indexterm" name="id411191"></a> 732 <a class="indexterm" name="id411198"></a> 733 <a class="indexterm" name="id411205"></a> 734 <a class="indexterm" name="id411211"></a> 735 <a class="indexterm" name="id411218"></a> 736 736 The <em class="parameter"><code>[print$]</code></em> is a special section in <code class="filename">smb.conf</code>. It contains settings relevant to 737 737 potential printer driver download and is used by Windows clients for local print driver installation. 738 738 The following parameters are frequently needed in this share section: 739 </p><div class="variablelist"><dl><dt><span class="term"><a class=" indexterm" name="id387919"></a>comment = Printer Driver Download Area</span></dt><dd><p>739 </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#COMMENT">comment = Printer Driver Download Area </a></span></dt><dd><p> 740 740 The comment appears next to the share name if it is listed in a share list (usually Windows 741 741 clients will not see it, but it will also appear up in a <code class="literal">smbclient -L sambaserver 742 742 </code> output). 743 </p></dd><dt><span class="term"><a class=" indexterm" name="id387942"></a>path = /etc/samba/printers</span></dt><dd><p>743 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PATH">path = /etc/samba/printers </a></span></dt><dd><p> 744 744 The path to the location of the Windows driver file deposit from the UNIX point of view. 745 </p></dd><dt><span class="term"><a class=" indexterm" name="id387959"></a>browseable = no</span></dt><dd><p>745 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#BROWSEABLE">browseable = no </a></span></dt><dd><p> 746 746 Makes the <em class="parameter"><code>[print$]</code></em> share invisible to clients from the 747 747 <span class="guimenu">Network Neighborhood</span>. By excuting from a <code class="literal">cmd</code> shell: … … 751 751 you can still mount it from any client. This can also be done from the 752 752 <span class="guimenu">Connect network drive menu></span> from Windows Explorer. 753 </p></dd><dt><span class="term"><a class=" indexterm" name="id388017"></a>guest ok = yes</span></dt><dd><p>753 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#GUESTOK">guest ok = yes </a></span></dt><dd><p> 754 754 Gives read-only access to this share for all guest users. Access may be granted to 755 755 download and install printer drivers on clients. The requirement for <em class="parameter"><code>guest ok … … 762 762 access is not necessary. Of course, in a workgroup environment where you just want 763 763 to print without worrying about silly accounts and security, then configure the share for 764 guest access. You should consider adding <a class=" indexterm" name="id388046"></a>map to guest = Bad User764 guest access. You should consider adding <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = Bad User</a> 765 765 in the <em class="parameter"><code>[global]</code></em> section as well. Make sure you understand what this 766 766 parameter does before using it. 767 </p></div></dd><dt><span class="term"><a class=" indexterm" name="id388065"></a>read only = yes</span></dt><dd><p>767 </p></div></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#READONLY">read only = yes </a></span></dt><dd><p> 768 768 Because we do not want everybody to upload driver files (or even change driver settings), 769 769 we tagged this share as not writable. 770 </p></dd><dt><span class="term"><a class=" indexterm" name="id388082"></a>write list = @ntadmin, root</span></dt><dd><p>770 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#WRITELIST">write list = @ntadmin, root </a></span></dt><dd><p> 771 771 The <em class="parameter"><code>[print$]</code></em> was made read-only by the previous 772 772 setting so we should create a <em class="parameter"><code>write list</code></em> entry also. UNIX … … 776 776 account in this setting. Check the file system permissions to make sure these accounts 777 777 can copy files to the share. If this is a non-root account, then the account should also 778 be mentioned in the global <a class=" indexterm" name="id388113"></a>printer admin778 be mentioned in the global <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> 779 779 parameter. See the <code class="filename">smb.conf</code> man page for more information on configuring file shares. 780 </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 388131"></a>The [print$] Share Directory</h3></div></div></div><p>780 </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id411476"></a>The [print$] Share Directory</h3></div></div></div><p> 781 781 In order for a Windows NT print server to support the downloading of driver files by multiple client 782 782 architectures, you must create several subdirectories within the <em class="parameter"><code>[print$]</code></em> 783 service (i.e., the UNIX directory named by the <a class=" indexterm" name="id388146"></a>path783 service (i.e., the UNIX directory named by the <a class="link" href="smb.conf.5.html#PATH">path</a> 784 784 parameter). These correspond to each of the supported client architectures. Samba follows this model as 785 785 well. Just like the name of the <em class="parameter"><code>[print$]</code></em> share itself, the subdirectories … … 813 813 have located the server, navigate to its <span class="guiicon">Printers and Faxes</span> folder. You should see 814 814 an initial listing of printers that matches the printer shares defined on your Samba host. 815 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 388254"></a>Installing Drivers into [print$]</h2></div></div></div><p>815 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id411602"></a>Installing Drivers into [print$]</h2></div></div></div><p> 816 816 Have you successfully created the <em class="parameter"><code>[print$]</code></em> share in <code class="filename">smb.conf</code>, and have you forced 817 817 Samba to reread its <code class="filename">smb.conf</code> file? Good. But you are not yet ready to use the new facility. The client … … 829 829 </p></li></ul></div><p> 830 830 The latter option is probably the easier one (even if the process may seem a little bit weird at first). 831 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 388339"></a>Add Printer Wizard Driver Installation</h3></div></div></div><p>831 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id411687"></a>Add Printer Wizard Driver Installation</h3></div></div></div><p> 832 832 The printers initially listed in the Samba host's <span class="guiicon">Printers</span> folder accessed from a 833 833 client's Explorer will have no real printer driver assigned to them. By default this driver name is set … … 855 855 Once the APW is started, the procedure is exactly the same as the one you are familiar with in Windows (we 856 856 assume here that you are familiar with the printer driver installations procedure on Windows NT). Make sure 857 your connection is, in fact, set up as a user with <a class=" indexterm" name="id388439"></a>printer admin857 your connection is, in fact, set up as a user with <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> 858 858 privileges (if in doubt, use <code class="literal">smbstatus</code> to check for this). If you wish to install 859 859 printer drivers for client operating systems other than <span class="application">Windows NT x86</span>, … … 861 861 </p><p> 862 862 Assuming you have connected with an administrative (or root) account (as named by the 863 <a class=" indexterm" name="id388469"></a>printer adminparameter), you will also be able to modify863 <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> parameter), you will also be able to modify 864 864 other printer properties such as ACLs and default device settings using this dialog. For the default 865 device settings, please consider the advice given further in <a href="classicalprinting.html#inst-rpc" title="Installing Print Drivers Using rpcclient">Installing865 device settings, please consider the advice given further in <a class="link" href="classicalprinting.html#inst-rpc" title="Installing Print Drivers Using rpcclient">Installing 866 866 Print Drivers Using <code class="literal">rpcclient</code></a>. 867 867 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="inst-rpc"></a>Installing Print Drivers Using <code class="literal">rpcclient</code></h3></div></div></div><p> … … 880 880 </p></li></ol></div><p> 881 881 We provide detailed hints for each of these steps in the paragraphs that follow. 882 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 388584"></a>Identifying Driver Files</h4></div></div></div><p>883 <a class="indexterm" name="id 388591"></a>884 <a class="indexterm" name="id 388598"></a>885 <a class="indexterm" name="id 388605"></a>882 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id411938"></a>Identifying Driver Files</h4></div></div></div><p> 883 <a class="indexterm" name="id411946"></a> 884 <a class="indexterm" name="id411953"></a> 885 <a class="indexterm" name="id411960"></a> 886 886 To find out about the driver files, you have two options. You can check the contents of the driver 887 887 CDROM that came with your printer. Study the <code class="filename">*.inf</code> files located on the CD-ROM. This … … 891 891 extremely difficult to identify the driver files required. 892 892 </p><p> 893 <a class="indexterm" name="id 388631"></a>893 <a class="indexterm" name="id411986"></a> 894 894 Then you have the second option. Install the driver locally on a Windows client and 895 895 investigate which filenames and paths it uses after they are installed. (You need to repeat … … 898 898 clients.) 899 899 </p><p> 900 <a class="indexterm" name="id 388650"></a>900 <a class="indexterm" name="id412005"></a> 901 901 A good method to recognize the driver files is to print the test page from the driver's 902 902 <span class="guilabel">Properties</span> dialog (<span class="guilabel">General</span> tab). Then look at the list of … … 906 906 (this may vary slightly for Windows NT). You need to note all filenames for the next steps. 907 907 </p><p> 908 <a class="indexterm" name="id 388704"></a>909 <a class="indexterm" name="id 388711"></a>910 <a class="indexterm" name="id 388718"></a>908 <a class="indexterm" name="id412059"></a> 909 <a class="indexterm" name="id412066"></a> 910 <a class="indexterm" name="id412072"></a> 911 911 Another method to quickly test the driver filenames and related paths is provided by the 912 912 <code class="literal">rpcclient</code> utility. Run it with <code class="literal">enumdrivers</code> or with the … … 949 949 Defaultdatatype: [] 950 950 </pre><p> 951 <a class="indexterm" name="id 388814"></a>952 <a class="indexterm" name="id 388821"></a>953 <a class="indexterm" name="id 388828"></a>954 <a class="indexterm" name="id 388835"></a>951 <a class="indexterm" name="id412169"></a> 952 <a class="indexterm" name="id412176"></a> 953 <a class="indexterm" name="id412183"></a> 954 <a class="indexterm" name="id412190"></a> 955 955 You may notice that this driver has quite a large number of <span class="guilabel">Dependent files</span> 956 956 (there are worse cases, however). Also, strangely, the … … 962 962 Windows PC. This PC can also host the Windows 9x/Me drivers, even if it runs on Windows NT, 2000, or XP. 963 963 </p><p> 964 <a class="indexterm" name="id 388879"></a>965 <a class="indexterm" name="id 388886"></a>966 <a class="indexterm" name="id 388892"></a>964 <a class="indexterm" name="id412234"></a> 965 <a class="indexterm" name="id412240"></a> 966 <a class="indexterm" name="id412247"></a> 967 967 Since the <em class="parameter"><code>[print$]</code></em> share is usually accessible through the <span class="guiicon">Network 968 968 Neighborhood</span>, you can also use the UNC notation from Windows Explorer to poke at it. The Windows … … 975 975 the Admin), its native mode for printer drivers is user mode execution. This requires drivers designed 976 976 for this purpose. These types of drivers install into the “<span class="quote">3</span>” subdirectory. 977 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 388950"></a>Obtaining Driver Files from Windows Client [print$] Shares</h4></div></div></div><p>977 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412304"></a>Obtaining Driver Files from Windows Client [print$] Shares</h4></div></div></div><p> 978 978 Now we need to collect all the driver files we identified in our previous step. Where do we get them 979 979 from? Well, why not retrieve them from the very PC and the same <em class="parameter"><code>[print$]</code></em> … … 1000 1000 <code class="literal">smbclient</code> exits again. 1001 1001 </p><p> 1002 <a class="indexterm" name="id 389046"></a>1002 <a class="indexterm" name="id412401"></a> 1003 1003 Remember to repeat the procedure for the <span class="application">WIN40</span> architecture should you need to 1004 1004 support Windows 9x/Me/XP clients. Remember too, the files for these architectures are in the 1005 1005 <code class="filename">WIN40/0/</code> subdirectory. Once this is complete, we can run <code class="literal">smbclient. . 1006 1006 .put</code> to store the collected files on the Samba server's <em class="parameter"><code>[print$]</code></em> share. 1007 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389081"></a>Installing Driver Files into [print$]</h4></div></div></div><p>1007 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412436"></a>Installing Driver Files into [print$]</h4></div></div></div><p> 1008 1008 We are now going to locate the driver files into the <em class="parameter"><code>[print$]</code></em> share. Remember, the 1009 1009 UNIX path to this share has been defined previously in your <code class="filename">smb.conf</code> file. You also have created … … 1018 1018 (yet) into the <code class="filename">0</code> subdirectory. 1019 1019 </p></li></ul></div><p> 1020 <a class="indexterm" name="id 389156"></a>1021 <a class="indexterm" name="id 389162"></a>1020 <a class="indexterm" name="id412510"></a> 1021 <a class="indexterm" name="id412517"></a> 1022 1022 We again use smbclient to transfer the driver files across the network. We specify the same files 1023 1023 and paths as were leaked to us by running <code class="literal">getdriver</code> against the original … … 1056 1056 putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF 1057 1057 </pre><p> 1058 <a class="indexterm" name="id 389220"></a>1059 <a class="indexterm" name="id 389226"></a>1060 <a class="indexterm" name="id 389233"></a>1058 <a class="indexterm" name="id412574"></a> 1059 <a class="indexterm" name="id412581"></a> 1060 <a class="indexterm" name="id412588"></a> 1061 1061 Whew that was a lot of typing! Most drivers are a lot smaller many have only three generic 1062 1062 PostScript driver files plus one PPD. While we did retrieve the files from the <code class="filename">2</code> … … 1065 1065 <code class="literal">adddriver</code> command, which we will run shortly (and do not forget to also put the files 1066 1066 for the Windows 9x/Me architecture into the <code class="filename">WIN40/</code> subdirectory should you need them). 1067 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389275"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p>1068 <a class="indexterm" name="id 389287"></a>1069 <a class="indexterm" name="id 389294"></a>1067 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412629"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p> 1068 <a class="indexterm" name="id412642"></a> 1069 <a class="indexterm" name="id412649"></a> 1070 1070 For now we verify that our files are there. This can be done with <code class="literal">smbclient</code>, too 1071 1071 (but, of course, you can log in via SSH also and do this through a standard UNIX shell access): … … 1108 1108 40976 blocks of size 262144. 709 blocks available 1109 1109 </pre><p> 1110 <a class="indexterm" name="id 389348"></a>1111 <a class="indexterm" name="id 389355"></a>1112 <a class="indexterm" name="id 389361"></a>1110 <a class="indexterm" name="id412703"></a> 1111 <a class="indexterm" name="id412709"></a> 1112 <a class="indexterm" name="id412716"></a> 1113 1113 Notice that there are already driver files present in the <code class="filename">2</code> subdirectory (probably from a 1114 1114 previous installation). Once the files for the new driver are there too, you are still a few steps away from … … 1118 1118 special, namely <span class="emphasis"><em>printer driver files</em></span>, and it does not know to which print queue(s) these 1119 1119 driver files belong. 1120 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389385"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p>1121 <a class="indexterm" name="id 389403"></a>1122 <a class="indexterm" name="id 389410"></a>1123 <a class="indexterm" name="id 389417"></a>1120 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412744"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p> 1121 <a class="indexterm" name="id412762"></a> 1122 <a class="indexterm" name="id412769"></a> 1123 <a class="indexterm" name="id412776"></a> 1124 1124 Next, you must tell Samba about the special category of the files you just uploaded into the 1125 1125 <em class="parameter"><code>[print$]</code></em> share. This is done by the <code class="literal">adddriver</code> … … 1145 1145 Printer Driver dm9110 successfully installed. 1146 1146 </pre><p> 1147 <a class="indexterm" name="id 389462"></a>1148 <a class="indexterm" name="id 389469"></a>1149 <a class="indexterm" name="id 389476"></a>1147 <a class="indexterm" name="id412821"></a> 1148 <a class="indexterm" name="id412828"></a> 1149 <a class="indexterm" name="id412835"></a> 1150 1150 After this step, the driver should be recognized by Samba on the print server. You need to be very 1151 1151 careful when typing the command. Don't exchange the order of the fields. Some changes would lead to … … 1154 1154 Hints about the syntax of the adddriver command are in the man page. 1155 1155 provides a more detailed description, should you need it. 1156 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389495"></a>Checking <code class="literal">adddriver</code> Completion</h4></div></div></div><p>1156 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412854"></a>Checking <code class="literal">adddriver</code> Completion</h4></div></div></div><p> 1157 1157 One indication for Samba's recognition of the files as driver files is the <code class="computeroutput">successfully 1158 1158 installed</code> message. Another one is the fact that our files have been moved by the … … 1199 1199 Another verification is that the timestamp of the printing TDB files is now updated 1200 1200 (and possibly their file size has increased). 1201 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389594"></a>Check Samba for Driver Recognition</h4></div></div></div><p>1202 <a class="indexterm" name="id 389602"></a>1201 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id412953"></a>Check Samba for Driver Recognition</h4></div></div></div><p> 1202 <a class="indexterm" name="id412961"></a> 1203 1203 Now the driver should be registered with Samba. We can easily verify this and will do so in a 1204 1204 moment. However, this driver is not yet associated with a particular printer. We may check the driver 1205 1205 status of the files by at least three methods: 1206 1206 </p><div class="itemizedlist"><ul type="disc"><li><p> 1207 <a class="indexterm" name="id 389618"></a>1208 <a class="indexterm" name="id 389624"></a>1209 <a class="indexterm" name="id 389631"></a>1210 <a class="indexterm" name="id 389638"></a>1211 <a class="indexterm" name="id 389645"></a>1207 <a class="indexterm" name="id412976"></a> 1208 <a class="indexterm" name="id412983"></a> 1209 <a class="indexterm" name="id412990"></a> 1210 <a class="indexterm" name="id412997"></a> 1211 <a class="indexterm" name="id413004"></a> 1212 1212 From any Windows client browse Network Neighborhood, find the Samba host, and open the Samba 1213 1213 <span class="guiicon">Printers and Faxes</span> folder. Select any printer icon, right-click and select … … 1219 1219 the list will differ if you look at it from Windows95/98/ME or Windows NT/2000/XP.) 1220 1220 </p></li><li><p> 1221 <a class="indexterm" name="id 389679"></a>1221 <a class="indexterm" name="id413038"></a> 1222 1222 From a Windows 200x/XP client (not Windows NT) browse <span class="guiicon">Network Neighborhood</span>, 1223 1223 search for the Samba server, open the server's <span class="guiicon">Printers</span> folder, … … 1248 1248 95, 98, and Me</span>, you'll have to repeat the whole procedure with the WIN40 architecture 1249 1249 and subdirectory. 1250 </p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389800"></a>Specific Driver Name Flexibility</h4></div></div></div><p>1251 <a class="indexterm" name="id 389808"></a>1250 </p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id413159"></a>Specific Driver Name Flexibility</h4></div></div></div><p> 1251 <a class="indexterm" name="id413167"></a> 1252 1252 You can name the driver as you like. If you repeat the <code class="literal">adddriver</code> step with the same 1253 1253 files as before but with a different driver name, it will work the same: … … 1272 1272 Printer Driver mydrivername successfully installed. 1273 1273 </pre><p> 1274 <a class="indexterm" name="id 389847"></a>1275 <a class="indexterm" name="id 389854"></a>1276 <a class="indexterm" name="id 389861"></a>1274 <a class="indexterm" name="id413206"></a> 1275 <a class="indexterm" name="id413213"></a> 1276 <a class="indexterm" name="id413220"></a> 1277 1277 You will be able to bind that driver to any print queue (however, you are responsible that 1278 1278 you associate drivers to queues that make sense with respect to target printers). You cannot run the … … 1281 1281 respective subdirectories, so you must execute an <code class="literal">smbclient ... put</code> command before 1282 1282 each <code class="literal">rpcclient ... adddriver</code> command. 1283 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 389902"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p>1284 <a class="indexterm" name="id 389920"></a>1285 <a class="indexterm" name="id 389927"></a>1283 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id413261"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p> 1284 <a class="indexterm" name="id413279"></a> 1285 <a class="indexterm" name="id413286"></a> 1286 1286 Samba needs to know which printer owns which driver. Create a mapping of the driver to a printer, and 1287 1287 store this information in Samba's memory, the TDB files. The <code class="literal">rpcclient setdriver</code> command … … 1310 1310 or at least send an HUP signal to all running smbd processes to work around this: <strong class="userinput"><code>kill -HUP 1311 1311 `pidof smbd`</code></strong>. 1312 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 390034"></a>Client Driver Installation Procedure</h2></div></div></div><p>1312 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413392"></a>Client Driver Installation Procedure</h2></div></div></div><p> 1313 1313 As Don Quixote said, “<span class="quote">The proof of the pudding is in the eating.</span>” The proof 1314 1314 for our setup lies in the printing. So let's install the printer driver onto the client PCs. This is 1315 1315 not as straightforward as it may seem. Read on. 1316 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 390048"></a>First Client Driver Installation</h3></div></div></div><p>1316 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id413407"></a>First Client Driver Installation</h3></div></div></div><p> 1317 1317 Especially important is the installation onto the first client PC (for each architectural platform 1318 1318 separately). Once this is done correctly, all further clients are easy to set up and shouldn't need further … … 1321 1321 user</em></span> nobody. In a DOS box type: 1322 1322 </p><p><strong class="userinput"><code>net use \\<em class="replaceable"><code>SAMBA-SERVER</code></em>\print$ /user:root</code></strong></p><p> 1323 Replace root, if needed, by another valid <a class=" indexterm" name="id390077"></a>printer adminuser as given in1323 Replace root, if needed, by another valid <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> user as given in 1324 1324 the definition. Should you already be connected as a different user, you will get an error message. There 1325 1325 is no easy way to get rid of that connection, because Windows does not seem to know a concept of logging … … 1348 1348 and Faxes</span>). 1349 1349 </p><p> 1350 <a class="indexterm" name="id 390201"></a>1350 <a class="indexterm" name="id413563"></a> 1351 1351 Most likely you are tempted to try to print a test page. After all, you now can open the printer 1352 1352 properties, and on the <span class="guimenu">General</span> tab there is a button offering to do just that. But … … 1360 1360 For a printer to be truly usable by a Windows NT/200x/XP client, it must possess: 1361 1361 </p><div class="itemizedlist"><ul type="disc"><li><p> 1362 <a class="indexterm" name="id 390257"></a>1362 <a class="indexterm" name="id413620"></a> 1363 1363 A valid <span class="emphasis"><em>device mode</em></span> generated by the driver for the printer (defining things 1364 1364 like paper size, orientation and duplex settings). 1365 1365 </p></li><li><p> 1366 <a class="indexterm" name="id 390273"></a>1366 <a class="indexterm" name="id413635"></a> 1367 1367 A complete set of <span class="emphasis"><em>printer driver data</em></span> generated by the driver. 1368 1368 </p></li></ul></div><p> 1369 <a class="indexterm" name="id 390288"></a>1370 <a class="indexterm" name="id 390295"></a>1371 <a class="indexterm" name="id 390302"></a>1372 <a class="indexterm" name="id 390309"></a>1373 <a class="indexterm" name="id 390315"></a>1369 <a class="indexterm" name="id413650"></a> 1370 <a class="indexterm" name="id413657"></a> 1371 <a class="indexterm" name="id413664"></a> 1372 <a class="indexterm" name="id413671"></a> 1373 <a class="indexterm" name="id413678"></a> 1374 1374 If either of these is incomplete, the clients can produce less than optimal output at best. In the 1375 1375 worst cases, unreadable garbage or nothing at all comes from the printer, or it produces a harvest of … … 1385 1385 in the following paragraphs. 1386 1386 </p><p> 1387 Be aware that a valid device mode can only be initiated by a <a class=" indexterm" name="id390360"></a>printer adminor root1387 Be aware that a valid device mode can only be initiated by a <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> or root 1388 1388 (the reason should be obvious). Device modes can be correctly set only by executing the printer driver program 1389 1389 itself. Since Samba cannot execute this Win32 platform driver code, it sets this field initially to NULL … … 1397 1397 effect to happen and feeds back the new device mode to our Samba server. You can use the native Windows 1398 1398 NT/200x/XP printer properties page from a Window client for this: 1399 </p><div class="procedure"><a name="id 390388"></a><p class="title"><b>Procedure 21.1. Procedure to Initialize the Printer Driver Settings</b></p><ol type="1"><li><p>1399 </p><div class="procedure"><a name="id413750"></a><p class="title"><b>Procedure 21.1. Procedure to Initialize the Printer Driver Settings</b></p><ol type="1"><li><p> 1400 1400 Browse the <span class="guiicon">Network Neighborhood</span>. 1401 1401 </p></li><li><p> … … 1427 1427 folder, too, if you are a Samba printer admin user. From now on, printing should work as expected. 1428 1428 </p><p> 1429 <a class="indexterm" name="id 390533"></a>1429 <a class="indexterm" name="id413895"></a> 1430 1430 Samba includes a service-level parameter name <em class="parameter"><code>default devmode</code></em> for generating a default 1431 1431 device mode for a printer. Some drivers function well with Samba's default set of properties. Others 1432 1432 may crash the client's spooler service. So use this parameter with caution. It is always better to have 1433 1433 the client generate a valid device mode for the printer and store it on the server for you. 1434 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id3 90551"></a>Additional Client Driver Installation</h3></div></div></div><p>1435 <a class="indexterm" name="id3 90559"></a>1434 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id346362"></a>Additional Client Driver Installation</h3></div></div></div><p> 1435 <a class="indexterm" name="id346370"></a> 1436 1436 Every additional driver may be installed in the same way as just described. Browse <code class="literal">Network 1437 1437 Neighborhood</code>, open the <span class="guiicon">Printers</span> folder on Samba server, right-click on … … 1446 1446 </pre><p> 1447 1447 or this command on Windows NT 4.0 workstations: 1448 <a class="indexterm" name="id3 90620"></a>1448 <a class="indexterm" name="id346432"></a> 1449 1449 </p><pre class="screen"> 1450 1450 <strong class="userinput"><code>rundll32 shell32.dll,Control_RunDLL MAIN.CPL @2</code></strong> … … 1453 1453 You can enter the commands either inside a <span class="guilabel">DOS box</span> window or in the <span class="guimenuitem">Run 1454 1454 command...</span> field from the <span class="guimenu">Start</span> menu. 1455 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id3 90662"></a>Always Make First Client Connection as root or “<span class="quote">printer admin</span>”</h3></div></div></div><p>1455 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id346474"></a>Always Make First Client Connection as root or “<span class="quote">printer admin</span>”</h3></div></div></div><p> 1456 1456 After you installed the driver on the Samba server (in its <em class="parameter"><code>[print$]</code></em> share), you 1457 1457 should always make sure that your first client installation completes correctly. Make it a habit for yourself 1458 to build the very first connection from a client as <a class=" indexterm" name="id390681"></a>printer admin. This is to make1458 to build the very first connection from a client as <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a>. This is to make 1459 1459 sure that: 1460 1460 </p><div class="itemizedlist"><ul type="disc"><li><p> 1461 A first valid <span class="emphasis"><em>device mode</em></span> is really initialized (see above <a href="classicalprinting.html#prt-modeset" title="Setting Device Modes on New Printers">Setting Device Modes on New Printers</a>) for more explanation details).1461 A first valid <span class="emphasis"><em>device mode</em></span> is really initialized (see above <a class="link" href="classicalprinting.html#prt-modeset" title="Setting Device Modes on New Printers">Setting Device Modes on New Printers</a>) for more explanation details). 1462 1462 </p></li><li><p> 1463 1463 The default print settings of your printer for all further client installations are as you want them. … … 1468 1468 printer for <span class="guiicon">duplex</span> as the default, and so on). 1469 1469 </p><p> 1470 <a class="indexterm" name="id 390746"></a>1470 <a class="indexterm" name="id414248"></a> 1471 1471 To connect as root to a Samba printer, try this command from a Windows 200x/XP DOS box command prompt: 1472 1472 </p><pre class="screen"> … … 1477 1477 You will be prompted for <code class="constant">root</code>'s Samba password; type it, wait a few seconds, click on 1478 1478 <span class="guibutton">Printing Defaults</span>, and proceed to set the job options that should be used as defaults 1479 by all clients. Alternatively, instead of root you can name one other member of the <a class=" indexterm" name="id390792"></a>printer adminfrom the setting.1479 by all clients. Alternatively, instead of root you can name one other member of the <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> from the setting. 1480 1480 </p><p> 1481 1481 Now all the other users downloading and installing the driver the same way (using 1482 1482 <code class="literal">Point'n'Print</code>) will have the same defaults set for them. If you miss this step, you'll get a 1483 1483 lot of help desk calls from your users, but maybe you like to talk to people. 1484 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 390813"></a>Other Gotchas</h2></div></div></div><p>1484 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id414319"></a>Other Gotchas</h2></div></div></div><p> 1485 1485 Your driver is installed. It is now ready for Point'n'Print installation by the clients. You may have tried to 1486 1486 download and use it on your first client machine, but wait. Let's make sure you are acquainted first with a … … 1488 1488 advised in the preceding paragraphs. Your users complain about various issues (such as, “<span class="quote">We need to set 1489 1489 the paper size for each job from Letter to A4 and it will not store it</span>”). 1490 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 390833"></a>Setting Default Print Options for Client Drivers</h3></div></div></div><p>1490 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id414335"></a>Setting Default Print Options for Client Drivers</h3></div></div></div><p> 1491 1491 The last sentence might be viewed with mixed feelings by some users and Admins. They have struggled for hours 1492 1492 and could not arrive at a point where their settings seemed to be saved. It is not their fault. The confusing … … 1525 1525 arrived at with steps C.1 through C.6 will permanently save any settings which will then become the defaults 1526 1526 for new users. If you want all clients to have the same defaults, you need to conduct these steps as 1527 administrator (<a class=" indexterm" name="id391060"></a>printer admin) before a client downloads the driver (the clients can1527 administrator (<a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a>) before a client downloads the driver (the clients can 1528 1528 later set their own per-user defaults by following procedures A or B above). Windows 200x/XP allow per-user 1529 1529 default settings and the ones the administrator gives them before they set up their own. The parents of the … … 1537 1537 defaults for all users. 1538 1538 </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Try (on Windows 200x/XP) to run this command (as a user with the right privileges): 1539 <a class="indexterm" name="id 391098"></a>1539 <a class="indexterm" name="id414601"></a> 1540 1540 </p><p><strong class="userinput"><code> 1541 1541 rundll32 printui.dll,PrintUIEntry /p /t3 /n\\<em class="replaceable"><code>SAMBA-SERVER</code></em>\<em class="replaceable"><code>printersharename</code></em> … … 1548 1548 button (the one that does not set systemwide defaults), you can 1549 1549 start the commands from inside a DOS box or from <span class="guimenu">Start</span> -> <span class="guimenuitem">Run</span>. 1550 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 391168"></a>Supporting Large Numbers of Printers</h3></div></div></div><p>1550 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id414671"></a>Supporting Large Numbers of Printers</h3></div></div></div><p> 1551 1551 One issue that has arisen during the recent development phase of Samba is the need to support driver 1552 1552 downloads for hundreds of printers. Using Windows NT APW for this task is somewhat awkward (to say the least). If … … 1631 1631 the two commas in the description field). After the <code class="literal">setdriver</code> command 1632 1632 succeeds, all is well. 1633 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 391404"></a>Adding New Printers with the Windows NT APW</h3></div></div></div><p>1633 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id414907"></a>Adding New Printers with the Windows NT APW</h3></div></div></div><p> 1634 1634 By default, Samba exhibits all printer shares defined in <code class="filename">smb.conf</code> in the <span class="guiicon">Printers</span> 1635 1635 folder. Also located in this folder is the Windows NT Add Printer Wizard icon. The APW will be shown only if: 1636 1636 </p><div class="itemizedlist"><ul type="disc"><li><p> 1637 1637 The connected user is able to successfully execute an <code class="literal">OpenPrinterEx(\\server)</code> with 1638 administrative privileges (i.e., root or <a class=" indexterm" name="id391439"></a>printer admin).1638 administrative privileges (i.e., root or <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a>). 1639 1639 </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> Try this from a Windows 200x/XP DOS box command prompt: 1640 1640 </p><p><strong class="userinput"><code> … … 1643 1643 Click on <span class="guibutton">Printing Preferences</span>. 1644 1644 </p></div></li><li><p>... contains the setting 1645 <a class=" indexterm" name="id391479"></a>show add printer wizard = yes(the1645 <a class="link" href="smb.conf.5.html#SHOWADDPRINTERWIZARD">show add printer wizard = yes</a> (the 1646 1646 default).</p></li></ul></div><p> 1647 1647 The APW can do various things: … … 1654 1654 </p></li><li><p> 1655 1655 Add an entirely new printer to the Samba host (only in conjunction with a working 1656 <a class=" indexterm" name="id391519"></a>add printer command. A corresponding1657 <a class=" indexterm" name="id391526"></a>delete printer commandfor removing entries from the1656 <a class="link" href="smb.conf.5.html#ADDPRINTERCOMMAND">add printer command</a>. A corresponding 1657 <a class="link" href="smb.conf.5.html#DELETEPRINTERCOMMAND">delete printer command</a> for removing entries from the 1658 1658 <span class="guiicon">Printers</span> folder may also be provided). 1659 1659 </p></li></ul></div><p> 1660 1660 The last one (add a new printer) requires more effort than the previous ones. To use the APW to successfully 1661 add a printer to a Samba server, the <a class=" indexterm" name="id391545"></a>add printer commandmust have a defined value.1661 add a printer to a Samba server, the <a class="link" href="smb.conf.5.html#ADDPRINTERCOMMAND">add printer command</a> must have a defined value. 1662 1662 The program hook must successfully add the printer to the UNIX print system (i.e., to 1663 1663 <code class="filename">/etc/printcap</code>, <code class="filename">/etc/cups/printers.conf</code> or other appropriate files) … … 1665 1665 </p><p> 1666 1666 When using the APW from a client, if the named printer share does not exist, smbd will execute the 1667 <a class=" indexterm" name="id391575"></a>add printer commandand reparse to attempt to locate the new printer share. If the1667 <a class="link" href="smb.conf.5.html#ADDPRINTERCOMMAND">add printer command</a> and reparse to attempt to locate the new printer share. If the 1668 1668 share is still not defined, an error of "<span class="errorname">Access Denied"</span> is returned to the client. The 1669 <a class=" indexterm" name="id391587"></a>add printer commandis executed under the context of the connected user, not1670 necessarily a root account. A <a class=" indexterm" name="id391595"></a>map to guest = bad usermay have connected1669 <a class="link" href="smb.conf.5.html#ADDPRINTERCOMMAND">add printer command</a> is executed under the context of the connected user, not 1670 necessarily a root account. A <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a> may have connected 1671 1671 you unwittingly under the wrong privilege. You should check it by using the <code class="literal">smbstatus</code> 1672 1672 command. 1673 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 391611"></a>Error Message: “<span class="quote">Cannot connect under a different Name</span>”</h3></div></div></div><p>1673 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415143"></a>Error Message: “<span class="quote">Cannot connect under a different Name</span>”</h3></div></div></div><p> 1674 1674 Once you are connected with the wrong credentials, there is no means to reverse the situation other than 1675 1675 to close all Explorer windows, and perhaps reboot. 1676 1676 </p><div class="itemizedlist"><ul type="disc"><li><p> 1677 <a class="indexterm" name="id 391629"></a>1677 <a class="indexterm" name="id415161"></a> 1678 1678 The <code class="literal">net use \\SAMBA-SERVER\sharename /user:root</code> gives you an error message: 1679 1679 “<span class="quote">Multiple connections to a server or a shared resource by the same user utilizing … … 1701 1701 </pre><p> 1702 1702 This will also disconnect all mapped drives and will allow you create fresh connection as required. 1703 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 391709"></a>Take Care When Assembling Driver Files</h3></div></div></div><p>1703 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415242"></a>Take Care When Assembling Driver Files</h3></div></div></div><p> 1704 1704 You need to be extremely careful when you take notes about the files belonging to a particular 1705 1705 driver. Don't confuse the files for driver version “<span class="quote">0</span>” (for Windows 9x/Me, going into … … 1832 1832 correct driver files for each driver version. Don't rely on the names alone, and don't interchange files 1833 1833 belonging to different driver versions. 1834 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 391934"></a>Samba and Printer Ports</h3></div></div></div><p>1835 <a class="indexterm" name="id 391942"></a>1836 <a class="indexterm" name="id 391949"></a>1837 <a class="indexterm" name="id 391955"></a>1838 <a class="indexterm" name="id 391962"></a>1834 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415466"></a>Samba and Printer Ports</h3></div></div></div><p> 1835 <a class="indexterm" name="id415474"></a> 1836 <a class="indexterm" name="id415481"></a> 1837 <a class="indexterm" name="id415488"></a> 1838 <a class="indexterm" name="id415494"></a> 1839 1839 Windows NT/2000 print servers associate a port with each printer. These normally take the form of 1840 1840 <code class="filename">LPT1:</code>, <code class="filename">COM1:</code>, <code class="filename">FILE:</code>, and so on. Samba must also … … 1845 1845 information to keep the Windows clients happy. 1846 1846 </p><p> 1847 <a class="indexterm" name="id 392002"></a>1847 <a class="indexterm" name="id415534"></a> 1848 1848 Samba does not support the concept of <code class="constant">Printer Pooling</code> internally either. Printer 1849 1849 pooling assigns a logical printer to multiple ports as a form of load balancing or failover. 1850 1850 </p><p> 1851 1851 If you require multiple ports to be defined for some reason or another (my users and my boss should not know 1852 that they are working with Samba), configure the <a class=" indexterm" name="id392018"></a>enumports command,1852 that they are working with Samba), configure the <a class="link" href="smb.conf.5.html#ENUMPORTSCOMMAND">enumports command</a>, 1853 1853 which can be used to define an external program that generates a listing of ports on a system. 1854 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392028"></a>Avoiding Common Client Driver Misconfiguration</h3></div></div></div><p>1854 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415565"></a>Avoiding Common Client Driver Misconfiguration</h3></div></div></div><p> 1855 1855 So now the printing works, but there are still problems. Most jobs print well, some do not print at 1856 1856 all. Some jobs have problems with fonts, which do not look good. Some jobs print fast and some 1857 1857 are dead-slow. We cannot cover it all, but we want to encourage you to read the brief paragraph about 1858 “<span class="quote">Avoiding the Wrong PostScript Driver Settings</span>” in <a href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing1859 Chapter</a>, <a href="CUPS-printing.html#cups-avoidps1" title="Avoiding Critical PostScript Driver Settings on the Client">Avoiding Critical PostScript Driver Settings on the1858 “<span class="quote">Avoiding the Wrong PostScript Driver Settings</span>” in <a class="link" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing 1859 Chapter</a>, <a class="link" href="CUPS-printing.html#cups-avoidps1" title="Avoiding Critical PostScript Driver Settings on the Client">Avoiding Critical PostScript Driver Settings on the 1860 1860 Client</a>. 1861 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392061"></a>The Imprints Toolset</h2></div></div></div><p>1862 <a class="indexterm" name="id 392068"></a>1861 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id415598"></a>The Imprints Toolset</h2></div></div></div><p> 1862 <a class="indexterm" name="id415605"></a> 1863 1863 The Imprints tool set provides a UNIX equivalent of the Windows NT APW. For complete information, please 1864 refer to the <a href="http://imprints.sourceforge.net/" target="_top">Imprints</a> Web site as well as the1864 refer to the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> Web site as well as the 1865 1865 documentation included with the Imprints source distribution. This section provides only a brief introduction 1866 1866 to the features of Imprints. … … 1871 1871 mailing list. The toolset is still in usable form, but only for a series of older printer models where 1872 1872 there are prepared packages to use. Packages for more up-to-date print devices are needed if Imprints 1873 should have a future. Information regarding the Imprints toolset can be obtained from the <a href="http://imprints.sourceforge.net/" target="_top">Imprints</a> home page.1874 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392099"></a>What Is Imprints?</h3></div></div></div><p>1873 should have a future. Information regarding the Imprints toolset can be obtained from the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> home page. 1874 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415641"></a>What Is Imprints?</h3></div></div></div><p> 1875 1875 Imprints is a collection of tools for supporting these goals: 1876 1876 </p><div class="itemizedlist"><ul type="disc"><li><p> … … 1881 1881 Providing an installation client that will obtain printer drivers from a central Internet (or intranet) Imprints Server 1882 1882 repository and install them on remote Samba and Windows NT4 print servers. 1883 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392129"></a>Creating Printer Driver Packages</h3></div></div></div><p>1883 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415671"></a>Creating Printer Driver Packages</h3></div></div></div><p> 1884 1884 The process of creating printer driver packages is beyond the scope of this document (refer to Imprints.txt, 1885 1885 included with the Samba distribution for more information). In short, an Imprints driver package 1886 1886 is a gzipped tarball containing the driver files, related INF files, and a control file needed by the 1887 1887 installation client. 1888 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392145"></a>The Imprints Server</h3></div></div></div><p>1888 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415684"></a>The Imprints Server</h3></div></div></div><p> 1889 1889 The Imprints server is really a database server that may be queried via standard HTTP mechanisms. Each 1890 1890 printer entry in the database has an associated URL for the actual downloading of the package. Each … … 1893 1893 the one referred in the Imprints database. It is strongly recommended that this security check 1894 1894 not be disabled. 1895 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392158"></a>The Installation Client</h3></div></div></div><p>1895 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415698"></a>The Installation Client</h3></div></div></div><p> 1896 1896 More information regarding the Imprints installation client is available from the documentation file 1897 1897 <code class="filename">Imprints-Client-HOWTO.ps</code> that is included with the Imprints source package. The Imprints … … 1923 1923 The way of sidestepping this limitation is to require that all Imprints printer driver packages include both the Intel Windows NT and 1924 1924 95/98 printer drivers and that the NT driver is installed first. 1925 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392275"></a>Adding Network Printers without User Interaction</h2></div></div></div><p>1925 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id415814"></a>Adding Network Printers without User Interaction</h2></div></div></div><p> 1926 1926 The following MS Knowledge Base article may be of some help if you need to handle Windows 2000 clients: 1927 <span class="emphasis"><em>How to Add Printers with No User Interaction in Windows 2000,</em></span> (<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;189105" target="_top">Microsoft KB 189105</a>). It also1927 <span class="emphasis"><em>How to Add Printers with No User Interaction in Windows 2000,</em></span> (<a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;189105" target="_top">Microsoft KB 189105</a>). It also 1928 1928 applies to Windows XP Professional clients. The ideas sketched out in this section are inspired by this 1929 1929 article, which describes a command-line method that can be applied to install network and local printers and … … 1982 1982 added, changed, and deleted at will on the server with no user intervention required from the clients 1983 1983 (you just need to keep the logon scripts up to date). 1984 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392517"></a>The <code class="literal">addprinter</code> Command</h2></div></div></div><p>1984 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416053"></a>The <code class="literal">addprinter</code> Command</h2></div></div></div><p> 1985 1985 The <code class="literal">addprinter</code> command can be configured to be a shell script or program executed by 1986 1986 Samba. It is triggered by running the APW from a client against the Samba print server. The APW asks … … 1990 1990 by executing the <code class="literal">lpadmin</code> command on more modern systems) and create the associated share, 1991 1991 then the APW will in effect really create a new printer on Samba and the UNIX print subsystem! 1992 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392551"></a>Migration of Classical Printing to Samba</h2></div></div></div><p>1992 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416087"></a>Migration of Classical Printing to Samba</h2></div></div></div><p> 1993 1993 The basic NT-style printer driver management has not changed considerably in 3.0 over the 2.2.x releases 1994 1994 (apart from many small improvements). Here migration should be quite easy, especially if you followed … … 2018 2018 If you want to migrate an existing <code class="filename">printers.def</code> file into the new setup, the only current 2019 2019 solution is to use the Windows NT APW to install the NT drivers and the 9x/Me drivers. This can be scripted 2020 using smbclient and rpcclient. See the Imprints installation client on the <a href="http://imprints.sourceforge.net/" target="_top">Imprints</a> web site for example. See also the discussion of2021 rpcclient usage in <a href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing</a>.2022 </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392682"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p>2023 This topic has also been addressed in <a href="NetCommand.html" title="Chapter 13. Remote and Local Management: The Net Command">Remote and Local Management The2020 using smbclient and rpcclient. See the Imprints installation client on the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> web site for example. See also the discussion of 2021 rpcclient usage in <a class="link" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing</a>. 2022 </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416218"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p> 2023 This topic has also been addressed in <a class="link" href="NetCommand.html" title="Chapter 13. Remote and Local Management: The Net Command">Remote and Local Management The 2024 2024 Net Command</a>. If you wish to volunteer your services to help document this further, please contact 2025 <a href="mail://jht@samba.org" target="_top">John H. Terpstra</a>.2026 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 392709"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id392714"></a>I Give My Root Password but I Do Not Get Access</h3></div></div></div><p>2025 <a class="ulink" href="mail://jht@samba.org" target="_top">John H. Terpstra</a>. 2026 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416245"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416250"></a>I Give My Root Password but I Do Not Get Access</h3></div></div></div><p> 2027 2027 Do not confuse the root password, which is valid for the UNIX system (and in most cases stored in the 2028 2028 form of a one-way hash in a file named <code class="filename">/etc/shadow</code>), with the password used to … … 2035 2035 Retype new SMB password: secret 2036 2036 </pre><p> 2037 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 392751"></a>My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</h3></div></div></div><p>2037 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416288"></a>My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</h3></div></div></div><p> 2038 2038 Do not use the existing UNIX print system spool directory for the Samba spool directory. It may seem 2039 2039 convenient and a savings of space, but it only leads to problems. The two must be separate. The UNIX/Linux
Note:
See TracChangeset
for help on using the changeset viewer.