more autogen files from the latest SGML/DocBook checkins
[Samba/gbeck.git] / docs / textdocs / PRINTER_DRIVER2.txt
blob2bca8e69c922ccfc43267add4683dbbb8192d337
1 !==
2 !== PRINTER_DRIVER2.txt for Samba release 2.2.0-alpha1 23 Nov 2000
3 !==
5 ==========================================================================
6         Gerald Carter <jerry@samba.org> 14 Sep 2000
7 ===========================================================================
9 Introduction
10 ============
11 Beginning with the 2.2.0 release, Samba now supports the native Windows
12 NT printing mechanisms implemented via MS-RPC (i.e. the SPOOLSS named
13 pipe).  Previous versions of Samba only supported the LanMan printing 
14 calls.
16 The additional functionality provided by the new SPOOLSS support
17 includes:
19         o       Support for downloading printer driver files to 
20                 Windows 95/98/NT/2000 clients upon demand.
21         o       Uploading of printer drivers via the Windows NT
22                 Add Printer Wizard (APW) or the Imprints tool set
23         o       Support for the native MS-RPC printing calls such
24                 as StartDocPrinter, EnumJobs(), etc...  (See the MSDN
25                 documentation for more information on the Win32
26                 printing API)
27         o       Support for NT Access Control Lists (ACL) on 
28                 printer objects
29         o       Improved support for printer queue manipulation through
30                 the use of an internal database for spooled job information.
33 Configuration
34 =============
36 In order to support the uploading of printer driver files, you 
37 must first configure a file share named [print$].  The name of 
38 this share is hard coded in Samba's internals so the name is 
39 very important (print$ is the service used by Windows NT 
40 print servers to provide support for printer driver download.
42 <aside>
43   Previous versions of Samba recommended using a share named 
44   [printer$].  This name was taken from the printer$ service 
45   created by Windows 9x clients when a printer was shared.
46   (Windows 9x printer servers always have a printer$ service
47   which provides read-only access via no password in order to 
48   support printer driver downloads).
49   
50   However, the initial implementation allowed for a parameter
51   named 'printer driver location' to be used on a per share basis
52   to specify the location of the driver files associated with that
53   printer.  Another parameter named 'printer driver' provided a
54   means of defining the printer driver name to be sent to the 
55   client.
56   
57   These parameters, including 'printer driver file', are being
58   depreciated and should not be used in new installations.
59   For more information on this change, you should refer to the
60   "Migration" section of this document.
61 </aside>
63 You should modify the server's smb.conf file to create the 
64 following file share (of course, some of the parameter values,
65 such as 'path' are arbitrary and should be replaced with
66 appropriate values for your site):
68         [print$]
69                         path = /usr/local/samba/printers
70                         guest ok = yes
71                         browseable = yes
72                         read only = yes
73                         write list = ntadmin
75 The 'write list' is used to allow administrative level user accounts
76 to have write access in order to update files on the share.
77 See the smb.conf(5) man page for more information on configuring
78 file shares.
80 The requirement for 'guest ok = yes' depends upon how your
81 site is configured.  If users will be guaranteed to have 
82 an account on the Samba host, then this is a non-issue.
84   [author's note: The non-issue is that if all your Windows 
85   NT users are guarenteed to be authenticated by the Samba server
86   (such as a domain member server and the NT user has already
87   been validated by the Domain Controller in order to logon
88   to the Windows NT console), then guest access is not necessary.
89   Of course, in a workgroup environment where you just want
90   to be able to print without worrying about silly accounts
91   and security, then configure the share for gues access.
92   You'll probably want to add 'map to guest = Bad User'
93   in the [global] section as well.  Make sure you understand
94   what this parameter does before using it though. --jerry]
96 In order for a Windows NT print server to support the
97 downloading of driver files by multiple client architectures,
98 it must create subdirectories within the [print$] service
99 which correspond to each of the supported client architectures.
100 Samba follows this model as well.
102 Next create the directory tree below the [print$] share for
103 each architecture you wish to support.
105         [print$]-----
106                 |-W32X86                ; "Windows NT x86"
107                 |-WIN40                 ; "Windows 95/98"
108                 |-W32ALPHA              ; "Windows NT Alpha_AXP"
109                 |-W32MIPS               ; "Windows NT R4000"
110                 |-W32PPC                ; "Windows NT PowerPC"
113 +++++++++++++ ATTENTION!  REQUIRED PERMISSIONS +++++++++++++++++
115 Currently, the connected user must have uid 0 in order to
116 successfully install a new printer driver.  There are two
117 points of authorization in this process.
119         o       Access permissions to add files to the [print$]
120                 share.  This access control is managed using
121                 the same semantics as normal file shares.
122                 (i.e. filesystem permissions, write list, 
123                 writeable, etc...)
125         o       Authorization to add entries to
127                         $SAMBA/var/locks/ntdrivers.tdb
129                 Updates to this TDB are curently restricted
130                 to the root account.
132 Therefore, you must be connected to the samba host as the
133 root user in order to add a new printer driver.
136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
138 !== The Windows NT APW
140 Once you have created the required [print$] service and associated
141 subdirectories, simply log onto the Samba server using a root account
142 from a Windows NT 4.0 client.  Navigate to the "Printers" folder
143 on the Samba server.  You should see an initial listing of printers
144 that matches the printer shares defined on your Samba host.
146 <aside>
147   It is possible on a Windows NT print server to have printers 
148   listed in the Printers folder which are not shared.  Samba does
149   not make this distinction.  By definition, the only printers of
150   which Samba is aware are those which are specified as shares in
151   smb.conf.
152   
153   Another interesting side note is that Windows NT clients do
154   not use the SMB printer share, but rather can print directly 
155   to any printer on another Windows NT host using MS-RPC.  This
156   of course assumes that the printing client has the necessary
157   privileges on the remote host serving the printer.  The default
158   permissions assigned by Windows NT to a printer gives the "Print"
159   permissions to the "Everyone" well-known group.
160 </aside>
162 The initial listing of printers in the Samba host's Printers
163 folder will have no printer driver assigned to them.  The way
164 assign a driver to a printer is to view the Properties of the 
165 printer and either 
167         o       Use the "New Driver..." button to install a new printer
168                 driver, or
169         o       Select a driver from the popup list of installed drivers.
170                 Initially this list will be empty.
172 If you wish to install printer drivers for client operating 
173 systems other than "Windows NT x86", you will need to use the
174 "Sharing" tab of the printer properties dialog.
176 Assuming you have connected with a root account, you will 
177 also be able modify other printer properties such as 
178 ACLs and device settings using this dialog box.
181 !== Imprints  
183 The Imprints tool set provides a UNIX equivalent of the Windows
184 NT Add Printer Wizard.  For complete information, please refer
185 to the Imprints web site at http://imprints.sourceforge.net/
186 as well as the documentation included with the imprints source
187 distribution.  This section will only provide a brief introduction 
188 to the features of Imprints.
190 What is Imprints?
192         Imprints is a collection of tools for supporting the goals of
193         
194         o       Providing a central repository information regarding
195                 Windows NT and 95/98 printer driver packages
196         o       Providing the tools necessary for creating the Imprints
197                 printer driver packages.
198         o       Providing an installation client which will obtain
199                 and install printer drivers on remote Samba and Windows 
200                 NT 4 print servers.
201         
202                 
203 Creating Printer Driver Packages
205         The process of creating printer driver packages is beyond
206         the scope of this document (refer to Imprints.txt also included
207         with the Samba distribution for more information).  In short,
208         an Imprints driver package is a gzipped tarball containing the
209         driver files, related INF files, and a control file needed by the
210         installation client.
211         
212 The Imprints server
214         The Imprints server is really a database server that may 
215         be queried via standard HTTP mechanisms.  Each printer entry
216         in the database has an associated URL for the actual
217         downloading of the package.  Each package is digitally signed
218         via GnuPG which can be used to verify that package downloaded
219         is actually the one referred in the Imprints database.  It is 
220         **not** recommended that this security check be disabled.
221         
222 The Installation Client
223 <aside>
224   More information regarding the Imprints installation client is available
225   in the Imprints-Client-HOWTO.ps file included with the imprints source
226   package.
227 </aside>
229         The Imprints installation client comes in two forms.
230         
231         o       a set of command line Perl scripts
232         o       a GTK+ based graphical interface to the command 
233                 line perl scripts
234                 
235         The installation client (in both forms) provides a means
236         of querying the Imprints database server for a matching
237         list of known printer model names as well as a means to 
238         download and install the drivers on remote Samba and Windows
239         NT print servers.
240         
241         The basic installation process is in four steps and perl code
242         is wrapped around smbclient and rpcclient.
243         
244         foreach (supported architecture for a given driver)
245         {
246                 1.      rpcclient: Get the appropriate upload directory 
247                         on the remote server
248                 2.      smbclient: Upload the driver files
249                 3.      rpcclient: Issues an AddPrinterDriver() MS-RPC
250         }
251         
252         4.      rpcclient: Issue an AddPrinterEx() MS-RPC to actually
253                 create the printer
254                 
255 !== The printer driver name space problem
257         One of the problems encountered when implementing the Imprints
258         tool set was the name space issues between various supported
259         client architectures.  For example, Windows NT includes a driver
260         named "Apple LaserWriter II NTX v51.8" and Windows 95 calls
261         its version of this driver "Apple LaserWriter II NTX"
262         
263         The problem is how to know what client drivers have been
264         uploaded for a printer.  As astute reader will remember that
265         the Windows NT Printer Properties dialog only includes space
266         for one printer driver name.  A quick look in the Windows NT
267         4 system registry at
268         
269                 HKLM\System\CurrentControlSet\Control\Print\Environment
270                 
271         will reveal that Windows NT always uses the NT driver name.
272         The is ok as Windows NT always requires that at least the Windows
273         NT version of the printer driver is present.  However, Samba
274         does not have the requirement internally.  Therefore, how can
275         you use the NT driver name if is has not already been installed?
276         
277         The way of sidestepping this limitation is to require that all
278         Imprints printer driver packages include both the Intel Windows
279         NT and 95/98 printer drivers and that NT driver is installed 
280         first.
283 Migration to 2.2.x
284 =============================
286 Given that printer driver management has changed
287 (we hope improved :) ) in 2.2.0 over prior releases,
288 migration from an existing setup to 2.2.0 can follow
289 several paths.
291 <WARNING>
292         The following smb.conf parameters are considered to be
293         depreciated and will be removed soon.  Do not use them
294         in new installations
296         'printer driver file'     (G)
297         'printer driver'          (S)
298         'printer driver location' (S)
299 </WARNING>
302 Here are the possible scenarios for supporting migration:
304         o       If you does not desire the new Windows NT 
305                 print driver support, nothing needs to be done.  
306                 All existing parameters work the same.
308         o       If you want to take advantage of NT printer 
309                 driver support but does not want to migrate the 
310                 9x drivers to the new setup, the leave the existing 
311                 printers.def file.  When smbd attempts to locate a 
312                 9x driver for the printer in the TDB and fails it 
313                 will drop down to using the printers.def (and all 
314                 associated parameters).  The make_printerdef tool 
315                 will also remain for backwards compatibility but will 
316                 be moved to the "this tool is the old way of doing it" 
317                 pile.
319         o       If you instal a Windows 9x driver for a printer on
320                 your Samba host (in the printing TDB), this information will 
321                 take precedence and the three old printing parameters
322                 will be ignored (including print driver location).
324         o       If you want to migrate an existing printers.def file into
325                 the new setup, the current only solution is to use the
326                 Windows NT APW to install the NT drivers and the 9x 
327                 drivers.  (comment: this could possibly be scripted using 
328                 smbclient and rpcclient, but I haven't had time  --jerry)
330 !== end of PRINTER_DRIVER2.txt =======================================
331 !=====================================================================