~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to docs/htmldocs/Samba3-HOWTO/classicalprinting.html

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.75.2"><link rel="home" href="index.html" title="The Official Samba 3.5.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">&lt;<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>&gt;</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">&lt;<a class="email" href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</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">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</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#id389000">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id389202">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id389339">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id389393">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id389487">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id389756">Verifying Configuration with <code class="literal">testparm</code></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id389938">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id390291">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id390731">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#id393257">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393411">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393521">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393729">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id394022">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id394150">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id394235">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#id395945">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id395960">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#id396470">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id396581">Always Make First Client Connection as root or <span class="quote">&#8220;<span class="quote">printer admin</span>&#8221;</span></a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id396739">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id396756">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397092">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397328">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397565">Error Message: <span class="quote">&#8220;<span class="quote">Cannot connect under a different Name</span>&#8221;</span></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397664">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397864">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397963">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id397996">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id398034">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398063">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398076">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398090">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id398206">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398448">The <code class="literal">addprinter</code> Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398481">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398612">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398639">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id398644">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398682">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="id389000"></a>Features and Benefits</h2></div></div></div><p>
2
 
<a class="indexterm" name="id389007"></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.75.2"><link rel="home" href="index.html" title="The Official Samba 3.5.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">&lt;<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>&gt;</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">&lt;<a class="email" href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</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">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</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#id389000">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id389202">Technical Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id389339">Client to Samba Print Job Processing</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id389393">Printing-Related Configuration Parameters</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id389487">Simple Print Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id389756">Verifying Configuration with <code class="literal">testparm</code></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id389939">Rapid Configuration Validation</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id390291">Extended Printing Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id390731">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#id393254">Point'n'Print Client Drivers on Samba Servers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393408">The Obsoleted [printer$] Section</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393519">Creating the [print$] Share</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id393726">[print$] Stanza Parameters</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id394019">The [print$] Share Directory</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id394148">Installing Drivers into [print$]</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id394232">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#id395921">Client Driver Installation Procedure</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id395936">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#id396442">Additional Client Driver Installation</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id396553">Always Make First Client Connection as root or <span class="quote">&#8220;<span class="quote">printer admin</span>&#8221;</span></a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id396711">Other Gotchas</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id396728">Setting Default Print Options for Client Drivers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397064">Supporting Large Numbers of Printers</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397300">Adding New Printers with the Windows NT APW</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397538">Error Message: <span class="quote">&#8220;<span class="quote">Cannot connect under a different Name</span>&#8221;</span></a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397636">Take Care When Assembling Driver Files</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397860">Samba and Printer Ports</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id397959">Avoiding Common Client Driver Misconfiguration</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id397992">The Imprints Toolset</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id398030">What Is Imprints?</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398060">Creating Printer Driver Packages</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398072">The Imprints Server</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398086">The Installation Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="classicalprinting.html#id398202">Adding Network Printers without User Interaction</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398444">The <code class="literal">addprinter</code> Command</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398477">Migration of Classical Printing to Samba</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398608">Publishing Printer Information in Active Directory or LDAP</a></span></dt><dt><span class="sect1"><a href="classicalprinting.html#id398635">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="classicalprinting.html#id398641">I Give My Root Password but I Do Not Get Access</a></span></dt><dt><span class="sect2"><a href="classicalprinting.html#id398678">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="id389000"></a>Features and Benefits</h2></div></div></div><p>
 
2
<a class="indexterm" name="id389008"></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
6
<a class="indexterm" name="id389019"></a>
7
7
<a class="indexterm" name="id389026"></a>
8
8
<a class="indexterm" name="id389033"></a>
9
 
<a class="indexterm" name="id389039"></a>
 
9
<a class="indexterm" name="id389040"></a>
10
10
<a class="indexterm" name="id389046"></a>
11
11
<a class="indexterm" name="id389053"></a>
12
12
<a class="indexterm" name="id389060"></a>
13
13
<a class="indexterm" name="id389067"></a>
14
 
<a class="indexterm" name="id389073"></a>
 
14
<a class="indexterm" name="id389074"></a>
15
15
<a class="indexterm" name="id389080"></a>
16
16
<a class="indexterm" name="id389087"></a>
17
17
<a class="indexterm" name="id389094"></a>
18
18
<a class="indexterm" name="id389101"></a>
19
 
<a class="indexterm" name="id389107"></a>
 
19
<a class="indexterm" name="id389108"></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.
22
22
Configurations may be simple or complex. Available authentication schemes are essentially the same as
89
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="id389393"></a>Printing-Related Configuration Parameters</h3></div></div></div><p>
90
90
<a class="indexterm" name="id389401"></a>
91
91
<a class="indexterm" name="id389408"></a>
92
 
<a class="indexterm" name="id389414"></a>
 
92
<a class="indexterm" name="id389415"></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
95
95
<span class="emphasis"><em>G</em></span> in the listings) and service-level (<span class="emphasis"><em>S</em></span>) parameters.
136
136
<a class="indexterm" name="id389768"></a>
137
137
<a class="indexterm" name="id389775"></a>
138
138
<a class="indexterm" name="id389782"></a>
139
 
<a class="indexterm" name="id389788"></a>
 
139
<a class="indexterm" name="id389789"></a>
140
140
<a class="indexterm" name="id389795"></a>
141
141
<a class="indexterm" name="id389802"></a>
142
142
<a class="indexterm" name="id389809"></a>
143
143
<a class="indexterm" name="id389816"></a>
144
 
<a class="indexterm" name="id389822"></a>
 
144
<a class="indexterm" name="id389823"></a>
145
145
<a class="indexterm" name="id389829"></a>
146
146
<a class="indexterm" name="id389836"></a>
147
147
To see all (or at least most) printing-related settings in Samba, including the implicitly used ones, try the
194
194
The <code class="literal">testparm</code> in Samba-3 behaves differently from that in 2.2.x: used without the
195
195
<span class="quote">&#8220;<span class="quote">-v</span>&#8221;</span> switch, it only shows you the settings actually written into! To see the complete
196
196
configuration used, add the <span class="quote">&#8220;<span class="quote">-v</span>&#8221;</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="id389938"></a>Rapid Configuration Validation</h3></div></div></div><p> 
 
197
</p></div></div><div class="sect2" title="Rapid Configuration Validation"><div class="titlepage"><div><div><h3 class="title"><a name="id389939"></a>Rapid Configuration Validation</h3></div></div></div><p> 
198
198
<a class="indexterm" name="id389947"></a>
199
199
<a class="indexterm" name="id389954"></a>
200
200
<a class="indexterm" name="id389960"></a>
295
295
</p></div></div><div class="sect1" title="Extended Printing Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id390291"></a>Extended Printing Configuration</h2></div></div></div><p>
296
296
<a class="indexterm" name="id390299"></a>
297
297
<a class="indexterm" name="id390306"></a>
298
 
<a class="indexterm" name="id390312"></a>
 
298
<a class="indexterm" name="id390313"></a>
299
299
<a class="indexterm" name="id390319"></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
304
304
separate chapter. The example explicitly names many parameters that do not need to be specified because they
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="id390388"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id390399"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390410"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390422"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id390434"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id390445"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id390457"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id390468"></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="id390489"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id390500"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390512"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id390523"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id390534"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390546"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390557"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390569"></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="id390589"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id390601"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id390613"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id390624"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390636"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390647"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id390658"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id390670"></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="id390682"></a><em class="parameter"><code>guest ok = no</code></em></td></tr></table></div></div><br class="example-break"><p>
 
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="id390388"></a><em class="parameter"><code>printing = bsd</code></em></td></tr><tr><td><a class="indexterm" name="id390399"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390411"></a><em class="parameter"><code>show add printer wizard = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390422"></a><em class="parameter"><code>printcap name = /etc/printcap</code></em></td></tr><tr><td><a class="indexterm" name="id390434"></a><em class="parameter"><code>printer admin = @ntadmin, root</code></em></td></tr><tr><td><a class="indexterm" name="id390445"></a><em class="parameter"><code>max print jobs = 100</code></em></td></tr><tr><td><a class="indexterm" name="id390457"></a><em class="parameter"><code>lpq cache time = 20</code></em></td></tr><tr><td><a class="indexterm" name="id390468"></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="id390489"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id390500"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390512"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id390523"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id390535"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390546"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390558"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390569"></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="id390589"></a><em class="parameter"><code>comment = Printer with Restricted Access</code></em></td></tr><tr><td><a class="indexterm" name="id390601"></a><em class="parameter"><code>path = /var/spool/samba_my_printer</code></em></td></tr><tr><td><a class="indexterm" name="id390613"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id390624"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390636"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id390647"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id390659"></a><em class="parameter"><code>hosts allow = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id390670"></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="id390682"></a><em class="parameter"><code>guest ok = no</code></em></td></tr></table></div></div><br class="example-break"><p>
308
308
<a class="indexterm" name="id390695"></a>
309
309
<a class="indexterm" name="id390701"></a>
310
310
<a class="indexterm" name="id390706"></a>
314
314
<code class="literal">testparm</code> gives warnings for misconfigured settings.
315
315
</p><div class="sect2" title="Detailed Explanation Settings"><div class="titlepage"><div><div><h3 class="title"><a name="id390731"></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
 
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="id390754"></a>The [global] Section</h4></div></div></div><p>
 
317
Configuration</a>.
 
318
</p><div class="sect3" title="The [global] Section"><div class="titlepage"><div><div><h4 class="title"><a name="id390748"></a>The [global] Section</h4></div></div></div><p>
 
319
<a class="indexterm" name="id390755"></a>
319
320
<a class="indexterm" name="id390762"></a>
320
321
<a class="indexterm" name="id390769"></a>
321
 
<a class="indexterm" name="id390775"></a>
322
 
<a class="indexterm" name="id390782"></a>
 
322
<a class="indexterm" name="id390776"></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
325
325
for parameters that have only a global meaning. It may also contain service-level parameters that define
327
327
setting the same value repeatedly. (Within each individual section or share, you may, however, override these
328
328
globally set share settings and specify other values).
329
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="id390843"></a>
331
 
<a class="indexterm" name="id390850"></a>
332
 
<a class="indexterm" name="id390857"></a>
333
 
<a class="indexterm" name="id390864"></a>
334
 
<a class="indexterm" name="id390870"></a>
335
 
<a class="indexterm" name="id390877"></a>
336
 
<a class="indexterm" name="id390884"></a>
337
 
<a class="indexterm" name="id390891"></a>
338
 
<a class="indexterm" name="id390898"></a>
339
 
<a class="indexterm" name="id390904"></a>
340
 
<a class="indexterm" name="id390911"></a>
341
 
<a class="indexterm" name="id390918"></a>
 
330
<a class="indexterm" name="id390841"></a>
 
331
<a class="indexterm" name="id390847"></a>
 
332
<a class="indexterm" name="id390854"></a>
 
333
<a class="indexterm" name="id390861"></a>
 
334
<a class="indexterm" name="id390868"></a>
 
335
<a class="indexterm" name="id390874"></a>
 
336
<a class="indexterm" name="id390881"></a>
 
337
<a class="indexterm" name="id390888"></a>
 
338
<a class="indexterm" name="id390895"></a>
 
339
<a class="indexterm" name="id390901"></a>
 
340
<a class="indexterm" name="id390908"></a>
 
341
<a class="indexterm" name="id390915"></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
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="id390950"></a>
348
 
<a class="indexterm" name="id390957"></a>
 
347
<a class="indexterm" name="id390947"></a>
 
348
<a class="indexterm" name="id390954"></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="id391000"></a>
354
 
<a class="indexterm" name="id391006"></a>
355
 
<a class="indexterm" name="id391013"></a>
356
 
<a class="indexterm" name="id391020"></a>
 
353
<a class="indexterm" name="id390997"></a>
 
354
<a class="indexterm" name="id391004"></a>
 
355
<a class="indexterm" name="id391010"></a>
 
356
<a class="indexterm" name="id391017"></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
359
359
                parameter, you do not need to specify separate shares for each printer. Each automatically created printer
361
361
                <em class="parameter"><code>load printers = no</code></em> setting will allow you to specify each UNIX printer you want to
362
362
                share separately, leaving out some you do not want to be publicly visible and available).
363
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="id391063"></a>
365
 
<a class="indexterm" name="id391069"></a>
366
 
<a class="indexterm" name="id391076"></a>
367
 
<a class="indexterm" name="id391083"></a>
368
 
<a class="indexterm" name="id391090"></a>
 
364
<a class="indexterm" name="id391060"></a>
 
365
<a class="indexterm" name="id391066"></a>
 
366
<a class="indexterm" name="id391073"></a>
 
367
<a class="indexterm" name="id391080"></a>
 
368
<a class="indexterm" name="id391087"></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
371
371
                host's share listing (as shown in <span class="guiicon">Network Neighborhood</span> or by the <code class="literal">net
374
374
                the <em class="parameter"><code>[print$]</code></em> share and associate it with a printer (if the respective queue exists
375
375
                before the action), or exchange a printer's driver for any other previously uploaded driver.
376
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="id391165"></a>
 
377
<a class="indexterm" name="id391162"></a>
378
378
                Sets the upper limit to 100 print jobs being active on the Samba server at any one time. Should a client
379
379
                submit a job that exceeds this number, a "no more space available on server" type of error message will be
380
380
                returned by Samba to the client. A setting of zero (the default) means there is <span class="emphasis"><em>no</em></span> limit
381
381
                at all.
382
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="id391197"></a>
384
 
<a class="indexterm" name="id391204"></a>
385
 
<a class="indexterm" name="id391210"></a>
 
383
<a class="indexterm" name="id391194"></a>
 
384
<a class="indexterm" name="id391201"></a>
 
385
<a class="indexterm" name="id391208"></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="id391246"></a>
391
 
<a class="indexterm" name="id391252"></a>
392
 
<a class="indexterm" name="id391259"></a>
393
 
<a class="indexterm" name="id391266"></a>
 
390
<a class="indexterm" name="id391243"></a>
 
391
<a class="indexterm" name="id391249"></a>
 
392
<a class="indexterm" name="id391256"></a>
 
393
<a class="indexterm" name="id391263"></a>
394
394
                Members of the ntadmin group should be able to add drivers and set printer properties
395
395
                (<code class="constant">ntadmin</code> is only an example name; it needs to be a valid UNIX group name); root is
396
396
                implicitly always a <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a>. The <code class="literal">@</code> sign precedes group names
399
399
                Samba-2.2</a>).  In larger installations, the <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a> parameter is normally a
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="id391338"></a>
403
 
<a class="indexterm" name="id391345"></a>
 
402
<a class="indexterm" name="id391336"></a>
 
403
<a class="indexterm" name="id391342"></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="id391372"></a>
 
407
<a class="indexterm" name="id391369"></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
410
410
                <span class="emphasis"><em>not</em></span> be enabled on print shares (with a <code class="constant">yes</code> or
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
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="id391422"></a>
415
 
<a class="indexterm" name="id391429"></a>
 
414
<a class="indexterm" name="id391419"></a>
 
415
<a class="indexterm" name="id391426"></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
418
418
then creates a printer share for every printer name it finds in the printcap file. You could regard this
468
468
                connection), but only via print spooling operations. Normal write operations are not permitted.
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="id391782"></a>Any [my_printer_name] Section</h4></div></div></div><p>
472
 
<a class="indexterm" name="id391790"></a>
473
 
<a class="indexterm" name="id391796"></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="id391779"></a>Any [my_printer_name] Section</h4></div></div></div><p>
 
472
<a class="indexterm" name="id391787"></a>
 
473
<a class="indexterm" name="id391794"></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.
476
476
Windows 9x/Me clients may have problems with connecting or loading printer drivers if the share name has more
502
502
                you can see, you could name IP addresses as well as NetBIOS hostnames here.
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="id392055"></a>Print Commands</h4></div></div></div><p>
506
 
<a class="indexterm" name="id392062"></a>
507
 
<a class="indexterm" name="id392069"></a>
508
 
<a class="indexterm" name="id392076"></a>
509
 
<a class="indexterm" name="id392082"></a>
 
505
                </p></dd></dl></div></div><div class="sect3" title="Print Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id392052"></a>Print Commands</h4></div></div></div><p>
 
506
<a class="indexterm" name="id392059"></a>
 
507
<a class="indexterm" name="id392066"></a>
 
508
<a class="indexterm" name="id392073"></a>
 
509
<a class="indexterm" name="id392080"></a>
510
510
In each section defining a printer (or in the <em class="parameter"><code>[printers]</code></em> section),
511
511
a <em class="parameter"><code>print command</code></em> parameter may be defined. It sets a command to process the files
512
512
that have been placed into the Samba print spool directory for that printer. (That spool directory was,
518
518
to debug printing. If you craft your own print commands (or even develop print command shell scripts),
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="id392122"></a>Default UNIX System Printing Commands</h4></div></div></div><p>
522
 
<a class="indexterm" name="id392130"></a>
 
521
</p></div><div class="sect3" title="Default UNIX System Printing Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id392119"></a>Default UNIX System Printing Commands</h4></div></div></div><p>
 
522
<a class="indexterm" name="id392127"></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
525
525
setting. In the commands listed in <a class="link" href="classicalprinting.html#printOptions" title="Table�21.1.�Default Printing Settings">Default Printing Settings</a> , you will
528
528
explained in more detail in <a class="link" href="classicalprinting.html#printOptions" title="Table�21.1.�Default Printing Settings">Default Printing Settings</a> presents an overview
529
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="id392570"></a>
532
 
<a class="indexterm" name="id392577"></a>
533
 
<a class="indexterm" name="id392583"></a>
534
 
<a class="indexterm" name="id392590"></a>
 
531
<a class="indexterm" name="id392567"></a>
 
532
<a class="indexterm" name="id392574"></a>
 
533
<a class="indexterm" name="id392581"></a>
 
534
<a class="indexterm" name="id392587"></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
537
537
<code class="filename">cupsd.conf</code> is set to write its autogenerated printcap file to an unusual place).
538
538
Otherwise, Samba maps to the System V printing commands with the -oraw option for printing; that is, it uses
539
539
<code class="literal">lp -c -d%p -oraw; rm %s</code>. With <em class="parameter"><code>printing = cups</code></em>, and if Samba is
540
540
compiled against libcups, any manually set print command will be ignored!
541
 
</p></div><div class="sect3" title="Custom Print Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id392638"></a>Custom Print Commands</h4></div></div></div><p>
542
 
<a class="indexterm" name="id392646"></a>
543
 
<a class="indexterm" name="id392653"></a>
 
541
</p></div><div class="sect3" title="Custom Print Commands"><div class="titlepage"><div><div><h4 class="title"><a name="id392635"></a>Custom Print Commands</h4></div></div></div><p>
 
542
<a class="indexterm" name="id392643"></a>
 
543
<a class="indexterm" name="id392650"></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
546
546
file to the host's printing subsystem. But there is no requirement at all that this must be the case. The
547
547
print subsystem may not remove the spool file on its own, so whatever command you specify, you should ensure
548
548
that the spool file is deleted after it has been processed.
549
549
</p><p>
550
 
<a class="indexterm" name="id392677"></a>
551
 
<a class="indexterm" name="id392684"></a>
552
 
<a class="indexterm" name="id392691"></a>
553
 
<a class="indexterm" name="id392698"></a>
 
550
<a class="indexterm" name="id392675"></a>
 
551
<a class="indexterm" name="id392681"></a>
 
552
<a class="indexterm" name="id392688"></a>
 
553
<a class="indexterm" name="id392695"></a>
554
554
There is no difficulty with using your own customized print commands with the traditional printing systems.
555
555
However, if you do not wish to roll your own, you should be well informed about the default built-in commands
556
556
that Samba uses for each printing subsystem (see <a class="link" href="classicalprinting.html#printOptions" title="Table�21.1.�Default Printing Settings">Default Printing
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
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="id392790"></a>
 
563
<a class="indexterm" name="id392787"></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,
566
566
the <em class="parameter"><code>%p</code></em> will be silently removed from the print command. In this case, the job is
567
567
sent to the default printer.
568
568
</p><p>
569
 
<a class="indexterm" name="id392823"></a>
570
 
<a class="indexterm" name="id392830"></a>
 
569
<a class="indexterm" name="id392820"></a>
 
570
<a class="indexterm" name="id392827"></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
573
573
specified print command for a printable service nor a global print command, spool files will be created
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="id392849"></a>
577
 
<a class="indexterm" name="id392856"></a>
 
576
<a class="indexterm" name="id392846"></a>
 
577
<a class="indexterm" name="id392853"></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="id392883"></a>
583
 
<a class="indexterm" name="id392890"></a>
584
 
<a class="indexterm" name="id392897"></a>
 
582
<a class="indexterm" name="id392880"></a>
 
583
<a class="indexterm" name="id392887"></a>
 
584
<a class="indexterm" name="id392894"></a>
585
585
You can form quite complex print commands. You need to realize that print commands are just
586
586
passed to a UNIX shell. The shell is able to expand the included environment variables as
587
587
usual. (The syntax to include a UNIX environment variable <em class="parameter"><code>$variable</code></em>
588
588
in the Samba print command is <em class="parameter"><code>%$variable</code></em>.) To give you a working
589
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">&#8220;<span class="quote">;</span>&#8221;</span>
 
590
to <code class="filename">/tmp/print.log</code>, print the file, then remove it. The semicolon (<span class="quote">&#8220;<span class="quote">;</span>&#8221;</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="id392947"></a><em class="parameter"><code>print command = echo Printing %s &gt;&gt; /tmp/print.log; lpr -P %p %s; rm %s</code></em></td></tr></table><p>
 
592
</p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id392944"></a><em class="parameter"><code>print command = echo Printing %s &gt;&gt; /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="id392993"></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="id393020"></a>
599
 
<a class="indexterm" name="id393026"></a>
600
 
<a class="indexterm" name="id393033"></a>
 
597
</p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id392990"></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="id393017"></a>
 
599
<a class="indexterm" name="id393023"></a>
 
600
<a class="indexterm" name="id393030"></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.
603
603
Beginning with the 2.2.0 release, Samba started to support the native Windows NT printing mechanisms. These
606
606
</p><p>
607
607
The additional functionality provided by the new SPOOLSS support includes:
608
608
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
609
 
<a class="indexterm" name="id393063"></a>
 
609
<a class="indexterm" name="id393061"></a>
610
610
        Support for downloading printer driver files to Windows 95/98/NT/2000 clients upon
611
611
        demand (<span class="emphasis"><em>Point'n'Print</em></span>).
612
612
        </p></li><li class="listitem"><p>
613
 
<a class="indexterm" name="id393079"></a>
 
613
<a class="indexterm" name="id393076"></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
616
        </p></li><li class="listitem"><p>       
617
 
<a class="indexterm" name="id393101"></a>
618
 
<a class="indexterm" name="id393108"></a>
619
 
<a class="indexterm" name="id393115"></a>
620
 
<a class="indexterm" name="id393121"></a>
621
 
<a class="indexterm" name="id393128"></a>
 
617
<a class="indexterm" name="id393098"></a>
 
618
<a class="indexterm" name="id393105"></a>
 
619
<a class="indexterm" name="id393112"></a>
 
620
<a class="indexterm" name="id393119"></a>
 
621
<a class="indexterm" name="id393126"></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
625
        </p></li><li class="listitem"><p>
626
 
<a class="indexterm" name="id393147"></a>
627
 
<a class="indexterm" name="id393153"></a>
 
626
<a class="indexterm" name="id393144"></a>
 
627
<a class="indexterm" name="id393151"></a>
628
628
        Support for NT Access Control Lists (ACL) on printer objects.
629
629
        </p></li><li class="listitem"><p>
630
 
<a class="indexterm" name="id393165"></a>
 
630
<a class="indexterm" name="id393162"></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="id393183"></a>
635
 
<a class="indexterm" name="id393190"></a>
 
634
<a class="indexterm" name="id393181"></a>
 
635
<a class="indexterm" name="id393187"></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="id393201"></a>
 
638
<a class="indexterm" name="id393198"></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
641
641
any Windows NT machine (server or client) may be used by a user as a workstation. Samba will publish all
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="id393214"></a>
645
 
<a class="indexterm" name="id393221"></a>
646
 
<a class="indexterm" name="id393228"></a>
647
 
<a class="indexterm" name="id393235"></a>
648
 
<a class="indexterm" name="id393241"></a>
 
644
<a class="indexterm" name="id393212"></a>
 
645
<a class="indexterm" name="id393218"></a>
 
646
<a class="indexterm" name="id393225"></a>
 
647
<a class="indexterm" name="id393232"></a>
 
648
<a class="indexterm" name="id393239"></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
651
651
the client has the necessary privileges on the remote host that serves the printer resource. The
652
652
default permissions assigned by Windows NT to a printer gives the print permissions to the well-known
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="id393257"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p>
656
 
<a class="indexterm" name="id393265"></a>
 
655
</p><div class="sect2" title="Point'n'Print Client Drivers on Samba Servers"><div class="titlepage"><div><div><h3 class="title"><a name="id393254"></a>Point'n'Print Client Drivers on Samba Servers</h3></div></div></div><p>
 
656
<a class="indexterm" name="id393262"></a>
657
657
There is much confusion about what all this means. The question is often asked, <span class="quote">&#8220;<span class="quote">Is it or is
658
658
it not necessary for printer drivers to be installed on a Samba host in order to support printing from
659
659
Windows clients?</span>&#8221;</span> The answer to this is no, it is not necessary.
660
660
</p><p>
661
 
<a class="indexterm" name="id393281"></a>
662
 
<a class="indexterm" name="id393288"></a>
 
661
<a class="indexterm" name="id393278"></a>
 
662
<a class="indexterm" name="id393285"></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
665
665
clients. (However, a bug existed in Samba 2.2.0 that made Windows NT/2000 clients
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="id393304"></a>
669
 
<a class="indexterm" name="id393311"></a>
 
668
<a class="indexterm" name="id393302"></a>
 
669
<a class="indexterm" name="id393309"></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
672
672
(including 95/98/ME) get the driver installed when they first connect to this printer share. The
682
682
        </p></li><li class="listitem"><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="id393388"></a>
686
 
<a class="indexterm" name="id393395"></a>
 
685
<a class="indexterm" name="id393385"></a>
 
686
<a class="indexterm" name="id393392"></a>
687
687
Samba does not use these uploaded drivers in any way to process spooled files. These drivers are utilized
688
688
entirely by the clients who download and install them via the <span class="quote">&#8220;<span class="quote">Point'n'Print</span>&#8221;</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="id393411"></a>The Obsoleted [printer$] Section</h3></div></div></div><p>
693
 
<a class="indexterm" name="id393419"></a>
694
 
<a class="indexterm" name="id393426"></a>
 
692
</p></div><div class="sect2" title="The Obsoleted [printer$] Section"><div class="titlepage"><div><div><h3 class="title"><a name="id393408"></a>The Obsoleted [printer$] Section</h3></div></div></div><p>
 
693
<a class="indexterm" name="id393416"></a>
 
694
<a class="indexterm" name="id393423"></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.
697
697
        Windows 9x/Me printer servers always have a <em class="parameter"><code>[printer$]</code></em> service that provides
701
701
        parameter named <em class="parameter"><code>printer driver</code></em> provided a means of defining the printer driver name to
702
702
        be sent to the client.
703
703
        </p><p>
704
 
<a class="indexterm" name="id393465"></a>
705
 
<a class="indexterm" name="id393471"></a>
706
 
<a class="indexterm" name="id393478"></a>
 
704
<a class="indexterm" name="id393462"></a>
 
705
<a class="indexterm" name="id393469"></a>
 
706
<a class="indexterm" name="id393476"></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
709
709
        <em class="parameter"><code>[print$]</code></em> is now used for the location of downloadable printer
713
713
        of its ACLs) to support printer driver downloads and uploads. This does not mean Windows
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="id393521"></a>Creating the [print$] Share</h3></div></div></div><p>
717
 
<a class="indexterm" name="id393529"></a>
 
716
        </p></div><div class="sect2" title="Creating the [print$] Share"><div class="titlepage"><div><div><h3 class="title"><a name="id393519"></a>Creating the [print$] Share</h3></div></div></div><p>
 
717
<a class="indexterm" name="id393526"></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
720
720
in the MS Windows clients. It cannot be renamed, since Windows clients are programmed to search for a
724
724
<em class="parameter"><code>[print$]</code></em> file share (of course, some of the parameter values, such
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="id393606"></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="id393642"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id393654"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id393665"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393677"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393688"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393700"></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 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="id393603"></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="id393639"></a><em class="parameter"><code>comment = Printer Driver Download Area</code></em></td></tr><tr><td><a class="indexterm" name="id393651"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id393663"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393674"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393686"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393697"></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="id393729"></a>[print$] Stanza Parameters</h3></div></div></div><p>
731
 
<a class="indexterm" name="id393737"></a>
732
 
<a class="indexterm" name="id393743"></a>
733
 
<a class="indexterm" name="id393750"></a>
734
 
<a class="indexterm" name="id393757"></a>
735
 
<a class="indexterm" name="id393764"></a>
 
730
</p></div><div class="sect2" title="[print$] Stanza Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="id393726"></a>[print$] Stanza Parameters</h3></div></div></div><p>
 
731
<a class="indexterm" name="id393734"></a>
 
732
<a class="indexterm" name="id393741"></a>
 
733
<a class="indexterm" name="id393748"></a>
 
734
<a class="indexterm" name="id393754"></a>
 
735
<a class="indexterm" name="id393761"></a>
736
736
The <em class="parameter"><code>[print$]</code></em> is a special section in <code class="filename">smb.conf</code>. It contains settings relevant to
737
737
potential printer driver download and is used by Windows clients for local print driver installation.
738
738
The following parameters are frequently needed in this share section:
749
749
<code class="prompt">C:\&gt; </code> <code class="literal">net use g:\\sambaserver\print$</code>
750
750
</pre><p>
751
751
                 you can still mount it from any client. This can also be done from the
752
 
                <span class="guimenu">Connect network drive menu&gt;</span> from Windows Explorer.
 
752
                <span class="guimenu">Connect network drive</span> menu from Windows Explorer.
753
753
                </p></dd><dt><span class="term"><a class="link" href="smb.conf.5.html#GUESTOK" target="_top">guest ok = yes </a></span></dt><dd><p>
754
754
                Gives read-only access to this share for all guest users. Access may be granted to
755
755
                download and install printer drivers on clients. The requirement for <em class="parameter"><code>guest ok
777
777
                can copy files to the share. If this is a non-root account, then the account should also
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="id394022"></a>The [print$] Share Directory</h3></div></div></div><p>
 
780
                </p></dd></dl></div></div><div class="sect2" title="The [print$] Share Directory"><div class="titlepage"><div><div><h3 class="title"><a name="id394019"></a>The [print$] Share Directory</h3></div></div></div><p>
781
781
In order for a Windows NT print server to support the downloading of driver files by multiple client
782
782
architectures, you must create several subdirectories within the <em class="parameter"><code>[print$]</code></em>
783
783
service (i.e., the UNIX directory named by the <a class="link" href="smb.conf.5.html#PATH" target="_top">path</a>
812
812
Neighborhood</span> or <span class="guiicon">My Network Places</span> and browse for the Samba host. Once you
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="id394150"></a>Installing Drivers into [print$]</h2></div></div></div><p>
 
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="id394148"></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
818
818
driver files need to be installed into this share. So far, it is still an empty share. Unfortunately, it is
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="id394235"></a>Add Printer Wizard Driver Installation</h3></div></div></div><p>
 
831
</p><div class="sect2" title="Add Printer Wizard Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id394232"></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
834
834
to a null string. This must be changed now. The local <span class="guiicon">Add Printer Wizard</span> (APW), run from
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="id394487"></a>Identifying Driver Files</h4></div></div></div><p>
883
 
<a class="indexterm" name="id394494"></a>
884
 
<a class="indexterm" name="id394501"></a>
885
 
<a class="indexterm" name="id394508"></a>
 
882
</p><div class="sect3" title="Identifying Driver Files"><div class="titlepage"><div><div><h4 class="title"><a name="id394484"></a>Identifying Driver Files</h4></div></div></div><p>
 
883
<a class="indexterm" name="id394492"></a>
 
884
<a class="indexterm" name="id394498"></a>
 
885
<a class="indexterm" name="id394505"></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
888
888
may not be possible, since the <code class="filename">*.inf</code> file might be missing. Unfortunately, vendors have now started
890
890
archive format. Additionally, the files may be re-named during the installation process. This makes it
891
891
extremely difficult to identify the driver files required.
892
892
</p><p>
893
 
<a class="indexterm" name="id394537"></a>
 
893
<a class="indexterm" name="id394532"></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
896
896
this procedure for every client platform you want to support. We show it here for the
897
897
<span class="application">W32X86</span> platform only, a name used by Microsoft for all Windows NT/200x/XP
898
898
clients.)
899
899
</p><p>
900
 
<a class="indexterm" name="id394556"></a>
 
900
<a class="indexterm" name="id394550"></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
903
903
driver files named on the printout. You'll need to recognize what Windows (and Samba) are calling the
905
905
<span class="guilabel">Help File</span>, and (optionally) <span class="guilabel">Dependent Driver Files</span>
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="id394610"></a>
909
 
<a class="indexterm" name="id394616"></a>
910
 
<a class="indexterm" name="id394623"></a>
 
908
<a class="indexterm" name="id394604"></a>
 
909
<a class="indexterm" name="id394611"></a>
 
910
<a class="indexterm" name="id394618"></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
913
913
<code class="literal">getdriver</code> subcommand, each at the <code class="filename">3</code> info level. In the following example,
948
948
  Monitorname: []
949
949
  Defaultdatatype: []
950
950
</pre><p>
951
 
<a class="indexterm" name="id394731"></a>
952
 
<a class="indexterm" name="id394738"></a>
953
 
<a class="indexterm" name="id394745"></a>
954
 
<a class="indexterm" name="id394752"></a>
 
951
<a class="indexterm" name="id394726"></a>
 
952
<a class="indexterm" name="id394732"></a>
 
953
<a class="indexterm" name="id394739"></a>
 
954
<a class="indexterm" name="id394746"></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
957
957
<span class="guilabel">Driver File</span> is tagged here
961
961
addition to those for <span class="application">W32X86</span> (i.e., the Windows NT 2000/XP clients) onto a
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="id394796"></a>
965
 
<a class="indexterm" name="id394802"></a>
966
 
<a class="indexterm" name="id394809"></a>
 
964
<a class="indexterm" name="id394790"></a>
 
965
<a class="indexterm" name="id394797"></a>
967
966
Since the <em class="parameter"><code>[print$]</code></em> share is usually accessible through the <span class="guiicon">Network
968
967
Neighborhood</span>, you can also use the UNC notation from Windows Explorer to poke at it. The Windows
969
968
9x/Me driver files will end up in subdirectory <code class="filename">0</code> of the <code class="filename">WIN40</code>
974
973
mode. Windows 2000 changed this. While it still can use the kernel mode drivers (if this is enabled by
975
974
the Admin), its native mode for printer drivers is user mode execution. This requires drivers designed
976
975
for this purpose. These types of drivers install into the <span class="quote">&#8220;<span class="quote">3</span>&#8221;</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="id394866"></a>Obtaining Driver Files from Windows Client [print$] Shares</h4></div></div></div><p>
 
976
</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="id394855"></a>Obtaining Driver Files from Windows Client [print$] Shares</h4></div></div></div><p>
978
977
Now we need to collect all the driver files we identified in our previous step. Where do we get them
979
978
from? Well, why not retrieve them from the very PC and the same <em class="parameter"><code>[print$]</code></em>
980
979
share that we investigated in our last step to identify the files? We can use <code class="literal">smbclient</code>
999
998
This ensures that all commands are executed in sequence on the remote Windows server before
1000
999
<code class="literal">smbclient</code> exits again.
1001
1000
</p><p>
1002
 
<a class="indexterm" name="id394964"></a>
 
1001
<a class="indexterm" name="id394953"></a>
1003
1002
Remember to repeat the procedure for the <span class="application">WIN40</span> architecture should you need to
1004
1003
support Windows 9x/Me/XP clients. Remember too, the files for these architectures are in the
1005
1004
<code class="filename">WIN40/0/</code> subdirectory. Once this is complete, we can run <code class="literal">smbclient. .
1006
1005
.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="id394999"></a>Installing Driver Files into [print$]</h4></div></div></div><p>
 
1006
</p></div><div class="sect3" title="Installing Driver Files into [print$]"><div class="titlepage"><div><div><h4 class="title"><a name="id394988"></a>Installing Driver Files into [print$]</h4></div></div></div><p>
1008
1007
We are now going to locate the driver files into the <em class="parameter"><code>[print$]</code></em> share. Remember, the
1009
1008
UNIX path to this share has been defined previously in your <code class="filename">smb.conf</code> file. You also have created
1010
1009
subdirectories for the different Windows client types you want to support. If, for example, your
1017
1016
        For all Windows 95, 98, and Me clients, <code class="filename">/etc/samba/drivers/WIN40/</code> but not
1018
1017
        (yet) into the <code class="filename">0</code> subdirectory.
1019
1018
        </p></li></ul></div><p>
1020
 
<a class="indexterm" name="id395073"></a>
1021
 
<a class="indexterm" name="id395080"></a>
 
1019
<a class="indexterm" name="id395062"></a>
 
1020
<a class="indexterm" name="id395069"></a>
1022
1021
We again use smbclient to transfer the driver files across the network. We specify the same files
1023
1022
and paths as were leaked to us by running <code class="literal">getdriver</code> against the original
1024
1023
<span class="emphasis"><em>Windows</em></span> install. However, now we are going to store the files into a
1055
1054
putting file HDNIS01Aux.dll as \W32X86\HDNIS01Aux.dll
1056
1055
putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF
1057
1056
</pre><p>
1058
 
<a class="indexterm" name="id395146"></a>
1059
 
<a class="indexterm" name="id395153"></a>
1060
 
<a class="indexterm" name="id395160"></a>
 
1057
<a class="indexterm" name="id395126"></a>
 
1058
<a class="indexterm" name="id395133"></a>
 
1059
<a class="indexterm" name="id395140"></a>
1061
1060
Whew  that was a lot of typing! Most drivers are a lot smaller  many have only three generic
1062
1061
PostScript driver files plus one PPD. While we did retrieve the files from the <code class="filename">2</code>
1063
1062
subdirectory of the <code class="filename">W32X86</code> directory from the Windows box, we do not put them
1064
1063
(for now) in this same subdirectory of the Samba box. This relocation will automatically be done by the
1065
1064
<code class="literal">adddriver</code> command, which we will run shortly (and do not forget to also put the files
1066
1065
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="id395202"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p>
1068
 
<a class="indexterm" name="id395214"></a>
1069
 
<a class="indexterm" name="id395221"></a>
 
1066
</p></div><div class="sect3" title="smbclient to Confirm Driver Installation"><div class="titlepage"><div><div><h4 class="title"><a name="id395182"></a><code class="literal">smbclient</code> to Confirm Driver Installation</h4></div></div></div><p>
 
1067
<a class="indexterm" name="id395194"></a>
 
1068
<a class="indexterm" name="id395201"></a>
1070
1069
For now we verify that our files are there. This can be done with <code class="literal">smbclient</code>, too
1071
1070
(but, of course, you can log in via SSH also and do this through a standard UNIX shell access):
1072
1071
</p><pre class="screen">
1107
1106
PDFcreator2.PPD                     A    15746  Sun Apr 20 22:24:07 2003
1108
1107
              40976 blocks of size 262144. 709 blocks available
1109
1108
</pre><p>
1110
 
<a class="indexterm" name="id395275"></a>
1111
 
<a class="indexterm" name="id395282"></a>
1112
 
<a class="indexterm" name="id395288"></a>
 
1109
<a class="indexterm" name="id395255"></a>
 
1110
<a class="indexterm" name="id395261"></a>
 
1111
<a class="indexterm" name="id395268"></a>
1113
1112
Notice that there are already driver files present in the <code class="filename">2</code> subdirectory (probably from a
1114
1113
previous installation). Once the files for the new driver are there too, you are still a few steps away from
1115
1114
being able to use them on the clients. The only thing you could do now is retrieve them from a client just
1117
1116
install them per Point'n'Print. The reason is that Samba does not yet know that these files are something
1118
1117
special, namely <span class="emphasis"><em>printer driver files</em></span>, and it does not know to which print queue(s) these
1119
1118
driver files belong.
1120
 
</p></div><div class="sect3" title="Running rpcclient with adddriver"><div class="titlepage"><div><div><h4 class="title"><a name="id395312"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p>
1121
 
<a class="indexterm" name="id395330"></a>
1122
 
<a class="indexterm" name="id395337"></a>
1123
 
<a class="indexterm" name="id395344"></a>
 
1119
</p></div><div class="sect3" title="Running rpcclient with adddriver"><div class="titlepage"><div><div><h4 class="title"><a name="id395292"></a>Running <code class="literal">rpcclient</code> with <code class="literal">adddriver</code></h4></div></div></div><p>
 
1120
<a class="indexterm" name="id395310"></a>
 
1121
<a class="indexterm" name="id395317"></a>
 
1122
<a class="indexterm" name="id395324"></a>
1124
1123
Next, you must tell Samba about the special category of the files you just uploaded into the
1125
1124
<em class="parameter"><code>[print$]</code></em> share. This is done by the <code class="literal">adddriver</code>
1126
1125
command. It will prompt Samba to register the driver files into its internal TDB database files. The
1144
1143
 
1145
1144
Printer Driver dm9110 successfully installed.
1146
1145
</pre><p>
1147
 
<a class="indexterm" name="id395390"></a>
1148
 
<a class="indexterm" name="id395396"></a>
1149
 
<a class="indexterm" name="id395403"></a>
 
1146
<a class="indexterm" name="id395369"></a>
 
1147
<a class="indexterm" name="id395376"></a>
 
1148
<a class="indexterm" name="id395383"></a>
1150
1149
After this step, the driver should be recognized by Samba on the print server. You need to be very
1151
1150
careful when typing the command. Don't exchange the order of the fields. Some changes would lead to
1152
1151
an <code class="computeroutput">NT_STATUS_UNSUCCESSFUL</code> error message. These become obvious. Other
1153
1152
changes might install the driver files successfully but render the driver unworkable. So take care!
1154
1153
Hints about the syntax of the adddriver command are in the man page. 
1155
1154
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="id395422"></a>Checking <code class="literal">adddriver</code> Completion</h4></div></div></div><p>
 
1155
</p></div><div class="sect3" title="Checking adddriver Completion"><div class="titlepage"><div><div><h4 class="title"><a name="id395402"></a>Checking <code class="literal">adddriver</code> Completion</h4></div></div></div><p>
1157
1156
One indication for Samba's recognition of the files as driver files is the <code class="computeroutput">successfully
1158
1157
installed</code> message. Another one is the fact that our files have been moved by the
1159
1158
<code class="literal">adddriver</code> command into the <code class="filename">2</code> subdirectory. You can check this
1198
1197
</pre><p>
1199
1198
Another verification is that the timestamp of the printing TDB files is now updated
1200
1199
(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="id395502"></a>Check Samba for Driver Recognition</h4></div></div></div><p>
1202
 
<a class="indexterm" name="id395510"></a>
 
1200
</p></div><div class="sect3" title="Check Samba for Driver Recognition"><div class="titlepage"><div><div><h4 class="title"><a name="id395482"></a>Check Samba for Driver Recognition</h4></div></div></div><p>
 
1201
<a class="indexterm" name="id395490"></a>
1203
1202
Now the driver should be registered with Samba. We can easily verify this and will do so in a
1204
1203
moment. However, this driver is not yet associated with a particular printer. We may check the driver
1205
1204
status of the files by at least three methods:
1206
1205
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
1207
 
<a class="indexterm" name="id395525"></a>
 
1206
<a class="indexterm" name="id395505"></a>
 
1207
<a class="indexterm" name="id395512"></a>
 
1208
<a class="indexterm" name="id395519"></a>
 
1209
<a class="indexterm" name="id395526"></a>
1208
1210
<a class="indexterm" name="id395532"></a>
1209
 
<a class="indexterm" name="id395539"></a>
1210
 
<a class="indexterm" name="id395546"></a>
1211
 
<a class="indexterm" name="id395553"></a>
1212
1211
        From any Windows client browse Network Neighborhood, find the Samba host, and open the Samba
1213
1212
        <span class="guiicon">Printers and Faxes</span> folder. Select any printer icon, right-click and select
1214
1213
        the printer <span class="guimenuitem">Properties</span>. Click the <span class="guilabel">Advanced</span>
1218
1217
        see only its own architecture's list. If you do not have every driver installed for each platform,
1219
1218
        the list will differ if you look at it from Windows95/98/ME or Windows NT/2000/XP.)
1220
1219
        </p></li><li class="listitem"><p>
1221
 
<a class="indexterm" name="id395591"></a>
 
1220
<a class="indexterm" name="id395566"></a>
1222
1221
        From a Windows 200x/XP client (not Windows NT) browse <span class="guiicon">Network Neighborhood</span>,
1223
1222
        search for the Samba server, open the server's <span class="guiicon">Printers</span> folder,
1224
1223
        and right-click on the white background (with no printer highlighted). Select <span class="guimenuitem">Server
1247
1246
        for <span class="application">Windows NT 4.0 or 2000</span>. To have it present for <span class="application">Windows
1248
1247
        95, 98, and Me</span>, you'll have to repeat the whole procedure with the WIN40 architecture
1249
1248
        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="id395712"></a>Specific Driver Name Flexibility</h4></div></div></div><p>
1251
 
<a class="indexterm" name="id395720"></a>
 
1249
        </p></li></ul></div></div><div class="sect3" title="Specific Driver Name Flexibility"><div class="titlepage"><div><div><h4 class="title"><a name="id395688"></a>Specific Driver Name Flexibility</h4></div></div></div><p>
 
1250
<a class="indexterm" name="id395696"></a>
1252
1251
You can name the driver as you like. If you repeat the <code class="literal">adddriver</code> step with the same
1253
1252
files as before but with a different driver name, it will work the same:
1254
1253
</p><pre class="screen">
1271
1270
 
1272
1271
Printer Driver mydrivername successfully installed.
1273
1272
</pre><p>
1274
 
<a class="indexterm" name="id395759"></a>
1275
 
<a class="indexterm" name="id395766"></a>
1276
 
<a class="indexterm" name="id395772"></a>
 
1273
<a class="indexterm" name="id395735"></a>
 
1274
<a class="indexterm" name="id395742"></a>
 
1275
<a class="indexterm" name="id395748"></a>
1277
1276
You will be able to bind that driver to any print queue (however, you are responsible that
1278
1277
you associate drivers to queues that make sense with respect to target printers). You cannot run the
1279
1278
<code class="literal">rpcclient</code> <code class="literal">adddriver</code> command repeatedly. Each run consumes the
1280
1279
files you had put into the <em class="parameter"><code>[print$]</code></em> share by moving them into the
1281
1280
respective subdirectories, so you must execute an <code class="literal">smbclient ... put</code> command before
1282
1281
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="id395814"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p> 
1284
 
<a class="indexterm" name="id395832"></a>
1285
 
<a class="indexterm" name="id395839"></a>
 
1282
</p></div><div class="sect3" title="Running rpcclient with setdriver"><div class="titlepage"><div><div><h4 class="title"><a name="id395790"></a>Running <code class="literal">rpcclient</code> with <code class="literal">setdriver</code></h4></div></div></div><p> 
 
1283
<a class="indexterm" name="id395808"></a>
 
1284
<a class="indexterm" name="id395815"></a>
1286
1285
Samba needs to know which printer owns which driver. Create a mapping of the driver to a printer, and
1287
1286
store this information in Samba's memory, the TDB files. The <code class="literal">rpcclient setdriver</code> command
1288
1287
achieves exactly this:
1309
1308
bug in 2.2.x prevented Samba from recognizing freshly installed printers. You had to restart Samba,
1310
1309
or at least send an HUP signal to all running smbd processes to work around this: <strong class="userinput"><code>kill -HUP
1311
1310
`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="id395945"></a>Client Driver Installation Procedure</h2></div></div></div><p>
 
1311
</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="id395921"></a>Client Driver Installation Procedure</h2></div></div></div><p>
1313
1312
As Don Quixote said, <span class="quote">&#8220;<span class="quote">The proof of the pudding is in the eating.</span>&#8221;</span> The proof
1314
1313
for our setup lies in the printing. So let's install the printer driver onto the client PCs. This is
1315
1314
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="id395960"></a>First Client Driver Installation</h3></div></div></div><p>
 
1315
</p><div class="sect2" title="First Client Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id395936"></a>First Client Driver Installation</h3></div></div></div><p>
1317
1316
Especially important is the installation onto the first client PC (for each architectural platform
1318
1317
separately). Once this is done correctly, all further clients are easy to set up and shouldn't need further
1319
1318
attention. What follows is a description for the recommended first procedure. You now work from a client
1347
1346
<span class="guimenuitem">Settings</span> -&gt; <span class="guimenuitem">Control Panel</span> -&gt; <span class="guiicon">Printers
1348
1347
and Faxes</span>).
1349
1348
</p><p>
1350
 
<a class="indexterm" name="id396120"></a>
 
1349
<a class="indexterm" name="id396093"></a>
1351
1350
Most likely you are tempted to try to print a test page. After all, you now can open the printer
1352
1351
properties, and on the <span class="guimenu">General</span> tab there is a button offering to do just that. But
1353
1352
chances are that you get an error message saying "<code class="literal">Unable to print Test Page</code>." The
1359
1358
</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>
1360
1359
For a printer to be truly usable by a Windows NT/200x/XP client, it must possess:
1361
1360
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
1362
 
<a class="indexterm" name="id396176"></a>
 
1361
<a class="indexterm" name="id396148"></a>
1363
1362
        A valid <span class="emphasis"><em>device mode</em></span> generated by the driver for the printer (defining things
1364
1363
        like paper size, orientation and duplex settings).
1365
1364
        </p></li><li class="listitem"><p>
1366
 
<a class="indexterm" name="id396192"></a>
 
1365
<a class="indexterm" name="id396164"></a>
1367
1366
        A complete set of <span class="emphasis"><em>printer driver data</em></span> generated by the driver.
1368
1367
        </p></li></ul></div><p>
1369
 
<a class="indexterm" name="id396207"></a>
1370
 
<a class="indexterm" name="id396214"></a>
1371
 
<a class="indexterm" name="id396220"></a>
1372
 
<a class="indexterm" name="id396227"></a>
1373
 
<a class="indexterm" name="id396234"></a>
 
1368
<a class="indexterm" name="id396179"></a>
 
1369
<a class="indexterm" name="id396186"></a>
 
1370
<a class="indexterm" name="id396193"></a>
 
1371
<a class="indexterm" name="id396199"></a>
 
1372
<a class="indexterm" name="id396206"></a>
1374
1373
If either of these is incomplete, the clients can produce less than optimal output at best. In the
1375
1374
worst cases, unreadable garbage or nothing at all comes from the printer, or it produces a harvest of
1376
1375
error messages when attempting to print. Samba stores the named values and all printing-related information in
1396
1395
the server's printer. This executes enough of the printer driver program on the client for the desired
1397
1396
effect to happen and feeds back the new device mode to our Samba server. You can use the native Windows
1398
1397
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="id396308"></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>
 
1398
</p><div class="procedure" title="Procedure�21.1.�Procedure to Initialize the Printer Driver Settings"><a name="id396280"></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>
1400
1399
        Browse the <span class="guiicon">Network Neighborhood</span>.
1401
1400
        </p></li><li class="step" title="Step 2"><p>
1402
1401
        Find the Samba server.
1426
1425
you can follow the analogous steps by accessing the <span class="emphasis"><em>local</em></span> <span class="guiicon">Printers</span>
1427
1426
folder, too, if you are a Samba printer admin user. From now on, printing should work as expected.
1428
1427
</p><p>
1429
 
<a class="indexterm" name="id396452"></a>
 
1428
<a class="indexterm" name="id396424"></a>
1430
1429
Samba includes a service-level parameter name <em class="parameter"><code>default devmode</code></em> for generating a default
1431
1430
device mode for a printer. Some drivers function well with Samba's default set of properties. Others
1432
1431
may crash the client's spooler service. So use this parameter with caution. It is always better to have
1433
1432
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="id396470"></a>Additional Client Driver Installation</h3></div></div></div><p>
1435
 
<a class="indexterm" name="id396478"></a>
 
1433
</p></div><div class="sect2" title="Additional Client Driver Installation"><div class="titlepage"><div><div><h3 class="title"><a name="id396442"></a>Additional Client Driver Installation</h3></div></div></div><p>
 
1434
<a class="indexterm" name="id396450"></a>
1436
1435
Every additional driver may be installed in the same way as just described.  Browse <code class="literal">Network
1437
1436
Neighborhood</code>, open the <span class="guiicon">Printers</span> folder on Samba server, right-click on
1438
1437
<span class="guiicon">Printer</span>, and choose <span class="guimenuitem">Connect...</span>. Once this completes (should be
1445
1444
<strong class="userinput"><code>rundll32 shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder</code></strong>
1446
1445
</pre><p>
1447
1446
or this command on Windows NT 4.0 workstations:
1448
 
<a class="indexterm" name="id396539"></a>
 
1447
<a class="indexterm" name="id396511"></a>
1449
1448
</p><pre class="screen">
1450
1449
<strong class="userinput"><code>rundll32 shell32.dll,Control_RunDLL MAIN.CPL @2</code></strong>
1451
1450
</pre><p>
1452
1451
</p><p>
1453
1452
You can enter the commands either inside a <span class="guilabel">DOS box</span> window or in the <span class="guimenuitem">Run
1454
1453
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 &#8220;printer admin&#8221;"><div class="titlepage"><div><div><h3 class="title"><a name="id396581"></a>Always Make First Client Connection as root or <span class="quote">&#8220;<span class="quote">printer admin</span>&#8221;</span></h3></div></div></div><p>
 
1454
</p></div><div class="sect2" title="Always Make First Client Connection as root or &#8220;printer admin&#8221;"><div class="titlepage"><div><div><h3 class="title"><a name="id396553"></a>Always Make First Client Connection as root or <span class="quote">&#8220;<span class="quote">printer admin</span>&#8221;</span></h3></div></div></div><p>
1456
1455
After you installed the driver on the Samba server (in its <em class="parameter"><code>[print$]</code></em> share), you
1457
1456
should always make sure that your first client installation completes correctly. Make it a habit for yourself
1458
1457
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
1467
1466
<span class="guiicon">Letter</span> when you are all using <span class="guiicon">A4</span>, right? You may want to set the
1468
1467
printer for <span class="guiicon">duplex</span> as the default, and so on).
1469
1468
</p><p>
1470
 
<a class="indexterm" name="id396669"></a>
 
1469
<a class="indexterm" name="id396641"></a>
1471
1470
To connect as root to a Samba printer, try this command from a Windows 200x/XP DOS box command prompt:
1472
1471
</p><pre class="screen">
1473
1472
<code class="prompt">C:\&gt; </code><strong class="userinput"><code>runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /p /t3 /n 
1481
1480
Now all the other users downloading and installing the driver the same way (using
1482
1481
<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
1482
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="id396739"></a>Other Gotchas</h2></div></div></div><p>
 
1483
</p></div></div><div class="sect1" title="Other Gotchas"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id396711"></a>Other Gotchas</h2></div></div></div><p>
1485
1484
Your driver is installed. It is now ready for Point'n'Print installation by the clients. You may have tried to
1486
1485
download and use it on your first client machine, but wait. Let's make sure you are acquainted first with a
1487
1486
few tips and tricks you may find useful. For example, suppose you did not set the defaults on the printer, as
1488
1487
advised in the preceding paragraphs. Your users complain about various issues (such as, <span class="quote">&#8220;<span class="quote">We need to set
1489
1488
the paper size for each job from Letter to A4 and it will not store it</span>&#8221;</span>).
1490
 
</p><div class="sect2" title="Setting Default Print Options for Client Drivers"><div class="titlepage"><div><div><h3 class="title"><a name="id396756"></a>Setting Default Print Options for Client Drivers</h3></div></div></div><p>
 
1489
</p><div class="sect2" title="Setting Default Print Options for Client Drivers"><div class="titlepage"><div><div><h3 class="title"><a name="id396728"></a>Setting Default Print Options for Client Drivers</h3></div></div></div><p>
1491
1490
The last sentence might be viewed with mixed feelings by some users and Admins. They have struggled for hours
1492
1491
and could not arrive at a point where their settings seemed to be saved. It is not their fault. The confusing
1493
1492
thing is that in the multitabbed dialog that pops up when you right-click on the printer name and select
1536
1535
there is now a different path to arrive at an identical-looking, but functionally different, dialog to set
1537
1536
defaults for all users.
1538
1537
</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="id397022"></a>
 
1538
<a class="indexterm" name="id396994"></a>
1540
1539
</p><p><strong class="userinput"><code>
1541
1540
rundll32 printui.dll,PrintUIEntry /p /t3 /n\\<em class="replaceable"><code>SAMBA-SERVER</code></em>\<em class="replaceable"><code>printersharename</code></em>
1542
1541
</code></strong></p><p>
1547
1546
To see the tab with the <span class="guilabel">Printing Preferences</span>
1548
1547
button (the one that does not set systemwide defaults), you can
1549
1548
start the commands from inside a DOS box or from <span class="guimenu">Start</span> -&gt; <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="id397092"></a>Supporting Large Numbers of Printers</h3></div></div></div><p>
 
1549
</p></div></div><div class="sect2" title="Supporting Large Numbers of Printers"><div class="titlepage"><div><div><h3 class="title"><a name="id397064"></a>Supporting Large Numbers of Printers</h3></div></div></div><p>
1551
1550
One issue that has arisen during the recent development phase of Samba is the need to support driver
1552
1551
downloads for hundreds of printers. Using Windows NT APW for this task is somewhat awkward (to say the least). If
1553
1552
you do not want to acquire RSS pains from the printer installation clicking orgy alone, you need
1630
1629
<span class="quote">&#8220;<span class="quote">dm9110</span>&#8221;</span> printer with an empty string where the driver should have been listed (between
1631
1630
the two commas in the description field). After the <code class="literal">setdriver</code> command
1632
1631
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="id397328"></a>Adding New Printers with the Windows NT APW</h3></div></div></div><p>
 
1632
</p></div><div class="sect2" title="Adding New Printers with the Windows NT APW"><div class="titlepage"><div><div><h3 class="title"><a name="id397300"></a>Adding New Printers with the Windows NT APW</h3></div></div></div><p>
1634
1633
By default, Samba exhibits all printer shares defined in <code class="filename">smb.conf</code> in the <span class="guiicon">Printers</span>
1635
1634
folder. Also located in this folder is the Windows NT Add Printer Wizard icon. The APW will be shown only if:
1636
1635
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
1670
1669
necessarily a root account. A <a class="link" href="smb.conf.5.html#MAPTOGUEST" target="_top">map to guest = bad user</a> may have connected
1671
1670
you unwittingly under the wrong privilege. You should check it by using the <code class="literal">smbstatus</code>
1672
1671
command.
1673
 
</p></div><div class="sect2" title="Error Message: &#8220;Cannot connect under a different Name&#8221;"><div class="titlepage"><div><div><h3 class="title"><a name="id397565"></a>Error Message: <span class="quote">&#8220;<span class="quote">Cannot connect under a different Name</span>&#8221;</span></h3></div></div></div><p>
 
1672
</p></div><div class="sect2" title="Error Message: &#8220;Cannot connect under a different Name&#8221;"><div class="titlepage"><div><div><h3 class="title"><a name="id397538"></a>Error Message: <span class="quote">&#8220;<span class="quote">Cannot connect under a different Name</span>&#8221;</span></h3></div></div></div><p>
1674
1673
Once you are connected with the wrong credentials, there is no means to reverse the situation other than
1675
1674
to close all Explorer windows, and perhaps reboot.
1676
1675
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
1677
 
<a class="indexterm" name="id397584"></a>
 
1676
<a class="indexterm" name="id397556"></a>
1678
1677
        The <code class="literal">net use \\SAMBA-SERVER\sharename /user:root</code> gives you an error message:
1679
1678
        <span class="quote">&#8220;<span class="quote">Multiple connections to a server or a shared resource by the same user utilizing
1680
1679
        several user names are not allowed. Disconnect all previous connections to the server,
1700
1699
<code class="prompt">C:\&gt; </code> net use * /delete
1701
1700
</pre><p>
1702
1701
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="id397664"></a>Take Care When Assembling Driver Files</h3></div></div></div><p>
 
1702
</p></div><div class="sect2" title="Take Care When Assembling Driver Files"><div class="titlepage"><div><div><h3 class="title"><a name="id397636"></a>Take Care When Assembling Driver Files</h3></div></div></div><p>
1704
1703
You need to be extremely careful when you take notes about the files belonging to a particular
1705
1704
driver. Don't confuse the files for driver version <span class="quote">&#8220;<span class="quote">0</span>&#8221;</span> (for Windows 9x/Me, going into
1706
1705
<code class="filename">[print$]/WIN/0/</code>), driver version <code class="filename">2</code> (kernel mode driver for Windows NT,
1831
1830
In my example were even more differences than shown here. Conclusion: you must be careful to select the
1832
1831
correct driver files for each driver version. Don't rely on the names alone, and don't interchange files
1833
1832
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="id397864"></a>Samba and Printer Ports</h3></div></div></div><p>
1835
 
<a class="indexterm" name="id397871"></a>
1836
 
<a class="indexterm" name="id397878"></a>
1837
 
<a class="indexterm" name="id397885"></a>
1838
 
<a class="indexterm" name="id397892"></a>
 
1833
</p></div><div class="sect2" title="Samba and Printer Ports"><div class="titlepage"><div><div><h3 class="title"><a name="id397860"></a>Samba and Printer Ports</h3></div></div></div><p>
 
1834
<a class="indexterm" name="id397868"></a>
 
1835
<a class="indexterm" name="id397874"></a>
 
1836
<a class="indexterm" name="id397881"></a>
 
1837
<a class="indexterm" name="id397888"></a>
1839
1838
Windows NT/2000 print servers associate a port with each printer. These normally take the form of
1840
1839
<code class="filename">LPT1:</code>, <code class="filename">COM1:</code>, <code class="filename">FILE:</code>, and so on. Samba must also
1841
1840
support the concept of ports associated with a printer. By default, only one printer port, named <span class="quote">&#8220;<span class="quote">Samba
1844
1843
they request this information; otherwise, they throw an error message at you. So Samba fakes the port
1845
1844
information to keep the Windows clients happy.
1846
1845
</p><p>
1847
 
<a class="indexterm" name="id397931"></a>
 
1846
<a class="indexterm" name="id397927"></a>
1848
1847
Samba does not support the concept of <code class="constant">Printer Pooling</code> internally either. Printer
1849
1848
pooling assigns a logical printer to multiple ports as a form of load balancing or failover.
1850
1849
</p><p>
1851
1850
If you require multiple ports to be defined for some reason or another (my users and my boss should not know
1852
1851
that they are working with Samba), configure the <a class="link" href="smb.conf.5.html#ENUMPORTSCOMMAND" target="_top">enumports command</a>,
1853
1852
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="id397963"></a>Avoiding Common Client Driver Misconfiguration</h3></div></div></div><p>
 
1853
</p></div><div class="sect2" title="Avoiding Common Client Driver Misconfiguration"><div class="titlepage"><div><div><h3 class="title"><a name="id397959"></a>Avoiding Common Client Driver Misconfiguration</h3></div></div></div><p>
1855
1854
So now the printing works, but there are still problems. Most jobs print well, some do not print at
1856
1855
all. Some jobs have problems with fonts, which do not look good. Some jobs print fast and some
1857
1856
are dead-slow. We cannot cover it all, but we want to encourage you to read the brief paragraph about
1858
1857
<span class="quote">&#8220;<span class="quote">Avoiding the Wrong PostScript Driver Settings</span>&#8221;</span> in <a class="link" href="CUPS-printing.html" title="Chapter�22.�CUPS Printing Support">CUPS Printing
1859
1858
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
1859
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="id397996"></a>The Imprints Toolset</h2></div></div></div><p>
1862
 
<a class="indexterm" name="id398003"></a>
 
1860
</p></div></div><div class="sect1" title="The Imprints Toolset"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id397992"></a>The Imprints Toolset</h2></div></div></div><p>
 
1861
<a class="indexterm" name="id397999"></a>
1863
1862
The Imprints tool set provides a UNIX equivalent of the Windows NT APW.  For complete information, please
1864
1863
refer to the <a class="ulink" href="http://imprints.sourceforge.net/" target="_top">Imprints</a> Web site as well as the
1865
1864
documentation included with the Imprints source distribution. This section provides only a brief introduction
1871
1870
mailing list. The toolset is still in usable form, but only for a series of older printer models where
1872
1871
there are prepared packages to use. Packages for more up-to-date print devices are needed if Imprints
1873
1872
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="id398034"></a>What Is Imprints?</h3></div></div></div><p>
 
1873
</p><div class="sect2" title="What Is Imprints?"><div class="titlepage"><div><div><h3 class="title"><a name="id398030"></a>What Is Imprints?</h3></div></div></div><p>
1875
1874
Imprints is a collection of tools for supporting these goals:
1876
1875
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
1877
1876
        Providing a central repository of information regarding Windows NT and 95/98 printer driver packages.
1880
1879
        </p></li><li class="listitem"><p>
1881
1880
        Providing an installation client that will obtain printer drivers from a central Internet (or intranet) Imprints Server
1882
1881
        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="id398063"></a>Creating Printer Driver Packages</h3></div></div></div><p>
 
1882
        </p></li></ul></div></div><div class="sect2" title="Creating Printer Driver Packages"><div class="titlepage"><div><div><h3 class="title"><a name="id398060"></a>Creating Printer Driver Packages</h3></div></div></div><p>
1884
1883
The process of creating printer driver packages is beyond the scope of this document (refer to Imprints.txt,
1885
1884
included with the Samba distribution for more information). In short, an Imprints driver package
1886
1885
is a gzipped tarball containing the driver files, related INF files, and a control file needed by the
1887
1886
installation client.
1888
 
</p></div><div class="sect2" title="The Imprints Server"><div class="titlepage"><div><div><h3 class="title"><a name="id398076"></a>The Imprints Server</h3></div></div></div><p>
 
1887
</p></div><div class="sect2" title="The Imprints Server"><div class="titlepage"><div><div><h3 class="title"><a name="id398072"></a>The Imprints Server</h3></div></div></div><p>
1889
1888
The Imprints server is really a database server that may be queried via standard HTTP mechanisms. Each
1890
1889
printer entry in the database has an associated URL for the actual downloading of the package. Each
1891
1890
package is digitally signed via GnuPG, which can be used to verify that
1892
1891
the package downloaded is actually
1893
1892
the one referred in the Imprints database. It is strongly recommended that this security check
1894
1893
not be disabled.
1895
 
</p></div><div class="sect2" title="The Installation Client"><div class="titlepage"><div><div><h3 class="title"><a name="id398090"></a>The Installation Client</h3></div></div></div><p>
 
1894
</p></div><div class="sect2" title="The Installation Client"><div class="titlepage"><div><div><h3 class="title"><a name="id398086"></a>The Installation Client</h3></div></div></div><p>
1896
1895
More information regarding the Imprints installation client is available from the documentation file
1897
1896
<code class="filename">Imprints-Client-HOWTO.ps</code> that is included with the Imprints source package. The Imprints
1898
1897
installation client comes in two forms:
1922
1921
</p><p>
1923
1922
The way of sidestepping this limitation is to require that all Imprints printer driver packages include both the Intel Windows NT and
1924
1923
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="id398206"></a>Adding Network Printers without User Interaction</h2></div></div></div><p>
 
1924
</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="id398202"></a>Adding Network Printers without User Interaction</h2></div></div></div><p>
1926
1925
The following MS Knowledge Base article may be of some help if you need to handle Windows 2000 clients:
1927
1926
<span class="emphasis"><em>How to Add Printers with No User Interaction in Windows 2000,</em></span> (<a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;189105" target="_top">Microsoft KB 189105</a>).  It also
1928
1927
applies to Windows XP Professional clients.  The ideas sketched out in this section are inspired by this
1981
1980
up to date. The few extra seconds at logon time will not really be noticeable. Printers can be centrally
1982
1981
added, changed, and deleted at will on the server with no user intervention required from the clients
1983
1982
(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="id398448"></a>The <code class="literal">addprinter</code> Command</h2></div></div></div><p>
 
1983
</p></div><div class="sect1" title="The addprinter Command"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id398444"></a>The <code class="literal">addprinter</code> Command</h2></div></div></div><p>
1985
1984
The <code class="literal">addprinter</code> command can be configured to be a shell script or program executed by
1986
1985
Samba. It is triggered by running the APW from a client against the Samba print server. The APW asks
1987
1986
the user to fill in several fields (such as printer name, driver to be used, comment, port monitor,
1989
1988
way that it can create a new printer (through writing correct printcap entries on legacy systems or
1990
1989
by executing the <code class="literal">lpadmin</code> command on more modern systems) and create the associated share,
1991
1990
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="id398481"></a>Migration of Classical Printing to Samba</h2></div></div></div><p>
 
1991
</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="id398477"></a>Migration of Classical Printing to Samba</h2></div></div></div><p>
1993
1992
The basic NT-style printer driver management has not changed considerably in 3.0 over the 2.2.x releases
1994
1993
(apart from many small improvements). Here migration should be quite easy, especially if you followed
1995
1994
previous advice to stop using deprecated parameters in your setup. For migrations from an existing 2.0.x
2019
2018
        solution is to use the Windows NT APW to install the NT drivers and the 9x/Me drivers. This can be scripted
2020
2019
        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
2020
        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="id398612"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p>
 
2021
        </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="id398608"></a>Publishing Printer Information in Active Directory or LDAP</h2></div></div></div><p>
2023
2022
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
2023
Net Command</a>. If you wish to volunteer your services to help document this further, please contact 
2025
2024
<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="id398639"></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="id398644"></a>I Give My Root Password but I Do Not Get Access</h3></div></div></div><p>
 
2025
</p></div><div class="sect1" title="Common Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id398635"></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="id398641"></a>I Give My Root Password but I Do Not Get Access</h3></div></div></div><p>
2027
2026
Do not confuse the root password, which is valid for the UNIX system (and in most cases stored in the
2028
2027
form of a one-way hash in a file named <code class="filename">/etc/shadow</code>), with the password used to
2029
2028
authenticate against Samba. Samba does not know the UNIX password. Root access to Samba resources
2034
2033
New SMB password: secret
2035
2034
Retype new SMB password: secret
2036
2035
</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="id398682"></a>My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</h3></div></div></div><p>
 
2036
</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="id398678"></a>My Print Jobs Get Spooled into the Spooling Directory, but Then Get Lost</h3></div></div></div><p>
2038
2037
Do not use the existing UNIX print system spool directory for the Samba spool directory. It may seem
2039
2038
convenient and a savings of space, but it only leads to problems. The two must be separate. The UNIX/Linux
2040
2039
system print spool directory (e.g., <code class="filename">/var/spool/cups</code>) is typically owned by a