- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/docs/htmldocs/Samba3-HOWTO/classicalprinting.html
r368 r411 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.7 5.2"><link rel="home" href="index.html" title="The Official Samba 3.3.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" title="Chapter 21. Classical Printing Support"><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#id2628204">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2628427">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2628578">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2628638">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2628739">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2629022">Verifying Configuration with <code class="literal">testparm</code></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2629220">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2629619">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2630075">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#id2632790">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632959">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2633081">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2633298">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2633618">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2633761">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2633854">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#id2635786">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2635803">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#id2636368">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2636487">Always Make First Client Connection as root or <span class="quote">“<span class="quote">printer admin</span>”</span></a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2636660">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2636681">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2637048">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2637304">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2637564">Error Message: <span class="quote">“<span class="quote">Cannot connect under a different Name</span>”</span></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2637678">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2637988">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2638097">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2638134">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2638180">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2638214">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2638230">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2638247">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2638381">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2638654">The <code class="literal">addprinter</code> Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2638693">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2638842">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2638871">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2638877">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2638918">My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</a></span></dt></dl></dd></dl></div><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2628204"></a>Features and Benefits</h2></div></div></div><p>2 <a class="indexterm" name="id262 8212"></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.74.0"><link rel="home" href="index.html" title="The Official Samba 3.3.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="orgname">Danka Deutschland GmbH</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="orgname">Samba Team</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="orgname">Samba Team</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#id2622118">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2622341">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2622493">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2622552">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2622653">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2622937">Verifying Configuration with testparm</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2623134">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2623534">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2623989">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#id2626705">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2626874">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2626995">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2627212">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2627533">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2627675">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2627768">Add Printer Wizard Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#inst-rpc">Installing Print Drivers Using rpcclient</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2629701">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2629717">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#id2630283">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2630401">Always Make First Client Connection as root or printer admin</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2630574">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2630595">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2630963">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2631219">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2631479">Error Message: Cannot connect under a different Name</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2631592">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2631902">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632011">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2632048">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2632094">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632128">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632144">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632162">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id2632295">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2632569">The addprinter Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2632608">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2632756">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id2632786">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id2632791">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id2632833">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="id2622118"></a>Features and Benefits</h2></div></div></div><p> 2 <a class="indexterm" name="id2622126"></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="id262 8225"></a>7 <a class="indexterm" name="id262 8232"></a>8 <a class="indexterm" name="id262 8239"></a>9 <a class="indexterm" name="id262 8246"></a>10 <a class="indexterm" name="id262 8253"></a>11 <a class="indexterm" name="id262 8260"></a>12 <a class="indexterm" name="id262 8267"></a>13 <a class="indexterm" name="id262 8274"></a>14 <a class="indexterm" name="id262 8281"></a>15 <a class="indexterm" name="id262 8288"></a>16 <a class="indexterm" name="id262 8294"></a>17 <a class="indexterm" name="id262 8301"></a>18 <a class="indexterm" name="id262 8308"></a>19 <a class="indexterm" name="id262 8315"></a>6 <a class="indexterm" name="id2622139"></a> 7 <a class="indexterm" name="id2622146"></a> 8 <a class="indexterm" name="id2622153"></a> 9 <a class="indexterm" name="id2622160"></a> 10 <a class="indexterm" name="id2622167"></a> 11 <a class="indexterm" name="id2622174"></a> 12 <a class="indexterm" name="id2622181"></a> 13 <a class="indexterm" name="id2622188"></a> 14 <a class="indexterm" name="id2622195"></a> 15 <a class="indexterm" name="id2622202"></a> 16 <a class="indexterm" name="id2622209"></a> 17 <a class="indexterm" name="id2622216"></a> 18 <a class="indexterm" name="id2622223"></a> 19 <a class="indexterm" name="id2622230"></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="id262 8366"></a>34 <a class="indexterm" name="id262 8372"></a>33 <a class="indexterm" name="id2622280"></a> 34 <a class="indexterm" name="id2622287"></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 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 </p><div class="note" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>40 <a class="indexterm" name="id262 8398"></a>41 <a class="indexterm" name="id262 8405"></a>42 <a class="indexterm" name="id262 8412"></a>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="id2622313"></a> 41 <a class="indexterm" name="id2622320"></a> 42 <a class="indexterm" name="id2622326"></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" title="Technical Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2628427"></a>Technical Introduction</h2></div></div></div><p>47 <a class="indexterm" name="id262 8435"></a>48 <a class="indexterm" name="id262 8442"></a>49 <a class="indexterm" name="id262 8449"></a>46 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2622341"></a>Technical Introduction</h2></div></div></div><p> 47 <a class="indexterm" name="id2622349"></a> 48 <a class="indexterm" name="id2622356"></a> 49 <a class="indexterm" name="id2622363"></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="id262 8474"></a>58 <a class="indexterm" name="id262 8481"></a>57 <a class="indexterm" name="id2622388"></a> 58 <a class="indexterm" name="id2622395"></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 </p><div class="important" title="Important"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>62 <a class="indexterm" name="id262 8494"></a>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="id2622409"></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="id262 8507"></a>66 <a class="indexterm" name="id262 8514"></a>67 <a class="indexterm" name="id262 8520"></a>68 <a class="indexterm" name="id262 8527"></a>65 <a class="indexterm" name="id2622421"></a> 66 <a class="indexterm" name="id2622428"></a> 67 <a class="indexterm" name="id2622435"></a> 68 <a class="indexterm" name="id2622442"></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="id262 8544"></a>75 <a class="indexterm" name="id262 8550"></a>76 <a class="indexterm" name="id262 8557"></a>77 <a class="indexterm" name="id262 8564"></a>74 <a class="indexterm" name="id2622458"></a> 75 <a class="indexterm" name="id2622465"></a> 76 <a class="indexterm" name="id2622472"></a> 77 <a class="indexterm" name="id2622479"></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" title="Client to Samba Print Job Processing"><div class="titlepage"><div><div><h3 class="title"><a name="id2628578"></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="id2622493"></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: 85 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Windows opens a connection to the printer share.</p></li><li class="listitem"><p>Samba must authenticate the user.</p></li><li class="listitem"><p>Windows sends a copy of the print file over the network86 into Samba's spooling area.</p></li><li class="listitem"><p>Windows closes the connection.</p></li><li class="listitem"><p>Samba invokes the print command to hand the file over87 to the UNIX print subsystem's spooling area.</p></li><li class="listitem"><p>The UNIX print subsystem processes the print job.</p></li><li class="listitem"><p>The print file may need to be explicitly deleted85 </p><div class="orderedlist"><ol type="1"><li><p>Windows opens a connection to the printer share.</p></li><li><p>Samba must authenticate the user.</p></li><li><p>Windows sends a copy of the print file over the network 86 into Samba's spooling area.</p></li><li><p>Windows closes the connection.</p></li><li><p>Samba invokes the print command to hand the file over 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" title="Printing-Related Configuration Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="id2628638"></a>Printing-Related Configuration Parameters</h3></div></div></div><p>90 <a class="indexterm" name="id262 8646"></a>91 <a class="indexterm" name="id262 8653"></a>92 <a class="indexterm" name="id262 8660"></a>89 configuration settings.</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2622552"></a>Printing-Related Configuration Parameters</h3></div></div></div><p> 90 <a class="indexterm" name="id2622560"></a> 91 <a class="indexterm" name="id2622567"></a> 92 <a class="indexterm" name="id2622574"></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" title="Simple Print Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2628739"></a>Simple Print Configuration</h2></div></div></div><p>107 <a class="indexterm" name="id262 8747"></a>108 <a class="indexterm" name="id262 8754"></a>109 <a class="indexterm" name="id262 8760"></a>110 <a class="indexterm" name="id262 8768"></a>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="id2622653"></a>Simple Print Configuration</h2></div></div></div><p> 107 <a class="indexterm" name="id2622661"></a> 108 <a class="indexterm" name="id2622668"></a> 109 <a class="indexterm" name="id2622675"></a> 110 <a class="indexterm" name="id2622682"></a> 111 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 … … 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 border="0" summary="Simple list" class="simplelist"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2628819"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id2628831"></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="id2628851"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2628863"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2628875"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2628886"></a><em class="parameter"><code>writable = no</code></em></td></tr></table></div></div><br class="example-break"><p>117 <a class="indexterm" name="id262 8901"></a>118 <a class="indexterm" name="id262 8908"></a>119 <a class="indexterm" name="id262 8915"></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="id2622733"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id2622745"></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="id2622766"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2622777"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2622789"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2622800"></a><em class="parameter"><code>writable = no</code></em></td></tr></table></div></div><br class="example-break"><p> 117 <a class="indexterm" name="id2622815"></a> 118 <a class="indexterm" name="id2622822"></a> 119 <a class="indexterm" name="id2622829"></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="id262 8957"></a>128 <a class="indexterm" name="id262 8964"></a>129 <a class="indexterm" name="id262 8971"></a>127 <a class="indexterm" name="id2622871"></a> 128 <a class="indexterm" name="id2622878"></a> 129 <a class="indexterm" name="id2622886"></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 … … 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" title="Verifying Configuration with testparm"><div class="titlepage"><div><div><h3 class="title"><a name="id2629022"></a>Verifying Configuration with <code class="literal">testparm</code></h3></div></div></div><p>136 <a class="indexterm" name="id262 9035"></a>137 <a class="indexterm" name="id262 9042"></a>138 <a class="indexterm" name="id262 9049"></a>139 <a class="indexterm" name="id262 9056"></a>140 <a class="indexterm" name="id262 9062"></a>141 <a class="indexterm" name="id262 9069"></a>142 <a class="indexterm" name="id262 9076"></a>143 <a class="indexterm" name="id262 9083"></a>144 <a class="indexterm" name="id262 9090"></a>145 <a class="indexterm" name="id262 9096"></a>146 <a class="indexterm" name="id262 9103"></a>135 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2622937"></a>Verifying Configuration with <code class="literal">testparm</code></h3></div></div></div><p> 136 <a class="indexterm" name="id2622949"></a> 137 <a class="indexterm" name="id2622956"></a> 138 <a class="indexterm" name="id2622963"></a> 139 <a class="indexterm" name="id2622970"></a> 140 <a class="indexterm" name="id2622977"></a> 141 <a class="indexterm" name="id2622983"></a> 142 <a class="indexterm" name="id2622990"></a> 143 <a class="indexterm" name="id2622997"></a> 144 <a class="indexterm" name="id2623004"></a> 145 <a class="indexterm" name="id2623011"></a> 146 <a class="indexterm" name="id2623018"></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>, … … 191 191 You can easily verify which settings were implicitly added by Samba's default behavior. <span class="emphasis"><em>Remember: it 192 192 may be important in your future dealings with Samba.</em></span> 193 </p><div class="note" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>193 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 194 194 The <code class="literal">testparm</code> in Samba-3 behaves differently from that in 2.2.x: used without the 195 <span class="quote">“<span class="quote">-v</span>”</span>switch, it only shows you the settings actually written into! To see the complete196 configuration used, add the <span class="quote">“<span class="quote">-v</span>”</span>parameter to testparm.197 </p></div></div><div class="sect2" title="Rapid Configuration Validation"><div class="titlepage"><div><div><h3 class="title"><a name="id2629220"></a>Rapid Configuration Validation</h3></div></div></div><p>198 <a class="indexterm" name="id262 9228"></a>199 <a class="indexterm" name="id262 9235"></a>200 <a class="indexterm" name="id262 9242"></a>201 <a class="indexterm" name="id262 9249"></a>195 “<span class="quote">-v</span>” switch, it only shows you the settings actually written into! To see the complete 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="id2623134"></a>Rapid Configuration Validation</h3></div></div></div><p> 198 <a class="indexterm" name="id2623142"></a> 199 <a class="indexterm" name="id2623149"></a> 200 <a class="indexterm" name="id2623156"></a> 201 <a class="indexterm" name="id2623163"></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, … … 212 212 load printers = Yes 213 213 </pre><p> 214 <a class="indexterm" name="id262 9304"></a>215 <a class="indexterm" name="id262 9312"></a>214 <a class="indexterm" name="id2623219"></a> 215 <a class="indexterm" name="id2623226"></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="id262 9355"></a>229 <a class="indexterm" name="id2623270"></a> 230 230 Only when the parameter is explicitly set to <a class="link" href="smb.conf.5.html#LOADPRINTERS" target="_top">load printers = No</a> would 231 231 Samba conform with my intentions. So, my strong advice is: 232 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Never rely on commented-out parameters.</p></li><li class="listitem"><p>Always set parameters explicitly as you intend them to233 behave.</p></li><li class="listitem"><p>Use <code class="literal">testparm</code> to uncover hidden232 </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 233 behave.</p></li><li><p>Use <code class="literal">testparm</code> to uncover hidden 234 234 settings that might not reflect your intentions.</p></li></ul></div><p> 235 235 The following is the most minimal configuration file: … … 238 238 [printers] 239 239 </pre><p> 240 <a class="indexterm" name="id262 9424"></a>241 <a class="indexterm" name="id262 9430"></a>240 <a class="indexterm" name="id2623338"></a> 241 <a class="indexterm" name="id2623345"></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 … … 276 276 </pre><p> 277 277 <code class="literal">testparm</code> issued two warnings: 278 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>We did not specify the <em class="parameter"><code>[printers]</code></em> section as printable.</p></li><li class="listitem"><p>We did not tell Samba which spool directory to use.</p></li></ul></div><p>279 <a class="indexterm" name="id262 9534"></a>280 <a class="indexterm" name="id262 9542"></a>281 <a class="indexterm" name="id262 9547"></a>282 <a class="indexterm" name="id262 9552"></a>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="id2623449"></a> 280 <a class="indexterm" name="id2623456"></a> 281 <a class="indexterm" name="id2623461"></a> 282 <a class="indexterm" name="id2623467"></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 border="0" summary="Simple list" class="simplelist"><tr><td># This defines LPRng as the printing system</td></tr><tr><td><a class="indexterm" name="id2629593"></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="id2623507"></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" title="Extended Printing Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2629619"></a>Extended Printing Configuration</h2></div></div></div><p>296 <a class="indexterm" name="id262 9628"></a>297 <a class="indexterm" name="id262 9635"></a>298 <a class="indexterm" name="id262 9642"></a>299 <a class="indexterm" name="id262 9648"></a>295 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2623534"></a>Extended Printing Configuration</h2></div></div></div><p> 296 <a class="indexterm" name="id2623542"></a> 297 <a class="indexterm" name="id2623549"></a> 298 <a class="indexterm" name="id2623556"></a> 299 <a class="indexterm" name="id2623563"></a> 300 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 … … 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 border="0" summary="Simple list" class="simplelist"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2629722"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id2629734"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629746"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629758"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id2629770"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id2629782"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id2629794"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id2629805"></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="id2629826"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2629838"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629849"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2629861"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2629873"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629884"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629896"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629908"></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="id2629928"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id2629940"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id2629952"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id2629964"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629976"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2629987"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2629999"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id2630011"></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="id2630023"></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="id26 30036"></a>309 <a class="indexterm" name="id26 30042"></a>310 <a class="indexterm" name="id26 30047"></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="id2623636"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id2623648"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623660"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623672"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id2623684"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id2623696"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id2623708"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id2623720"></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="id2623740"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2623752"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623764"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2623775"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2623787"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623799"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623810"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623822"></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="id2623843"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id2623855"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id2623866"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id2623878"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623890"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2623902"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2623913"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id2623925"></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="id2623937"></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="id2623951"></a> 309 <a class="indexterm" name="id2623956"></a> 310 <a class="indexterm" name="id2623962"></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" title="Detailed Explanation Settings"><div class="titlepage"><div><div><h3 class="title"><a name="id2630075"></a>Detailed Explanation Settings</h3></div></div></div><p>315 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2623989"></a>Detailed Explanation Settings</h3></div></div></div><p> 316 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 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" title="The [global] Section"><div class="titlepage"><div><div><h4 class="title"><a name="id2630099"></a>The [global] Section</h4></div></div></div><p>319 <a class="indexterm" name="id26 30107"></a>320 <a class="indexterm" name="id26 30114"></a>321 <a class="indexterm" name="id26 30121"></a>322 <a class="indexterm" name="id26 30128"></a>318 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2624014"></a>The [global] Section</h4></div></div></div><p> 319 <a class="indexterm" name="id2624022"></a> 320 <a class="indexterm" name="id2624028"></a> 321 <a class="indexterm" name="id2624035"></a> 322 <a class="indexterm" name="id2624042"></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 … … 328 328 globally set share settings and specify other values). 329 329 </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = bsd </a></span></dt><dd><p> 330 <a class="indexterm" name="id26 30195"></a>331 <a class="indexterm" name="id26 30202"></a>332 <a class="indexterm" name="id26 30208"></a>333 <a class="indexterm" name="id26 30215"></a>334 <a class="indexterm" name="id26 30222"></a>335 <a class="indexterm" name="id26 30229"></a>336 <a class="indexterm" name="id26 30236"></a>337 <a class="indexterm" name="id26 30242"></a>338 <a class="indexterm" name="id26 30249"></a>339 <a class="indexterm" name="id26 30256"></a>340 <a class="indexterm" name="id26 30263"></a>341 <a class="indexterm" name="id26 30270"></a>330 <a class="indexterm" name="id2624109"></a> 331 <a class="indexterm" name="id2624116"></a> 332 <a class="indexterm" name="id2624123"></a> 333 <a class="indexterm" name="id2624129"></a> 334 <a class="indexterm" name="id2624136"></a> 335 <a class="indexterm" name="id2624143"></a> 336 <a class="indexterm" name="id2624150"></a> 337 <a class="indexterm" name="id2624157"></a> 338 <a class="indexterm" name="id2624164"></a> 339 <a class="indexterm" name="id2624170"></a> 340 <a class="indexterm" name="id2624177"></a> 341 <a class="indexterm" name="id2624184"></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 345 systems defaults to a different <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a> (and other queue control commands). 346 </p><div class="caution" title="Caution"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3><p>347 <a class="indexterm" name="id26 30306"></a>348 <a class="indexterm" name="id26 30312"></a>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="id2624220"></a> 348 <a class="indexterm" name="id2624226"></a> 349 349 The <a class="link" href="smb.conf.5.html#PRINTING" target="_top">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 352 </p></div></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#LOADPRINTERS" target="_top">load printers = yes </a></span></dt><dd><p> 353 <a class="indexterm" name="id26 30360"></a>354 <a class="indexterm" name="id26 30367"></a>355 <a class="indexterm" name="id26 30373"></a>356 <a class="indexterm" name="id26 30380"></a>353 <a class="indexterm" name="id2624275"></a> 354 <a class="indexterm" name="id2624281"></a> 355 <a class="indexterm" name="id2624287"></a> 356 <a class="indexterm" name="id2624294"></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 … … 362 362 share separately, leaving out some you do not want to be publicly visible and available). 363 363 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#SHOWADDPRINTERWIZARD" target="_top">show add printer wizard = yes </a></span></dt><dd><p> 364 <a class="indexterm" name="id26 30428"></a>365 <a class="indexterm" name="id26 30435"></a>366 <a class="indexterm" name="id26 30442"></a>367 <a class="indexterm" name="id26 30448"></a>368 <a class="indexterm" name="id26 30455"></a>364 <a class="indexterm" name="id2624343"></a> 365 <a class="indexterm" name="id2624349"></a> 366 <a class="indexterm" name="id2624356"></a> 367 <a class="indexterm" name="id2624362"></a> 368 <a class="indexterm" name="id2624369"></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 … … 375 375 before the action), or exchange a printer's driver for any other previously uploaded driver. 376 376 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#MAXPRINTJOBS" target="_top">max print jobs = 100 </a></span></dt><dd><p> 377 <a class="indexterm" name="id26 30538"></a>377 <a class="indexterm" name="id2624452"></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 … … 381 381 at all. 382 382 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTCAPNAME" target="_top">printcap name = /etc/printcap </a></span></dt><dd><p> 383 <a class="indexterm" name="id26 30573"></a>384 <a class="indexterm" name="id26 30580"></a>385 <a class="indexterm" name="id26 30586"></a>383 <a class="indexterm" name="id2624488"></a> 384 <a class="indexterm" name="id2624494"></a> 385 <a class="indexterm" name="id2624500"></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 389 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin = @ntadmin </a></span></dt><dd><p> 390 <a class="indexterm" name="id26 30624"></a>391 <a class="indexterm" name="id26 30631"></a>392 <a class="indexterm" name="id26 30638"></a>393 <a class="indexterm" name="id26 30644"></a>390 <a class="indexterm" name="id2624539"></a> 391 <a class="indexterm" name="id2624545"></a> 392 <a class="indexterm" name="id2624552"></a> 393 <a class="indexterm" name="id2624558"></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 … … 400 400 per-share parameter. This permits different groups to administer each printer share. 401 401 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#LPQCACHETIME" target="_top">lpq cache time = 20 </a></span></dt><dd><p> 402 <a class="indexterm" name="id26 30725"></a>403 <a class="indexterm" name="id26 30731"></a>402 <a class="indexterm" name="id2624639"></a> 403 <a class="indexterm" name="id2624645"></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 406 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#USECLIENTDRIVER" target="_top">use client driver = no </a></span></dt><dd><p> 407 <a class="indexterm" name="id26 30760"></a>407 <a class="indexterm" name="id2624675"></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 … … 411 411 <code class="constant">true</code> setting) that have valid drivers installed on the Samba server. For more detailed 412 412 explanations, see the <code class="filename">smb.conf</code> man page. 413 </p></dd></dl></div></div><div class="sect3" title="The [printers] Section"><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="id26 30812"></a>415 <a class="indexterm" name="id26 30819"></a>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="id2624726"></a> 415 <a class="indexterm" name="id2624733"></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 … … 456 456 Is a synonym for <a class="link" href="smb.conf.5.html#GUESTOK" target="_top">guest ok = yes</a>. 457 457 Since we have <a class="link" href="smb.conf.5.html#GUESTOK" target="_top">guest ok = yes</a>, it 458 really does not need to be here. (This leads to the interesting question, <span class="quote">“<span class="quote">What if I459 by accident have two contradictory settings for the same share?</span>” </span>The answer is that the458 really does not need to be here. (This leads to the interesting question, “<span class="quote">What if I 459 by accident have two contradictory settings for the same share?</span>” The answer is that the 460 460 last one encountered by Samba wins. <code class="literal">testparm</code> does not complain about different settings 461 461 of the same parameter for the same share. You can test this by setting up multiple … … 469 469 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#WRITABLE" target="_top">writable = no </a></span></dt><dd><p> 470 470 Is a synonym for <a class="link" href="smb.conf.5.html#READONLY" target="_top">read only = yes</a>. 471 </p></dd></dl></div></div><div class="sect3" title="Any [my_printer_name] Section"><div class="titlepage"><div><div><h4 class="title"><a name="id2631206"></a>Any [my_printer_name] Section</h4></div></div></div><p>472 <a class="indexterm" name="id26 31214"></a>473 <a class="indexterm" name="id26 31220"></a>471 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2625120"></a>Any [my_printer_name] Section</h4></div></div></div><p> 472 <a class="indexterm" name="id2625128"></a> 473 <a class="indexterm" name="id2625135"></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 475 parameter <a class="link" href="smb.conf.5.html#PRINTABLE" target="_top">printable = yes</a> Samba will configure it as a printer share. … … 503 503 </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#GUESTOK" target="_top">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" title="Print Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id2631500"></a>Print Commands</h4></div></div></div><p>506 <a class="indexterm" name="id26 31508"></a>507 <a class="indexterm" name="id26 31514"></a>508 <a class="indexterm" name="id26 31521"></a>509 <a class="indexterm" name="id26 31528"></a>505 </p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2625414"></a>Print Commands</h4></div></div></div><p> 506 <a class="indexterm" name="id2625422"></a> 507 <a class="indexterm" name="id2625429"></a> 508 <a class="indexterm" name="id2625436"></a> 509 <a class="indexterm" name="id2625442"></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 … … 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" title="Default UNIX System Printing Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id2631576"></a>Default UNIX System Printing Commands</h4></div></div></div><p>522 <a class="indexterm" name="id26 31584"></a>521 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2625491"></a>Default UNIX System Printing Commands</h4></div></div></div><p> 522 <a class="indexterm" name="id2625498"></a> 523 523 You learned earlier that Samba, in most cases, uses its built-in settings for many parameters if it cannot 524 524 find an explicitly stated one in its configuration file. The same is true for the <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a>. The default print command varies depending on the <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing</a> parameter … … 529 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 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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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" target="_top">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="id26 32048"></a>532 <a class="indexterm" name="id26 32054"></a>533 <a class="indexterm" name="id26 32061"></a>534 <a class="indexterm" name="id26 32068"></a>531 <a class="indexterm" name="id2625962"></a> 532 <a class="indexterm" name="id2625969"></a> 533 <a class="indexterm" name="id2625975"></a> 534 <a class="indexterm" name="id2625982"></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 536 submit jobs. (It is a good idea also to set <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">printcap = cups</a> in case your … … 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" title="Custom Print Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id2632121"></a>Custom Print Commands</h4></div></div></div><p>542 <a class="indexterm" name="id26 32129"></a>543 <a class="indexterm" name="id26 32135"></a>541 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2626035"></a>Custom Print Commands</h4></div></div></div><p> 542 <a class="indexterm" name="id2626043"></a> 543 <a class="indexterm" name="id2626050"></a> 544 544 After a print job has finished spooling to a service, the <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">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 … … 548 548 that the spool file is deleted after it has been processed. 549 549 </p><p> 550 <a class="indexterm" name="id26 32165"></a>551 <a class="indexterm" name="id26 32172"></a>552 <a class="indexterm" name="id26 32179"></a>553 <a class="indexterm" name="id26 32186"></a>550 <a class="indexterm" name="id2626079"></a> 551 <a class="indexterm" name="id2626086"></a> 552 <a class="indexterm" name="id2626093"></a> 553 <a class="indexterm" name="id2626100"></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 … … 560 560 appropriate value automatically. Print commands can handle all Samba macro substitutions. In regard to 561 561 printing, the following ones do have special relevance: 562 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><em class="parameter"><code>%s, %f</code></em> the path to the spool file name.</p></li><li class="listitem"><p><em class="parameter"><code>%p</code></em> the appropriate printer name.</p></li><li class="listitem"><p><em class="parameter"><code>%J</code></em> the job name as transmitted by the client.</p></li><li class="listitem"><p><em class="parameter"><code>%c</code></em> the number of printed pages of the spooled job (if known).</p></li><li class="listitem"><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="id26 32285"></a>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="id2626199"></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="id26 32321"></a>570 <a class="indexterm" name="id26 32328"></a>569 <a class="indexterm" name="id2626235"></a> 570 <a class="indexterm" name="id2626242"></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="id26 32350"></a>577 <a class="indexterm" name="id26 32357"></a>576 <a class="indexterm" name="id2626264"></a> 577 <a class="indexterm" name="id2626271"></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="id26 32386"></a>583 <a class="indexterm" name="id26 32393"></a>584 <a class="indexterm" name="id26 32400"></a>582 <a class="indexterm" name="id2626301"></a> 583 <a class="indexterm" name="id2626308"></a> 584 <a class="indexterm" name="id2626315"></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 … … 588 588 in the Samba print command is <em class="parameter"><code>%$variable</code></em>.) To give you a working 589 589 <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a> example, the following will log a print job 590 to <code class="filename">/tmp/print.log</code>, print the file, then remove it. The semicolon ( <span class="quote">“<span class="quote">;</span>”</span>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 border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id2632456"></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="id2626370"></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 594 files on your system. The default for the <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a> 595 595 parameter varies depending on the setting of the <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing</a> 596 596 parameter. Another example is: 597 </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id2632506"></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" title="Printing Developments Since Samba-2.2"><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="id26 32533"></a>599 <a class="indexterm" name="id26 32539"></a>600 <a class="indexterm" name="id26 32546"></a>597 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2626421"></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="id2626447"></a> 599 <a class="indexterm" name="id2626454"></a> 600 <a class="indexterm" name="id2626460"></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. … … 606 606 </p><p> 607 607 The additional functionality provided by the new SPOOLSS support includes: 608 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>609 <a class="indexterm" name="id26 32581"></a>608 </p><div class="itemizedlist"><ul type="disc"><li><p> 609 <a class="indexterm" name="id2626496"></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 </p></li><li class="listitem"><p>613 <a class="indexterm" name="id26 32598"></a>612 </p></li><li><p> 613 <a class="indexterm" name="id2626512"></a> 614 614 Uploading of printer drivers via the Windows NT <span class="emphasis"><em>Add Printer Wizard</em></span> (APW) 615 615 or the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> tool set. 616 </p></li><li class="listitem"><p>617 <a class="indexterm" name="id26 32621"></a>618 <a class="indexterm" name="id26 32628"></a>619 <a class="indexterm" name="id26 32635"></a>620 <a class="indexterm" name="id26 32642"></a>621 <a class="indexterm" name="id26 32649"></a>616 </p></li><li><p> 617 <a class="indexterm" name="id2626536"></a> 618 <a class="indexterm" name="id2626542"></a> 619 <a class="indexterm" name="id2626549"></a> 620 <a class="indexterm" name="id2626556"></a> 621 <a class="indexterm" name="id2626563"></a> 622 622 Support for the native MS-RPC printing calls such as StartDocPrinter, EnumJobs(), and so on. (See the 623 623 <a class="ulink" href="http://msdn.microsoft.com/" target="_top">MSDN documentation</a> for more information on the 624 624 Win32 printing API). 625 </p></li><li class="listitem"><p>626 <a class="indexterm" name="id26 32669"></a>627 <a class="indexterm" name="id26 32675"></a>625 </p></li><li><p> 626 <a class="indexterm" name="id2626583"></a> 627 <a class="indexterm" name="id2626590"></a> 628 628 Support for NT Access Control Lists (ACL) on printer objects. 629 </p></li><li class="listitem"><p>630 <a class="indexterm" name="id26 32688"></a>629 </p></li><li><p> 630 <a class="indexterm" name="id2626602"></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="id26 32708"></a>635 <a class="indexterm" name="id26 32714"></a>634 <a class="indexterm" name="id2626622"></a> 635 <a class="indexterm" name="id2626628"></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="id26 32726"></a>638 <a class="indexterm" name="id2626640"></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="id26 32743"></a>645 <a class="indexterm" name="id26 32750"></a>646 <a class="indexterm" name="id26 32756"></a>647 <a class="indexterm" name="id26 32763"></a>648 <a class="indexterm" name="id26 32770"></a>644 <a class="indexterm" name="id2626658"></a> 645 <a class="indexterm" name="id2626664"></a> 646 <a class="indexterm" name="id2626671"></a> 647 <a class="indexterm" name="id2626678"></a> 648 <a class="indexterm" name="id2626685"></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" title="Point'n'Print Client Drivers on Samba Servers"><div class="titlepage"><div><div><h3 class="title"><a name="id2632790"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p>656 <a class="indexterm" name="id26 32799"></a>657 There is much confusion about what all this means. The question is often asked, <span class="quote">“<span class="quote">Is it or is655 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2626705"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p> 656 <a class="indexterm" name="id2626713"></a> 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 Windows clients?</span>” </span>The answer to this is no, it is not necessary.660 </p><p> 661 <a class="indexterm" name="id26 32817"></a>662 <a class="indexterm" name="id26 32824"></a>659 Windows clients?</span>” The answer to this is no, it is not necessary. 660 </p><p> 661 <a class="indexterm" name="id2626731"></a> 662 <a class="indexterm" name="id2626738"></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="id26 32843"></a>669 <a class="indexterm" name="id26 32850"></a>668 <a class="indexterm" name="id2626758"></a> 669 <a class="indexterm" name="id2626765"></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 … … 674 674 <em class="parameter"><code>[print$]</code></em> share and the following binding of this driver to an existing 675 675 Samba printer share can be achieved by different means: 676 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>676 </p><div class="itemizedlist"><ul type="disc"><li><p> 677 677 Running the <span class="emphasis"><em>APW</em></span> on an NT/200x/XP Professional client (this does not work from 95/98/ME clients). 678 </p></li><li class="listitem"><p>678 </p></li><li><p> 679 679 Using the <span class="emphasis"><em>Imprints</em></span> toolset. 680 </p></li><li class="listitem"><p>680 </p></li><li><p> 681 681 Using the <span class="emphasis"><em>smbclient</em></span> and <span class="emphasis"><em>rpcclient</em></span> command-line tools. 682 </p></li><li class="listitem"><p>682 </p></li><li><p> 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="id26 32932"></a>686 <a class="indexterm" name="id26 32939"></a>685 <a class="indexterm" name="id2626846"></a> 686 <a class="indexterm" name="id2626853"></a> 687 687 Samba does not use these uploaded drivers in any way to process spooled files. These drivers are utilized 688 entirely by the clients who download and install them via the <span class="quote">“<span class="quote">Point'n'Print</span>”</span>mechanism688 entirely by the clients who download and install them via the “<span class="quote">Point'n'Print</span>” mechanism 689 689 supported by Samba. The clients use these drivers to generate print files in the format the printer 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" title="The Obsoleted [printer$] Section"><div class="titlepage"><div><div><h3 class="title"><a name="id2632959"></a>The Obsoleted [printer$] Section</h3></div></div></div><p>693 <a class="indexterm" name="id26 32967"></a>694 <a class="indexterm" name="id26 32974"></a>692 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2626874"></a>The Obsoleted [printer$] Section</h3></div></div></div><p> 693 <a class="indexterm" name="id2626882"></a> 694 <a class="indexterm" name="id2626889"></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="id26 33019"></a>705 <a class="indexterm" name="id26 33026"></a>706 <a class="indexterm" name="id26 33033"></a>704 <a class="indexterm" name="id2626933"></a> 705 <a class="indexterm" name="id2626940"></a> 706 <a class="indexterm" name="id2626947"></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" title="Creating the [print$] Share"><div class="titlepage"><div><div><h3 class="title"><a name="id2633081"></a>Creating the [print$] Share</h3></div></div></div><p>717 <a class="indexterm" name="id26 33089"></a>716 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2626995"></a>Creating the [print$] Share</h3></div></div></div><p> 717 <a class="indexterm" name="id2627003"></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 … … 725 725 as <a class="link" href="smb.conf.5.html#PATH" target="_top">path</a>, are arbitrary and should be replaced with appropriate values for your 726 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 border="0" summary="Simple list" class="simplelist"><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="id2633173"></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="id2633210"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id2633221"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2633233"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633244"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633256"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633267"></a><em class="parameter"><code>write list = @ntadmin, root</code></em></td></tr></table></div></div><br class="example-break"><p>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="id2627087"></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="id2627124"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id2627135"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2627147"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2627159"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2627170"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2627182"></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 729 <a class="link" href="smb.conf.5.html#PATH" target="_top">path</a> parameter exists on the UNIX file system. 730 </p></div><div class="sect2" title="[print$] Stanza Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="id2633298"></a>[print$] Stanza Parameters</h3></div></div></div><p>731 <a class="indexterm" name="id26 33306"></a>732 <a class="indexterm" name="id26 33312"></a>733 <a class="indexterm" name="id26 33319"></a>734 <a class="indexterm" name="id26 33326"></a>735 <a class="indexterm" name="id26 33333"></a>730 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2627212"></a>[print$] Stanza Parameters</h3></div></div></div><p> 731 <a class="indexterm" name="id2627220"></a> 732 <a class="indexterm" name="id2627227"></a> 733 <a class="indexterm" name="id2627234"></a> 734 <a class="indexterm" name="id2627240"></a> 735 <a class="indexterm" name="id2627247"></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. … … 756 756 = yes</code></em> depends on how your site is configured. If users will be guaranteed 757 757 to have an account on the Samba host, then this is a non-issue. 758 </p><div class="note" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>758 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 759 759 If all your Windows NT users are guaranteed to be authenticated by the Samba server 760 760 (for example, if Samba authenticates via an NT domain server and the user has already been … … 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 773 groups are denoted with a leading <span class="quote">“<span class="quote">@</span>”</span>character. Users listed here are allowed773 groups are denoted with a leading “<span class="quote">@</span>” character. Users listed here are allowed 774 774 write-access (as an exception to the general public's read-only access), which they need to 775 775 update files on the share. Normally, you will want to name only administrative-level user … … 778 778 be mentioned in the global <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">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" title="The [print$] Share Directory"><div class="titlepage"><div><div><h3 class="title"><a name="id2633618"></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="id2627533"></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> … … 798 798 |--W32PPC # serves drivers to Windows NT PowerPC 799 799 </pre><p> 800 </p><div class="important" title="Required Permissions"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Required Permissions</h3><p>800 </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Required Permissions</h3><p> 801 801 In order to add a new driver to your Samba host, one of two conditions must hold true: 802 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>802 </p><div class="itemizedlist"><ul type="disc"><li><p> 803 803 The account used to connect to the Samba host must have a UID of 0 (i.e., a root account). 804 </p></li><li class="listitem"><p>804 </p></li><li><p> 805 805 The account used to connect to the Samba host must be named in the <span class="emphasis"><em>printer admin</em></span> list. 806 806 </p></li></ul></div><p> 807 807 Of course, the connected account must still have write access to add files to the subdirectories beneath 808 <em class="parameter"><code>[print$]</code></em>. Remember that all file shares are set to <span class="quote">“<span class="quote">read-only</span>”</span>by default.808 <em class="parameter"><code>[print$]</code></em>. Remember that all file shares are set to “<span class="quote">read-only</span>” by default. 809 809 </p></div><p> 810 810 Once you have created the required <em class="parameter"><code>[print$]</code></em> service and … … 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" title="Installing Drivers into [print$]"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633761"></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="id2627675"></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 … … 821 821 requested from MS Windows clients. And that is a bit tricky, to say the least. We now discuss two alternative 822 822 ways to install the drivers into <em class="parameter"><code>[print$]</code></em>: 823 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>823 </p><div class="itemizedlist"><ul type="disc"><li><p> 824 824 Using the Samba command-line utility <code class="literal">rpcclient</code> with its various subcommands (here, 825 825 <code class="literal">adddriver</code> and <code class="literal">setdriver</code>) from any UNIX workstation. 826 </p></li><li class="listitem"><p>826 </p></li><li><p> 827 827 Running a GUI (<span class="guiicon">Printer Properties</span> and <span class="guiicon">Add Printer Wizard</span>) 828 828 from any Windows NT/200x/XP client workstation. 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" title="Add Printer Wizard Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id2633854"></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="id2627768"></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 … … 840 840 on the printer icon, and select <span class="guimenu">Properties...</span>. You are now trying to view printer and 841 841 driver properties for a queue that has this default <code class="constant">NULL</code> driver assigned. This will 842 result in the following error message: <span class="quote">“<span class="quote"> Device settings cannot be displayed. The driver for the842 result in the following error message: “<span class="quote"> Device settings cannot be displayed. The driver for the 843 843 specified printer is not installed, only spooler properties will be displayed. Do you want to install the 844 driver now?</span>” </span>844 driver now?</span>” 845 845 </p><p> 846 846 Do <span class="emphasis"><em>not</em></span> click on <span class="guibutton">Yes</span>! Instead, click on <span class="guibutton">No</span> 847 847 in the error dialog. Now you will be presented with the printer properties window. From here, the way to 848 848 assign a driver to a printer is open. You now have the choice of: 849 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>849 </p><div class="itemizedlist"><ul type="disc"><li><p> 850 850 Select a driver from the pop-up list of installed drivers. Initially this list will be empty. 851 </p></li><li class="listitem"><p>851 </p></li><li><p> 852 852 Click on <span class="guibutton">New Driver</span> to install a new printer driver (which will 853 853 start up the APW). … … 865 865 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 </p></div><div class="sect2" title="Installing Print Drivers Using rpcclient"><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>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> 868 868 The second way to install printer drivers into <em class="parameter"><code>[print$]</code></em> and set them 869 869 up in a valid way is to do it from the UNIX command line. This involves four distinct steps: 870 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>870 </p><div class="orderedlist"><ol type="1"><li><p> 871 871 Gather information about required driver files and collect the files. 872 </p></li><li class="listitem"><p>872 </p></li><li><p> 873 873 Deposit the driver files into the <em class="parameter"><code>[print$]</code></em> share's correct subdirectories 874 874 (possibly by using <code class="literal">smbclient</code>). 875 </p></li><li class="listitem"><p>875 </p></li><li><p> 876 876 Run the <code class="literal">rpcclient</code> command-line utility once with the <code class="literal">adddriver</code> 877 877 subcommand. 878 </p></li><li class="listitem"><p>878 </p></li><li><p> 879 879 Run <code class="literal">rpcclient</code> a second time with the <code class="literal">setdriver</code> subcommand. 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" title="Identifying Driver Files"><div class="titlepage"><div><div><h4 class="title"><a name="id2634130"></a>Identifying Driver Files</h4></div></div></div><p>883 <a class="indexterm" name="id26 34138"></a>884 <a class="indexterm" name="id26 34145"></a>885 <a class="indexterm" name="id26 34152"></a>882 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628044"></a>Identifying Driver Files</h4></div></div></div><p> 883 <a class="indexterm" name="id2628052"></a> 884 <a class="indexterm" name="id2628059"></a> 885 <a class="indexterm" name="id2628066"></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="id26 34182"></a>893 <a class="indexterm" name="id2628097"></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="id26 34204"></a>900 <a class="indexterm" name="id2628119"></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="id26 34261"></a>909 <a class="indexterm" name="id26 34268"></a>910 <a class="indexterm" name="id26 34275"></a>908 <a class="indexterm" name="id2628176"></a> 909 <a class="indexterm" name="id2628182"></a> 910 <a class="indexterm" name="id2628189"></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="id26 34391"></a>952 <a class="indexterm" name="id26 34397"></a>953 <a class="indexterm" name="id26 34404"></a>954 <a class="indexterm" name="id26 34411"></a>951 <a class="indexterm" name="id2628305"></a> 952 <a class="indexterm" name="id2628312"></a> 953 <a class="indexterm" name="id2628319"></a> 954 <a class="indexterm" name="id2628325"></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="id26 34459"></a>965 <a class="indexterm" name="id26 34466"></a>966 <a class="indexterm" name="id26 34473"></a>964 <a class="indexterm" name="id2628374"></a> 965 <a class="indexterm" name="id2628381"></a> 966 <a class="indexterm" name="id2628388"></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 969 969 9x/Me driver files will end up in subdirectory <code class="filename">0</code> of the <code class="filename">WIN40</code> 970 970 directory. The full path to access them is <code class="filename">\\WINDOWSHOST\print$\WIN40\0\</code>. 971 </p><div class="note" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>972 More recent drivers on Windows 2000 and Windows XP are installed into the <span class="quote">“<span class="quote">3</span>”</span>subdirectory973 instead of the <span class="quote">“<span class="quote">2</span>”</span>. The version 2 of drivers, as used in Windows NT, were running in kernel971 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 972 More recent drivers on Windows 2000 and Windows XP are installed into the “<span class="quote">3</span>” subdirectory 973 instead of the “<span class="quote">2</span>”. The version 2 of drivers, as used in Windows NT, were running in kernel 974 974 mode. Windows 2000 changed this. While it still can use the kernel mode drivers (if this is enabled by 975 975 the Admin), its native mode for printer drivers is user mode execution. This requires drivers designed 976 for this purpose. These types of drivers install into the <span class="quote">“<span class="quote">3</span>”</span>subdirectory.977 </p></div></div><div class="sect3" title="Obtaining Driver Files from Windows Client [print$] Shares"><div class="titlepage"><div><div><h4 class="title"><a name="id2634537"></a>Obtaining Driver Files from Windows Client [print$] Shares</h4></div></div></div><p>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="id2628451"></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="id26 34645"></a>1002 <a class="indexterm" name="id2628560"></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" title="Installing Driver Files into [print$]"><div class="titlepage"><div><div><h4 class="title"><a name="id2634683"></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="id2628597"></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 … … 1011 1011 <em class="parameter"><code>[print$]</code></em> share maps to the UNIX path <code class="filename">/etc/samba/drivers/</code>, your 1012 1012 driver files should now go here: 1013 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1013 </p><div class="itemizedlist"><ul type="disc"><li><p> 1014 1014 For all Windows NT, 2000, and XP clients, <code class="filename">/etc/samba/drivers/W32X86/</code> but 1015 1015 not (yet) into the <code class="filename">2</code> subdirectory. 1016 </p></li><li class="listitem"><p>1016 </p></li><li><p> 1017 1017 For all Windows 95, 98, and Me clients, <code class="filename">/etc/samba/drivers/WIN40/</code> but not 1018 1018 (yet) into the <code class="filename">0</code> subdirectory. 1019 1019 </p></li></ul></div><p> 1020 <a class="indexterm" name="id26 34762"></a>1021 <a class="indexterm" name="id26 34768"></a>1020 <a class="indexterm" name="id2628676"></a> 1021 <a class="indexterm" name="id2628683"></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="id26 34841"></a>1059 <a class="indexterm" name="id26 34848"></a>1060 <a class="indexterm" name="id26 34855"></a>1058 <a class="indexterm" name="id2628755"></a> 1059 <a class="indexterm" name="id2628762"></a> 1060 <a class="indexterm" name="id2628769"></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" title="smbclient to Confirm Driver Installation"><div class="titlepage"><div><div><h4 class="title"><a name="id2634901"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p>1068 <a class="indexterm" name="id26 34914"></a>1069 <a class="indexterm" name="id26 34921"></a>1067 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628816"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p> 1068 <a class="indexterm" name="id2628828"></a> 1069 <a class="indexterm" name="id2628835"></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="id26 34995"></a>1111 <a class="indexterm" name="id26 35002"></a>1112 <a class="indexterm" name="id26 35009"></a>1110 <a class="indexterm" name="id2628910"></a> 1111 <a class="indexterm" name="id2628917"></a> 1112 <a class="indexterm" name="id2628924"></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" title="Running rpcclient with adddriver"><div class="titlepage"><div><div><h4 class="title"><a name="id2635038"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p>1121 <a class="indexterm" name="id26 35056"></a>1122 <a class="indexterm" name="id26 35063"></a>1123 <a class="indexterm" name="id26 35070"></a>1120 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628952"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p> 1121 <a class="indexterm" name="id2628971"></a> 1122 <a class="indexterm" name="id2628978"></a> 1123 <a class="indexterm" name="id2628985"></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="id26 35125"></a>1148 <a class="indexterm" name="id26 35132"></a>1149 <a class="indexterm" name="id26 35139"></a>1147 <a class="indexterm" name="id2629039"></a> 1148 <a class="indexterm" name="id2629046"></a> 1149 <a class="indexterm" name="id2629053"></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" title="Checking adddriver Completion"><div class="titlepage"><div><div><h4 class="title"><a name="id2635162"></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="id2629076"></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" title="Check Samba for Driver Recognition"><div class="titlepage"><div><div><h4 class="title"><a name="id2635304"></a>Check Samba for Driver Recognition</h4></div></div></div><p>1202 <a class="indexterm" name="id26 35312"></a>1201 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629218"></a>Check Samba for Driver Recognition</h4></div></div></div><p> 1202 <a class="indexterm" name="id2629226"></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 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1207 <a class="indexterm" name="id26 35329"></a>1208 <a class="indexterm" name="id26 35336"></a>1209 <a class="indexterm" name="id26 35343"></a>1210 <a class="indexterm" name="id26 35350"></a>1211 <a class="indexterm" name="id26 35357"></a>1206 </p><div class="itemizedlist"><ul type="disc"><li><p> 1207 <a class="indexterm" name="id2629244"></a> 1208 <a class="indexterm" name="id2629251"></a> 1209 <a class="indexterm" name="id2629258"></a> 1210 <a class="indexterm" name="id2629265"></a> 1211 <a class="indexterm" name="id2629272"></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 … … 1218 1218 see only its own architecture's list. If you do not have every driver installed for each platform, 1219 1219 the list will differ if you look at it from Windows95/98/ME or Windows NT/2000/XP.) 1220 </p></li><li class="listitem"><p>1221 <a class="indexterm" name="id26 35397"></a>1220 </p></li><li><p> 1221 <a class="indexterm" name="id2629312"></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, … … 1232 1232 <strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /s /t2 /n\\<em class="replaceable"><code>SAMBA-CUPS</code></em></code></strong> 1233 1233 </pre><p> 1234 </p></li><li class="listitem"><p>1234 </p></li><li><p> 1235 1235 From a UNIX prompt, run this command (or a variant thereof), where 1236 1236 <em class="replaceable"><code>SAMBA-CUPS</code></em> is the name of the Samba host and xxxx represents the … … 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" title="Specific Driver Name Flexibility"><div class="titlepage"><div><div><h4 class="title"><a name="id2635531"></a>Specific Driver Name Flexibility</h4></div></div></div><p>1251 <a class="indexterm" name="id26 35539"></a>1250 </p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629446"></a>Specific Driver Name Flexibility</h4></div></div></div><p> 1251 <a class="indexterm" name="id2629454"></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="id26 35587"></a>1275 <a class="indexterm" name="id26 35594"></a>1276 <a class="indexterm" name="id26 35601"></a>1274 <a class="indexterm" name="id2629501"></a> 1275 <a class="indexterm" name="id2629508"></a> 1276 <a class="indexterm" name="id2629515"></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" title="Running rpcclient with setdriver"><div class="titlepage"><div><div><h4 class="title"><a name="id2635646"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p>1284 <a class="indexterm" name="id26 35664"></a>1285 <a class="indexterm" name="id26 35671"></a>1283 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629560"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p> 1284 <a class="indexterm" name="id2629578"></a> 1285 <a class="indexterm" name="id2629585"></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 … … 1305 1305 </pre><p> 1306 1306 Now we have done most of the work, but not all of it. 1307 </p><div class="note" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>1307 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 1308 1308 The <code class="literal">setdriver</code> command will only succeed if the printer is already known to Samba. A 1309 1309 bug in 2.2.x prevented Samba from recognizing freshly installed printers. You had to restart Samba, 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" title="Client Driver Installation Procedure"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2635786"></a>Client Driver Installation Procedure</h2></div></div></div><p>1313 As Don Quixote said, <span class="quote">“<span class="quote">The proof of the pudding is in the eating.</span>”</span>The proof1312 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2629701"></a>Client Driver Installation Procedure</h2></div></div></div><p> 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" title="First Client Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id2635803"></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="id2629717"></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 … … 1331 1331 as a printer admin user (you can check this with the <code class="literal">smbstatus</code> command on Samba), 1332 1332 do this from the Windows workstation: 1333 </p><div class="procedure"><ol class="procedure" type="1"><li class="step" title="Step 1"><p>1333 </p><div class="procedure"><ol type="1"><li><p> 1334 1334 Open <span class="guiicon">Network Neighborhood</span>. 1335 </p></li><li class="step" title="Step 2"><p>1335 </p></li><li><p> 1336 1336 Browse to Samba server. 1337 </p></li><li class="step" title="Step 3"><p>1337 </p></li><li><p> 1338 1338 Open its <span class="guiicon">Printers and Faxes</span> folder. 1339 </p></li><li class="step" title="Step 4"><p>1339 </p></li><li><p> 1340 1340 Highlight and right-click on the printer. 1341 </p></li><li class="step" title="Step 5"><p>1341 </p></li><li><p> 1342 1342 Select <span class="guimenuitem">Connect</span> (for Windows NT4/200x 1343 1343 it is possibly <span class="guimenuitem">Install</span>). … … 1348 1348 and Faxes</span>). 1349 1349 </p><p> 1350 <a class="indexterm" name="id26 35974"></a>1350 <a class="indexterm" name="id2629888"></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 1353 1353 chances are that you get an error message saying "<code class="literal">Unable to print Test Page</code>." The 1354 reason might be that there is not yet a valid device mode set for the driver or that the <span class="quote">“<span class="quote">printer1355 driver data</span>” </span>set is still incomplete.1354 reason might be that there is not yet a valid device mode set for the driver or that the “<span class="quote">printer 1355 driver data</span>” set is still incomplete. 1356 1356 </p><p> 1357 1357 You must make sure that a valid <em class="parameter"><code>device mode</code></em> is set for the 1358 1358 driver. We now explain what that means. 1359 </p></div><div class="sect2" title="Setting Device Modes on New Printers"><div class="titlepage"><div><div><h3 class="title"><a name="prt-modeset"></a>Setting Device Modes on New Printers</h3></div></div></div><p>1359 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="prt-modeset"></a>Setting Device Modes on New Printers</h3></div></div></div><p> 1360 1360 For a printer to be truly usable by a Windows NT/200x/XP client, it must possess: 1361 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1362 <a class="indexterm" name="id26 36035"></a>1361 </p><div class="itemizedlist"><ul type="disc"><li><p> 1362 <a class="indexterm" name="id2629949"></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 </p></li><li class="listitem"><p>1366 <a class="indexterm" name="id26 36051"></a>1365 </p></li><li><p> 1366 <a class="indexterm" name="id2629966"></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="id26 36067"></a>1370 <a class="indexterm" name="id26 36074"></a>1371 <a class="indexterm" name="id26 36081"></a>1372 <a class="indexterm" name="id263 6088"></a>1373 <a class="indexterm" name="id263 6095"></a>1369 <a class="indexterm" name="id2629982"></a> 1370 <a class="indexterm" name="id2629988"></a> 1371 <a class="indexterm" name="id2629995"></a> 1372 <a class="indexterm" name="id2630002"></a> 1373 <a class="indexterm" name="id2630009"></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 … … 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" title="Procedure 21.1. Procedure to Initialize the Printer Driver Settings"><a name="id2636193"></a><p class="title"><b>Procedure 21.1. Procedure to Initialize the Printer Driver Settings</b></p><ol class="procedure" type="1"><li class="step" title="Step 1"><p>1399 </p><div class="procedure"><a name="id2630107"></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 </p></li><li class="step" title="Step 2"><p>1401 </p></li><li><p> 1402 1402 Find the Samba server. 1403 </p></li><li class="step" title="Step 3"><p>1403 </p></li><li><p> 1404 1404 Open the Samba server's <span class="guiicon">Printers and Faxes</span> folder. 1405 </p></li><li class="step" title="Step 4"><p>1405 </p></li><li><p> 1406 1406 Highlight the shared printer in question. 1407 </p></li><li class="step" title="Step 5"><p>1407 </p></li><li><p> 1408 1408 Right-click on the printer (you may already be here if you followed the last section's description). 1409 </p></li><li class="step" title="Step 6"><p>1409 </p></li><li><p> 1410 1410 At the bottom of the context menu select <span class="guimenu">Properties</span> (if the menu still offers the 1411 1411 <span class="guimenuitem">Connect</span> entry further above, you 1412 1412 need to click on that one first to achieve the driver 1413 1413 installation, as shown in the last section). 1414 </p></li><li class="step" title="Step 7"><p>1414 </p></li><li><p> 1415 1415 Go to the <span class="guilabel">Advanced</span> tab; click on <span class="guibutton">Printing Defaults</span>. 1416 </p></li><li class="step" title="Step 8"><p>1416 </p></li><li><p> 1417 1417 Change the <span class="guimenuitem">Portrait</span> page setting to <span class="guimenuitem">Landscape</span> (and back). 1418 </p></li><li class="step" title="Step 9"><p>1418 </p></li><li><p> 1419 1419 Make sure to apply changes between swapping the page orientation to cause the change to actually take effect. 1420 </p></li><li class="step" title="Step 10"><p>1420 </p></li><li><p> 1421 1421 While you are at it, you may also want to set the desired printing defaults here, which then apply to all future 1422 1422 client driver installations. … … 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="id263 6347"></a>1429 <a class="indexterm" name="id2630261"></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" title="Additional Client Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id2636368"></a>Additional Client Driver Installation</h3></div></div></div><p>1435 <a class="indexterm" name="id263 6376"></a>1434 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2630283"></a>Additional Client Driver Installation</h3></div></div></div><p> 1435 <a class="indexterm" name="id2630291"></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="id263 6443"></a>1448 <a class="indexterm" name="id2630358"></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" title="Always Make First Client Connection as root or “printer admin”"><div class="titlepage"><div><div><h3 class="title"><a name="id2636487"></a>Always Make First Client Connection as root or <span class="quote">“<span class="quote">printer admin</span>”</span></h3></div></div></div><p>1455 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2630401"></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 1458 to build the very first connection from a client as <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a>. This is to make 1459 1459 sure that: 1460 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1460 </p><div class="itemizedlist"><ul type="disc"><li><p> 1461 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 </p></li><li class="listitem"><p>1462 </p></li><li><p> 1463 1463 The default print settings of your printer for all further client installations are as you want them. 1464 1464 </p></li></ul></div><p> … … 1468 1468 printer for <span class="guiicon">duplex</span> as the default, and so on). 1469 1469 </p><p> 1470 <a class="indexterm" name="id263 6581"></a>1470 <a class="indexterm" name="id2630496"></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"> … … 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" title="Other Gotchas"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2636660"></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="id2630574"></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 1487 1487 few tips and tricks you may find useful. For example, suppose you did not set the defaults on the printer, as 1488 advised in the preceding paragraphs. Your users complain about various issues (such as, <span class="quote">“<span class="quote">We need to set1489 the paper size for each job from Letter to A4 and it will not store it</span>” </span>).1490 </p><div class="sect2" title="Setting Default Print Options for Client Drivers"><div class="titlepage"><div><div><h3 class="title"><a name="id2636681"></a>Setting Default Print Options for Client Drivers</h3></div></div></div><p>1488 advised in the preceding paragraphs. Your users complain about various issues (such as, “<span class="quote">We need to set 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="id2630595"></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 … … 1495 1495 they help you to set printer options in three different ways. Here is the definitive answer to the Samba 1496 1496 default driver setting FAQ: 1497 </p><p title="“I can not set and save default print options for all users on Windows 200x/XP. Why not?”"><b><span class="quote">“<span class="quote">I can not set and save default print options1498 for all users on Windows 200x/XP. Why not?</span>” </span>. </b>1497 </p><p><b>“<span class="quote">I can not set and save default print options 1498 for all users on Windows 200x/XP. Why not?</span>”. </b> 1499 1499 How are you doing it? I bet the wrong way. (It is not easy to find out, though.) There are three different 1500 1500 ways to bring you to a dialog that seems to set everything. All three dialogs look the same, but only one of 1501 1501 them does what you intend. You need to be Administrator or Print Administrator to do this for all users. Here 1502 1502 is how I reproduce it in an XP Professional: 1503 </p><div class="orderedlist"><ol class="orderedlist" type="A"><li class="listitem"><p>The first <span class="quote">“<span class="quote">wrong</span>”</span>way:1504 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Open the <span class="guiicon">Printers</span> folder.</p></li><li class="listitem"><p>Right-click on the printer (<span class="emphasis"><em>remoteprinter on cupshost</em></span>) and1505 select in context menu <span class="guimenu">Printing Preferences...</span>.</p></li><li class="listitem"><p>Look at this dialog closely and remember what it looks like.</p></li></ol></div></li><li class="listitem"><p>The second <span class="quote">“<span class="quote">wrong</span>”</span>way:1506 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Open the <span class="guimenu">Printers</span> folder.</p></li><li class="listitem"><p>Right-click on the printer (<span class="emphasis"><em>remoteprinter on1503 </p><div class="orderedlist"><ol type="A"><li><p>The first “<span class="quote">wrong</span>” way: 1504 </p><div class="orderedlist"><ol type="1"><li><p>Open the <span class="guiicon">Printers</span> folder.</p></li><li><p>Right-click on the printer (<span class="emphasis"><em>remoteprinter on cupshost</em></span>) and 1505 select in context menu <span class="guimenu">Printing Preferences...</span>.</p></li><li><p>Look at this dialog closely and remember what it looks like.</p></li></ol></div></li><li><p>The second “<span class="quote">wrong</span>” way: 1506 </p><div class="orderedlist"><ol type="1"><li><p>Open the <span class="guimenu">Printers</span> folder.</p></li><li><p>Right-click on the printer (<span class="emphasis"><em>remoteprinter on 1507 1507 cupshost</em></span>) and select in the context menu 1508 <span class="guimenuitem">Properties</span></p></li><li class="listitem"><p>Click on the <span class="guilabel">General</span>1509 tab.</p></li><li class="listitem"><p>Click on the <span class="guibutton">Printing1510 Preferences...</span> button.</p></li><li class="listitem"><p>A new dialog opens. Keep this dialog open and go back1508 <span class="guimenuitem">Properties</span></p></li><li><p>Click on the <span class="guilabel">General</span> 1509 tab.</p></li><li><p>Click on the <span class="guibutton">Printing 1510 Preferences...</span> button.</p></li><li><p>A new dialog opens. Keep this dialog open and go back 1511 1511 to the parent dialog.</p></li></ol></div><p> 1512 </p></li><li class="listitem"><p>1512 </p></li><li><p> 1513 1513 The third and correct way (should you do this from the beginning, just carry out steps 1 1514 1514 and 2 from the second method above): 1515 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Click on the <span class="guilabel">Advanced</span>1516 tab. (If everything is <span class="quote">“<span class="quote">grayed out,</span>”</span>then you are not logged1517 in as a user with enough privileges.)</p></li><li class="listitem"><p>Click on the <span class="guibutton">Printing1518 Defaults</span> button.</p></li><li class="listitem"><p>On any of the two new tabs,1515 </p><div class="orderedlist"><ol type="1"><li><p>Click on the <span class="guilabel">Advanced</span> 1516 tab. (If everything is “<span class="quote">grayed out,</span>” then you are not logged 1517 in as a user with enough privileges.)</p></li><li><p>Click on the <span class="guibutton">Printing 1518 Defaults</span> button.</p></li><li><p>On any of the two new tabs, 1519 1519 click on the 1520 <span class="guilabel">Advanced</span> button.</p></li><li class="listitem"><p>A new dialog opens. Compare1520 <span class="guilabel">Advanced</span> button.</p></li><li><p>A new dialog opens. Compare 1521 1521 this one to the other. Are they 1522 1522 identical when you compare one from 1523 <span class="quote">“<span class="quote">B.5</span>”</span> and one from A.3?</p></li></ol></div></li></ol></div><p title="“I can not set and save default print options for all users on Windows 200x/XP. Why not?”">1523 “<span class="quote">B.5</span>” and one from A.3?</p></li></ol></div></li></ol></div><p> 1524 1524 Do you see any difference in the two settings dialogs? I do not either. However, only the last one, which you 1525 1525 arrived at with steps C.1 through C.6 will permanently save any settings which will then become the defaults … … 1530 1530 identical-looking dialogs have a slight difference in their window names; one is called 1531 1531 <code class="computeroutput">Default Print Values for Printer Foo on Server Bar</code> (which is the one you 1532 need) and the other is called <span class="quote">“<span class="quote"><code class="computeroutput">Print Settings for Printer Foo on Server1533 Bar</code></span>” </span>. The last one is the one you arrive at when you right-click on the printer and1532 need) and the other is called “<span class="quote"><code class="computeroutput">Print Settings for Printer Foo on Server 1533 Bar</code></span>”. The last one is the one you arrive at when you right-click on the printer and 1534 1534 select <span class="guimenuitem">Print Settings...</span>. This is the one that you were taught to use back in the 1535 1535 days of Windows NT, so it is only natural to try the same way with Windows 200x/XP. You would not dream that 1536 1536 there is now a different path to arrive at an identical-looking, but functionally different, dialog to set 1537 1537 defaults for all users. 1538 </p><div class="tip" title="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="id263 6975"></a>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="id2630889"></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" title="Supporting Large Numbers of Printers"><div class="titlepage"><div><div><h3 class="title"><a name="id2637048"></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="id2630963"></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 … … 1628 1628 </pre><p> 1629 1629 It may not be easy to recognize that the first call to <code class="literal">enumprinters</code> showed the 1630 <span class="quote">“<span class="quote">dm9110</span>”</span>printer with an empty string where the driver should have been listed (between1630 “<span class="quote">dm9110</span>” printer with an empty string where the driver should have been listed (between 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" title="Adding New Printers with the Windows NT APW"><div class="titlepage"><div><div><h3 class="title"><a name="id2637304"></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="id2631219"></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 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>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 1638 administrative privileges (i.e., root or <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a>). 1639 </p><div class="tip" title="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: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> 1641 1641 runas /netonly /user:root rundll32 printui.dll,PrintUIEntry /p /t0 /n \\<em class="replaceable"><code>SAMBA-SERVER</code></em>\<em class="replaceable"><code>printersharename</code></em> 1642 1642 </code></strong></p><p> 1643 1643 Click on <span class="guibutton">Printing Preferences</span>. 1644 </p></div></li><li class="listitem"><p>... contains the setting1644 </p></div></li><li><p>... contains the setting 1645 1645 <a class="link" href="smb.conf.5.html#SHOWADDPRINTERWIZARD" target="_top">show add printer wizard = yes</a> (the 1646 1646 default).</p></li></ul></div><p> 1647 1647 The APW can do various things: 1648 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1648 </p><div class="itemizedlist"><ul type="disc"><li><p> 1649 1649 Upload a new driver to the Samba <em class="parameter"><code>[print$]</code></em> share. 1650 </p></li><li class="listitem"><p>1650 </p></li><li><p> 1651 1651 Associate an uploaded driver with an existing (but still driverless) print queue. 1652 </p></li><li class="listitem"><p>1652 </p></li><li><p> 1653 1653 Exchange the currently used driver for an existing print queue with one that has been uploaded before. 1654 </p></li><li class="listitem"><p>1654 </p></li><li><p> 1655 1655 Add an entirely new printer to the Samba host (only in conjunction with a working 1656 1656 <a class="link" href="smb.conf.5.html#ADDPRINTERCOMMAND" target="_top">add printer command</a>. A corresponding … … 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" title="Error Message: “Cannot connect under a different Name”"><div class="titlepage"><div><div><h3 class="title"><a name="id2637564"></a>Error Message: <span class="quote">“<span class="quote">Cannot connect under a different Name</span>”</span></h3></div></div></div><p>1673 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631479"></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 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1677 <a class="indexterm" name="id263 7584"></a>1676 </p><div class="itemizedlist"><ul type="disc"><li><p> 1677 <a class="indexterm" name="id2631498"></a> 1678 1678 The <code class="literal">net use \\SAMBA-SERVER\sharename /user:root</code> gives you an error message: 1679 <span class="quote">“<span class="quote">Multiple connections to a server or a shared resource by the same user utilizing1679 “<span class="quote">Multiple connections to a server or a shared resource by the same user utilizing 1680 1680 several user names are not allowed. Disconnect all previous connections to the server, 1681 esp. the shared resource, and try again.</span>” </span>1682 </p></li><li class="listitem"><p>1683 Every attempt to <span class="quote">“<span class="quote">connect a network drive</span>”</span>to <code class="filename">\\SAMBASERVER\\print$</code>1684 to <code class="constant">z:</code> is countered by the pertinacious message: <span class="quote">“<span class="quote">This1681 esp. the shared resource, and try again.</span>” 1682 </p></li><li><p> 1683 Every attempt to “<span class="quote">connect a network drive</span>” to <code class="filename">\\SAMBASERVER\\print$</code> 1684 to <code class="constant">z:</code> is countered by the pertinacious message: “<span class="quote">This 1685 1685 network folder is currently connected under different credentials (username and password). 1686 1686 Disconnect first any existing connection to this network share in order to connect again under 1687 a different username and password</span>” </span>.1687 a different username and password</span>”. 1688 1688 </p></li></ul></div><p> 1689 1689 So you close all connections. You try again. You get the same message. You check from the Samba side, using … … 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" title="Take Care When Assembling Driver Files"><div class="titlepage"><div><div><h3 class="title"><a name="id2637678"></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="id2631592"></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 driver. Don't confuse the files for driver version <span class="quote">“<span class="quote">0</span>”</span>(for Windows 9x/Me, going into1705 driver. Don't confuse the files for driver version “<span class="quote">0</span>” (for Windows 9x/Me, going into 1706 1706 <code class="filename">[print$]/WIN/0/</code>), driver version <code class="filename">2</code> (kernel mode driver for Windows NT, 1707 1707 going into <code class="filename">[print$]/W32X86/2/</code>; may be used on Windows 200x/XP also), and 1708 driver version <span class="quote">“<span class="quote">3</span>”</span>(non-kernel mode driver going into <code class="filename">[print$]/W32X86/3/</code>;1708 driver version “<span class="quote">3</span>” (non-kernel mode driver going into <code class="filename">[print$]/W32X86/3/</code>; 1709 1709 cannot be used on Windows NT). Quite often these different driver versions contain 1710 1710 files that have the same name but actually are very different. If you look at them from … … 1778 1778 1779 1779 </pre><p> 1780 If we write the <span class="quote">“<span class="quote">version 2</span>”</span> files and the <span class="quote">“<span class="quote">version 3</span>”</span>files1780 If we write the “<span class="quote">version 2</span>” files and the “<span class="quote">version 3</span>” files 1781 1781 into different text files and compare the result, we see this 1782 1782 picture: … … 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" title="Samba and Printer Ports"><div class="titlepage"><div><div><h3 class="title"><a name="id2637988"></a>Samba and Printer Ports</h3></div></div></div><p>1835 <a class="indexterm" name="id263 7996"></a>1836 <a class="indexterm" name="id263 8002"></a>1837 <a class="indexterm" name="id263 8009"></a>1838 <a class="indexterm" name="id263 8016"></a>1834 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631902"></a>Samba and Printer Ports</h3></div></div></div><p> 1835 <a class="indexterm" name="id2631910"></a> 1836 <a class="indexterm" name="id2631917"></a> 1837 <a class="indexterm" name="id2631924"></a> 1838 <a class="indexterm" name="id2631930"></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 1841 support the concept of ports associated with a printer. By default, only one printer port, named <span class="quote">“<span class="quote">Samba1842 Printer Port</span>” </span>, exists on a system. Samba does not really need such a <span class="quote">“<span class="quote">port</span>”</span>in order to1841 support the concept of ports associated with a printer. By default, only one printer port, named “<span class="quote">Samba 1842 Printer Port</span>”, exists on a system. Samba does not really need such a “<span class="quote">port</span>” in order to 1843 1843 print; rather it is a requirement of Windows clients. They insist on being told about an available port when 1844 1844 they request this information; otherwise, they throw an error message at you. So Samba fakes the port 1845 1845 information to keep the Windows clients happy. 1846 1846 </p><p> 1847 <a class="indexterm" name="id263 8060"></a>1847 <a class="indexterm" name="id2631974"></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. … … 1852 1852 that they are working with Samba), configure the <a class="link" href="smb.conf.5.html#ENUMPORTSCOMMAND" target="_top">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" title="Avoiding Common Client Driver Misconfiguration"><div class="titlepage"><div><div><h3 class="title"><a name="id2638097"></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="id2632011"></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">“<span class="quote">Avoiding the Wrong PostScript Driver Settings</span>”</span>in <a class="link" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support">CUPS Printing1858 “<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 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" title="The Imprints Toolset"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638134"></a>The Imprints Toolset</h2></div></div></div><p>1862 <a class="indexterm" name="id263 8142"></a>1861 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2632048"></a>The Imprints Toolset</h2></div></div></div><p> 1862 <a class="indexterm" name="id2632056"></a> 1863 1863 The Imprints tool set provides a UNIX equivalent of the Windows NT APW. For complete information, please 1864 1864 refer to the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> Web site as well as the … … 1872 1872 there are prepared packages to use. Packages for more up-to-date print devices are needed if Imprints 1873 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" title="What Is Imprints?"><div class="titlepage"><div><div><h3 class="title"><a name="id2638180"></a>What Is Imprints?</h3></div></div></div><p>1874 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2632094"></a>What Is Imprints?</h3></div></div></div><p> 1875 1875 Imprints is a collection of tools for supporting these goals: 1876 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1876 </p><div class="itemizedlist"><ul type="disc"><li><p> 1877 1877 Providing a central repository of information regarding Windows NT and 95/98 printer driver packages. 1878 </p></li><li class="listitem"><p>1878 </p></li><li><p> 1879 1879 Providing the tools necessary for creating the Imprints printer driver packages. 1880 </p></li><li class="listitem"><p>1880 </p></li><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" title="Creating Printer Driver Packages"><div class="titlepage"><div><div><h3 class="title"><a name="id2638214"></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="id2632128"></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" title="The Imprints Server"><div class="titlepage"><div><div><h3 class="title"><a name="id2638230"></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="id2632144"></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" title="The Installation Client"><div class="titlepage"><div><div><h3 class="title"><a name="id2638247"></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="id2632162"></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 1898 1898 installation client comes in two forms: 1899 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>A set of command-line Perl scripts.</p></li><li class="listitem"><p>A GTK+-based graphical interface to the command-line Perl scripts.</p></li></ul></div><p>1899 </p><div class="itemizedlist"><ul type="disc"><li><p>A set of command-line Perl scripts.</p></li><li><p>A GTK+-based graphical interface to the command-line Perl scripts.</p></li></ul></div><p> 1900 1900 The installation client (in both forms) provides a means of querying the Imprints database server for 1901 1901 a matching list of known printer model names as well as a means to download and install the drivers on … … 1903 1903 </p><p> 1904 1904 The basic installation process is in four steps, and Perl code is wrapped around smbclient and rpcclient. 1905 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1905 </p><div class="itemizedlist"><ul type="disc"><li><p> 1906 1906 For each supported architecture for a given driver: 1907 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>rpcclient: Get the appropriate upload directory on the remote server.</p></li><li class="listitem"><p>smbclient: Upload the driver files.</p></li><li class="listitem"><p>rpcclient: Issues an AddPrinterDriver() MS-RPC.</p></li></ol></div><p>1908 </p></li><li class="listitem"><p>rpcclient: Issues an AddPrinterEx() MS-RPC to actually create the printer.</p></li></ul></div><p>1907 </p><div class="orderedlist"><ol type="1"><li><p>rpcclient: Get the appropriate upload directory on the remote server.</p></li><li><p>smbclient: Upload the driver files.</p></li><li><p>rpcclient: Issues an AddPrinterDriver() MS-RPC.</p></li></ol></div><p> 1908 </p></li><li><p>rpcclient: Issues an AddPrinterEx() MS-RPC to actually create the printer.</p></li></ul></div><p> 1909 1909 One of the problems encountered when implementing the Imprints tool set was the namespace issues between 1910 various supported client architectures. For example, Windows NT includes a driver named <span class="quote">“<span class="quote">Apple LaserWriter1911 II NTX v51.8</span>” </span>, and Windows 95 calls its version of this driver <span class="quote">“<span class="quote">Apple LaserWriter II NTX</span>”</span>.1910 various supported client architectures. For example, Windows NT includes a driver named “<span class="quote">Apple LaserWriter 1911 II NTX v51.8</span>”, and Windows 95 calls its version of this driver “<span class="quote">Apple LaserWriter II NTX</span>”. 1912 1912 </p><p> 1913 1913 The problem is how to know what client drivers have been uploaded for a printer. An astute reader will … … 1919 1919 will reveal that Windows NT always uses the NT driver name. This is okay because Windows NT always requires 1920 1920 that at least the Windows NT version of the printer driver is present. Samba does not have the 1921 requirement internally; therefore, <span class="quote">“<span class="quote">How can you use the NT driver name if it has not already been installed?</span>”</span>1921 requirement internally; therefore, “<span class="quote">How can you use the NT driver name if it has not already been installed?</span>” 1922 1922 </p><p> 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" title="Adding Network Printers without User Interaction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638381"></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="id2632295"></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 1927 <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 … … 1942 1942 </pre><p> 1943 1943 Here is a list of the used command-line parameters: 1944 </p><div class="variablelist"><dl><dt><span class="term">/dn</span></dt><dd><p>deletes a network printer.</p></dd><dt><span class="term">/q</span></dt><dd><p>quiet modus.</p></dd><dt><span class="term">/n</span></dt><dd><p>names a printer.</p></dd><dt><span class="term">/in</span></dt><dd><p>adds a network printer connection.</p></dd><dt><span class="term">/y</span></dt><dd><p>sets printer as default printer.</p></dd></dl></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1944 </p><div class="variablelist"><dl><dt><span class="term">/dn</span></dt><dd><p>deletes a network printer.</p></dd><dt><span class="term">/q</span></dt><dd><p>quiet modus.</p></dd><dt><span class="term">/n</span></dt><dd><p>names a printer.</p></dd><dt><span class="term">/in</span></dt><dd><p>adds a network printer connection.</p></dd><dt><span class="term">/y</span></dt><dd><p>sets printer as default printer.</p></dd></dl></div><div class="itemizedlist"><ul type="disc"><li><p> 1945 1945 Line 1 deletes a possibly existing previous network printer <span class="emphasis"><em>infotec2105-IPDS</em></span> 1946 1946 (which had used native Windows drivers with LPRng that were removed from the server that was 1947 1947 converted to CUPS). The <code class="literal">/q</code> at the end prevents confirm 1948 1948 or error dialog boxes from popping up. They should not be presented to the user logging on. 1949 </p></li><li class="listitem"><p>1949 </p></li><li><p> 1950 1950 Line 2 adds the new printer 1951 1951 <span class="emphasis"><em>infotec2105-PS</em></span> (which actually is the same … … 1955 1955 <code class="literal">cupsaddsmb</code>). The driver is now autodownloaded to the client PC where the 1956 1956 user is about to log in. 1957 </p></li><li class="listitem"><p>1957 </p></li><li><p> 1958 1958 Line 3 sets the default printer to this new network printer (there might be several other 1959 1959 printers installed with this same method, and some may be local as well, so we decide for a … … 1973 1973 </p><p> 1974 1974 The additional benefits for this are: 1975 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1975 </p><div class="itemizedlist"><ul type="disc"><li><p> 1976 1976 It puts in place any printer default setup changes automatically at every user logon. 1977 </p></li><li class="listitem"><p>1978 It allows for <span class="quote">“<span class="quote">roaming</span>”</span>users' login to the domain from different workstations.1977 </p></li><li><p> 1978 It allows for “<span class="quote">roaming</span>” users' login to the domain from different workstations. 1979 1979 </p></li></ul></div><p> 1980 1980 Since network printers are installed per user, this much simplifies the process of keeping the installation … … 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" title="The addprinter Command"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638654"></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="id2632569"></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" title="Migration of Classical Printing to Samba"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638693"></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="id2632608"></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 … … 1997 1997 an effort. Please read the appropriate release notes and the HOWTO Collection for Samba-2.2.x. You can 1998 1998 follow several paths. Here are possible scenarios for migration: 1999 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>1999 </p><div class="itemizedlist"><ul type="disc"><li><p> 2000 2000 You need to study and apply the new Windows NT printer and driver support. Previously used 2001 2001 parameters <em class="parameter"><code>printer driver file</code></em>, <em class="parameter"><code>printer driver</code></em>, 2002 2002 and <em class="parameter"><code>printer driver location</code></em> are no longer supported. 2003 </p></li><li class="listitem"><p>2003 </p></li><li><p> 2004 2004 If you want to take advantage of Windows NT printer driver support, you also need to migrate the 2005 2005 Windows 9x/Me drivers to the new setup. 2006 </p></li><li class="listitem"><p>2006 </p></li><li><p> 2007 2007 An existing <code class="filename">printers.def</code> file (the one specified in the now removed parameter 2008 2008 <em class="parameter"><code>printer driver file</code></em>) will no longer work with Samba-3. In 3.0, smbd attempts … … 2011 2011 (as 2.2.x used to do) drop down to using a <code class="filename">printers.def</code> (and all associated 2012 2012 parameters). The make_printerdef tool is removed and there is no backward compatibility for this. 2013 </p></li><li class="listitem"><p>You need to install a Windows 9x/Me driver into the2013 </p></li><li><p>You need to install a Windows 9x/Me driver into the 2014 2014 <em class="parameter"><code>[print$]</code></em> share for a printer on your Samba 2015 host. The driver files will be stored in the <span class="quote">“<span class="quote">WIN40/0</span>”</span>subdirectory of2015 host. The driver files will be stored in the “<span class="quote">WIN40/0</span>” subdirectory of 2016 2016 <em class="parameter"><code>[print$]</code></em>, and some other settings and information go 2017 into the printing-related TDBs.</p></li><li class="listitem"><p>2017 into the printing-related TDBs.</p></li><li><p> 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 2020 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 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" title="Publishing Printer Information in Active Directory or LDAP"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638842"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p>2022 </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2632756"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p> 2023 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 2025 <a class="ulink" href="mail://jht@samba.org" target="_top">John H. Terpstra</a>. 2026 </p></div><div class="sect1" title="Common Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638871"></a>Common Errors</h2></div></div></div><div class="sect2" title="I Give My Root Password but I Do Not Get Access"><div class="titlepage"><div><div><h3 class="title"><a name="id2638877"></a>I Give My Root Password but I Do Not Get Access</h3></div></div></div><p>2026 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2632786"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2632791"></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" title="My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost"><div class="titlepage"><div><div><h3 class="title"><a name="id2638918"></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="id2632833"></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.