5a6e6586da5c92df9fe5911dd51085d9e61113c6
[sfrench/samba-autobuild/.git] / docs / htmldocs / printer_driver2.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Printing Support in Samba 2.2.x</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
8 ><BODY
9 CLASS="ARTICLE"
10 BGCOLOR="#FFFFFF"
11 TEXT="#000000"
12 LINK="#0000FF"
13 VLINK="#840084"
14 ALINK="#0000FF"
15 ><DIV
16 CLASS="ARTICLE"
17 ><DIV
18 CLASS="TITLEPAGE"
19 ><H1
20 CLASS="TITLE"
21 ><A
22 NAME="PRINTING"
23 >Printing Support in Samba 2.2.x</A
24 ></H1
25 ><HR></DIV
26 ><DIV
27 CLASS="SECT1"
28 ><H1
29 CLASS="SECT1"
30 ><A
31 NAME="AEN3"
32 >Introduction</A
33 ></H1
34 ><P
35 >Beginning with the 2.2.0 release, Samba supports 
36 the native Windows NT printing mechanisms implemented via 
37 MS-RPC (i.e. the SPOOLSS named pipe).  Previous versions of 
38 Samba only supported LanMan printing calls.</P
39 ><P
40 >The additional functionality provided by the new 
41 SPOOLSS support includes:</P
42 ><P
43 ></P
44 ><UL
45 ><LI
46 ><P
47 >Support for downloading printer driver 
48         files to Windows 95/98/NT/2000 clients upon demand.
49         </P
50 ></LI
51 ><LI
52 ><P
53 >Uploading of printer drivers via the 
54         Windows NT Add Printer Wizard (APW) or the 
55         Imprints tool set (refer to <A
56 HREF="http://imprints.sourceforge.net"
57 TARGET="_top"
58 >http://imprints.sourceforge.net</A
59 >). 
60         </P
61 ></LI
62 ><LI
63 ><P
64 >Support for the native MS-RPC printing 
65         calls such as StartDocPrinter, EnumJobs(), etc...  (See 
66         the MSDN documentation at <A
67 HREF="http://msdn.microsoft.com/"
68 TARGET="_top"
69 >http://msdn.microsoft.com/</A
70
71         for more information on the Win32 printing API)
72         </P
73 ></LI
74 ><LI
75 ><P
76 >Support for NT Access Control Lists (ACL) 
77         on printer objects</P
78 ></LI
79 ><LI
80 ><P
81 >Improved support for printer queue manipulation 
82         through the use of an internal databases for spooled job 
83         information</P
84 ></LI
85 ></UL
86 ><P
87 >There has been some initial confusion about what all this means
88 and whether or not it is a requirement for printer drivers to be 
89 installed on a Samba host in order to support printing from Windows 
90 clients.  A bug existed in Samba 2.2.0 which made Windows NT/2000 clients 
91 require that the Samba server possess a valid driver for the printer.  
92 This is fixed in Samba 2.2.1 and once again, Windows NT/2000 clients
93 can use the local APW for installing drivers to be used with a Samba 
94 served printer.  This is the same behavior exhibited by Windows 9x clients.
95 As a side note, Samba does not use these drivers in any way to process 
96 spooled files.  They are utilized entirely by the clients.</P
97 ><P
98 >The following MS KB article, may be of some help if you are dealing with
99 Windows 2000 clients:  <I
100 CLASS="EMPHASIS"
101 >How to Add Printers with No User 
102 Interaction in Windows 2000</I
103 ></P
104 ><P
105 ><A
106 HREF="http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP"
107 TARGET="_top"
108 >http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP</A
109 ></P
110 ></DIV
111 ><DIV
112 CLASS="SECT1"
113 ><HR><H1
114 CLASS="SECT1"
115 ><A
116 NAME="AEN25"
117 >Configuration</A
118 ></H1
119 ><DIV
120 CLASS="WARNING"
121 ><P
122 ></P
123 ><TABLE
124 CLASS="WARNING"
125 BORDER="1"
126 WIDTH="100%"
127 ><TR
128 ><TD
129 ALIGN="CENTER"
130 ><B
131 >[print$] vs. [printer$]</B
132 ></TD
133 ></TR
134 ><TR
135 ><TD
136 ALIGN="LEFT"
137 ><P
138 >Previous versions of Samba recommended using a share named [printer$].  
139 This name was taken from the printer$ service created by Windows 9x 
140 clients when a printer was shared.  Windows 9x printer servers always have 
141 a printer$ service which provides read-only access via no 
142 password in order to support printer driver downloads.</P
143 ><P
144 >However, the initial implementation allowed for a 
145 parameter named <TT
146 CLASS="PARAMETER"
147 ><I
148 >printer driver location</I
149 ></TT
150
151 to be used on a per share basis to specify the location of 
152 the driver files associated with that printer.  Another 
153 parameter named <TT
154 CLASS="PARAMETER"
155 ><I
156 >printer driver</I
157 ></TT
158 > provided 
159 a means of defining the printer driver name to be sent to 
160 the client.</P
161 ><P
162 >These parameters, including <TT
163 CLASS="PARAMETER"
164 ><I
165 >printer driver
166 file</I
167 ></TT
168 > parameter, are being deprecated and should not 
169 be used in new installations.  For more information on this change, 
170 you should refer to the <A
171 HREF="#MIGRATION"
172 >Migration section</A
173 >
174 of this document.</P
175 ></TD
176 ></TR
177 ></TABLE
178 ></DIV
179 ><DIV
180 CLASS="SECT2"
181 ><HR><H2
182 CLASS="SECT2"
183 ><A
184 NAME="AEN36"
185 >Creating [print$]</A
186 ></H2
187 ><P
188 >In order to support the uploading of printer driver 
189 files, you must first configure a file share named [print$].  
190 The name of this share is hard coded in Samba's internals so 
191 the name is very important (print$ is the service used by 
192 Windows NT print servers to provide support for printer driver 
193 download).</P
194 ><P
195 >You should modify the server's smb.conf file to add the global
196 parameters and to create the 
197 following file share (of course, some of the parameter values,
198 such as 'path' are arbitrary and should be replaced with
199 appropriate values for your site):</P
200 ><P
201 ><PRE
202 CLASS="PROGRAMLISTING"
203 >[global]
204     ; members of the ntadmin group should be able
205     ; to add drivers and set printer properties
206     ; root is implicitly a 'printer admin'
207     printer admin = @ntadmin
208
209 [print$]
210     path = /usr/local/samba/printers
211     guest ok = yes
212     browseable = yes
213     read only = yes
214     ; since this share is configured as read only, then we need
215     ; a 'write list'.  Check the file system permissions to make
216     ; sure this account can copy files to the share.  If this
217     ; is setup to a non-root account, then it should also exist
218     ; as a 'printer admin'
219     write list = @ntadmin,root</PRE
220 ></P
221 ><P
222 >The <A
223 HREF="smb.conf.5.html#WRITELIST"
224 TARGET="_top"
225 ><TT
226 CLASS="PARAMETER"
227 ><I
228 >write list</I
229 ></TT
230 ></A
231 > is used to allow administrative 
232 level user accounts to have write access in order to update files 
233 on the share.  See the <A
234 HREF="smb.conf.5.html"
235 TARGET="_top"
236 >smb.conf(5) 
237 man page</A
238 > for more information on configuring file shares.</P
239 ><P
240 >The requirement for <A
241 HREF="smb.conf.5.html#GUESTOK"
242 TARGET="_top"
243 ><B
244 CLASS="COMMAND"
245 >guest 
246 ok = yes</B
247 ></A
248 > depends upon how your
249 site is configured.  If users will be guaranteed to have 
250 an account on the Samba host, then this is a non-issue.</P
251 ><DIV
252 CLASS="NOTE"
253 ><BLOCKQUOTE
254 CLASS="NOTE"
255 ><P
256 ><B
257 >Author's Note: </B
258 >The non-issue is that if all your Windows NT users are guaranteed to be 
259 authenticated by the Samba server (such as a domain member server and the NT 
260 user has already been validated by the Domain Controller in 
261 order to logon to the Windows NT console), then guest access 
262 is not necessary.  Of course, in a workgroup environment where 
263 you just want to be able to print without worrying about 
264 silly accounts and security, then configure the share for 
265 guest access.  You'll probably want to add <A
266 HREF="smb.conf.5.html#MAPTOGUEST"
267 TARGET="_top"
268 ><B
269 CLASS="COMMAND"
270 >map to guest = Bad User</B
271 ></A
272 > in the [global] section as well.  Make sure 
273 you understand what this parameter does before using it 
274 though. --jerry</P
275 ></BLOCKQUOTE
276 ></DIV
277 ><P
278 >In order for a Windows NT print server to support 
279 the downloading of driver files by multiple client architectures,
280 it must create subdirectories within the [print$] service
281 which correspond to each of the supported client architectures.
282 Samba follows this model as well.</P
283 ><P
284 >Next create the directory tree below the [print$] share 
285 for each architecture you wish to support.</P
286 ><P
287 ><PRE
288 CLASS="PROGRAMLISTING"
289 >[print$]-----
290         |-W32X86           ; "Windows NT x86"
291         |-WIN40            ; "Windows 95/98"
292         |-W32ALPHA         ; "Windows NT Alpha_AXP"
293         |-W32MIPS          ; "Windows NT R4000"
294         |-W32PPC           ; "Windows NT PowerPC"</PRE
295 ></P
296 ><DIV
297 CLASS="WARNING"
298 ><P
299 ></P
300 ><TABLE
301 CLASS="WARNING"
302 BORDER="1"
303 WIDTH="100%"
304 ><TR
305 ><TD
306 ALIGN="CENTER"
307 ><B
308 >ATTENTION!  REQUIRED PERMISSIONS</B
309 ></TD
310 ></TR
311 ><TR
312 ><TD
313 ALIGN="LEFT"
314 ><P
315 >In order to currently add a new driver to you Samba host, 
316 one of two conditions must hold true:</P
317 ><P
318 ></P
319 ><UL
320 ><LI
321 ><P
322 >The account used to connect to the Samba host 
323         must have a uid of 0 (i.e. a root account)</P
324 ></LI
325 ><LI
326 ><P
327 >The account used to connect to the Samba host
328         must be a member of the <A
329 HREF="smb.conf.5.html#PRINTERADMIN"
330 TARGET="_top"
331 ><TT
332 CLASS="PARAMETER"
333 ><I
334 >printer 
335         admin</I
336 ></TT
337 ></A
338 > list.</P
339 ></LI
340 ></UL
341 ><P
342 >Of course, the connected account must still possess access
343 to add files to the subdirectories beneath [print$]. Remember
344 that all file shares are set to 'read only' by default.</P
345 ></TD
346 ></TR
347 ></TABLE
348 ></DIV
349 ><P
350 >Once you have created the required [print$] service and 
351 associated subdirectories, simply log onto the Samba server using 
352 a root (or <TT
353 CLASS="PARAMETER"
354 ><I
355 >printer admin</I
356 ></TT
357 >) account
358 from a Windows NT 4.0/2k client.  Open "Network Neighbourhood" or
359 "My Network Places" and browse for the Samba host.  Once you have located
360 the server, navigate to the "Printers..." folder.
361 You should see an initial listing of printers
362 that matches the printer shares defined on your Samba host.</P
363 ></DIV
364 ><DIV
365 CLASS="SECT2"
366 ><HR><H2
367 CLASS="SECT2"
368 ><A
369 NAME="AEN71"
370 >Setting Drivers for Existing Printers</A
371 ></H2
372 ><P
373 >The initial listing of printers in the Samba host's 
374 Printers folder will have no real printer driver assigned 
375 to them.  By default, in Samba 2.2.0 this driver name was set to 
376 <I
377 CLASS="EMPHASIS"
378 >NO PRINTER DRIVER AVAILABLE FOR THIS PRINTER</I
379 >.
380 Later versions changed this to a NULL string to allow the use
381 tof the local Add Printer Wizard on NT/2000 clients.
382 Attempting to view the printer properties for a printer
383 which has this default driver assigned will result in 
384 the error message:</P
385 ><P
386 ><I
387 CLASS="EMPHASIS"
388 >Device settings cannot be displayed.  The driver 
389 for the specified printer is not installed, only spooler 
390 properties will be displayed.  Do you want to install the 
391 driver now?</I
392 ></P
393 ><P
394 >Click "No" in the error dialog and you will be presented with
395 the printer properties window.  The way assign a driver to a 
396 printer is to either</P
397 ><P
398 ></P
399 ><UL
400 ><LI
401 ><P
402 >Use the "New Driver..." button to install 
403         a new printer driver, or</P
404 ></LI
405 ><LI
406 ><P
407 >Select a driver from the popup list of 
408         installed drivers.  Initially this list will be empty.</P
409 ></LI
410 ></UL
411 ><P
412 >If you wish to install printer drivers for client 
413 operating systems other than "Windows NT x86", you will need 
414 to use the "Sharing" tab of the printer properties dialog.</P
415 ><P
416 >Assuming you have connected with a root account, you 
417 will also be able modify other printer properties such as 
418 ACLs and device settings using this dialog box.</P
419 ><P
420 >A few closing comments for this section, it is possible 
421 on a Windows NT print server to have printers
422 listed in the Printers folder which are not shared.  Samba does
423 not make this distinction.  By definition, the only printers of
424 which Samba is aware are those which are specified as shares in
425 <TT
426 CLASS="FILENAME"
427 >smb.conf</TT
428 >.</P
429 ><P
430 >Another interesting side note is that Windows NT clients do
431 not use the SMB printer share, but rather can print directly 
432 to any printer on another Windows NT host using MS-RPC.  This
433 of course assumes that the printing client has the necessary
434 privileges on the remote host serving the printer.  The default
435 permissions assigned by Windows NT to a printer gives the "Print"
436 permissions to the "Everyone" well-known group.</P
437 ></DIV
438 ><DIV
439 CLASS="SECT2"
440 ><HR><H2
441 CLASS="SECT2"
442 ><A
443 NAME="AEN88"
444 >Support a large number of printers</A
445 ></H2
446 ><P
447 >One issue that has arisen during the development
448 phase of Samba 2.2 is the need to support driver downloads for
449 100's of printers.  Using the Windows NT APW is somewhat 
450 awkward to say the least.  If more than one printer is using the 
451 same driver, the <A
452 HREF="rpcclient.1.html"
453 TARGET="_top"
454 ><B
455 CLASS="COMMAND"
456 >rpcclient's
457 setdriver command</B
458 ></A
459 > can be used to set the driver
460 associated with an installed driver.  The following is an example
461 of how this could be accomplished:</P
462 ><P
463 ><PRE
464 CLASS="PROGRAMLISTING"
465
466 <TT
467 CLASS="PROMPT"
468 >$ </TT
469 >rpcclient pogo -U root%secret -c "enumdrivers"
470 Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
471  
472 [Windows NT x86]
473 Printer Driver Info 1:
474      Driver Name: [HP LaserJet 4000 Series PS]
475  
476 Printer Driver Info 1:
477      Driver Name: [HP LaserJet 2100 Series PS]
478  
479 Printer Driver Info 1:
480      Driver Name: [HP LaserJet 4Si/4SiMX PS]
481                                   
482 <TT
483 CLASS="PROMPT"
484 >$ </TT
485 >rpcclient pogo -U root%secret -c "enumprinters"
486 Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
487      flags:[0x800000]
488      name:[\\POGO\hp-print]
489      description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]
490      comment:[]
491                                   
492 <TT
493 CLASS="PROMPT"
494 >$ </TT
495 >rpcclient pogo -U root%secret \
496 <TT
497 CLASS="PROMPT"
498 >&gt; </TT
499 > -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""
500 Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
501 Successfully set hp-print to driver HP LaserJet 4000 Series PS.</PRE
502 ></P
503 ></DIV
504 ><DIV
505 CLASS="SECT2"
506 ><HR><H2
507 CLASS="SECT2"
508 ><A
509 NAME="AEN99"
510 >Adding New Printers via the Windows NT APW</A
511 ></H2
512 ><P
513 >By default, Samba offers all printer shares defined in <TT
514 CLASS="FILENAME"
515 >smb.conf</TT
516 >
517 in the "Printers..." folder.  Also in this folder is the Windows NT 
518 Add Printer Wizard icon.  The APW will be show only if</P
519 ><P
520 ></P
521 ><UL
522 ><LI
523 ><P
524 >The connected user is able to successfully
525         execute an OpenPrinterEx(\\server) with administrative
526         privileges (i.e. root or <TT
527 CLASS="PARAMETER"
528 ><I
529 >printer admin</I
530 ></TT
531 >).
532         </P
533 ></LI
534 ><LI
535 ><P
536 ><A
537 HREF="smb.conf.5.html#SHOWADDPRINTERWIZARD"
538 TARGET="_top"
539 ><TT
540 CLASS="PARAMETER"
541 ><I
542 >show 
543         add printer wizard = yes</I
544 ></TT
545 ></A
546 > (the default).
547         </P
548 ></LI
549 ></UL
550 ><P
551 >In order to be able to use the APW to successfully add a printer to a Samba 
552 server, the <A
553 HREF="smb.conf.5.html#ADDPRINTERCOMMAND"
554 TARGET="_top"
555 ><TT
556 CLASS="PARAMETER"
557 ><I
558 >add 
559 printer command</I
560 ></TT
561 ></A
562 > must have a defined value.  The program
563 hook must successfully add the printer to the system (i.e. 
564 <TT
565 CLASS="FILENAME"
566 >/etc/printcap</TT
567 > or appropriate files) and 
568 <TT
569 CLASS="FILENAME"
570 >smb.conf</TT
571 > if necessary.</P
572 ><P
573 >When using the APW from a client, if the named printer share does 
574 not exist, <B
575 CLASS="COMMAND"
576 >smbd</B
577 > will execute the <TT
578 CLASS="PARAMETER"
579 ><I
580 >add printer 
581 command</I
582 ></TT
583 > and reparse the <TT
584 CLASS="FILENAME"
585 >smb.conf</TT
586 >
587 to attempt to locate the new printer share.  If the share is still not defined,
588 an error of "Access Denied" is returned to the client.  Note that the 
589 <TT
590 CLASS="PARAMETER"
591 ><I
592 >add printer program</I
593 ></TT
594 > is executed under the context
595 of the connected user, not necessarily a root account.</P
596 ><P
597 >There is a complementary <A
598 HREF="smb.conf.5.html#DELETEPRINTERCOMMAND"
599 TARGET="_top"
600 ><TT
601 CLASS="PARAMETER"
602 ><I
603 >delete
604 printer command</I
605 ></TT
606 ></A
607 > for removing entries from the "Printers..."
608 folder.</P
609 ></DIV
610 ><DIV
611 CLASS="SECT2"
612 ><HR><H2
613 CLASS="SECT2"
614 ><A
615 NAME="AEN124"
616 >Samba and Printer Ports</A
617 ></H2
618 ><P
619 >Windows NT/2000 print servers associate a port with each printer.  These normally
620 take the form of LPT1:, COM1:, FILE:, etc...  Samba must also support the
621 concept of ports associated with a printer.  By default, only one printer port,
622 named "Samba Printer Port", exists on a system.  Samba does not really need a port in
623 order to print, rather it is a requirement of Windows clients.  </P
624 ><P
625 >Note that Samba does not support the concept of "Printer Pooling" internally 
626 either.  This is when a logical printer is assigned to multiple ports as 
627 a form of load balancing or fail over.</P
628 ><P
629 >If you require that multiple ports be defined for some reason,
630 <TT
631 CLASS="FILENAME"
632 >smb.conf</TT
633 > possesses a <A
634 HREF="smb.conf.5.html#ENUMPORTSCOMMAND"
635 TARGET="_top"
636 ><TT
637 CLASS="PARAMETER"
638 ><I
639 >enumports 
640 command</I
641 ></TT
642 ></A
643 > which can be used to define an external program 
644 that generates a listing of ports on a system.</P
645 ></DIV
646 ></DIV
647 ><DIV
648 CLASS="SECT1"
649 ><HR><H1
650 CLASS="SECT1"
651 ><A
652 NAME="AEN132"
653 >The Imprints Toolset</A
654 ></H1
655 ><P
656 >The Imprints tool set provides a UNIX equivalent of the 
657         Windows NT Add Printer Wizard.  For complete information, please 
658         refer to the Imprints web site at <A
659 HREF="http://imprints.sourceforge.net/"
660 TARGET="_top"
661 >       http://imprints.sourceforge.net/</A
662 > as well as the documentation 
663         included with the imprints source distribution.  This section will 
664         only provide a brief introduction to the features of Imprints.</P
665 ><DIV
666 CLASS="SECT2"
667 ><HR><H2
668 CLASS="SECT2"
669 ><A
670 NAME="AEN136"
671 >What is Imprints?</A
672 ></H2
673 ><P
674 >Imprints is a collection of tools for supporting the goals 
675                 of</P
676 ><P
677 ></P
678 ><UL
679 ><LI
680 ><P
681 >Providing a central repository information 
682                         regarding Windows NT and 95/98 printer driver packages</P
683 ></LI
684 ><LI
685 ><P
686 >Providing the tools necessary for creating 
687                         the Imprints printer driver packages.</P
688 ></LI
689 ><LI
690 ><P
691 >Providing an installation client which 
692                         will obtain and install printer drivers on remote Samba 
693                         and Windows NT 4 print servers.</P
694 ></LI
695 ></UL
696 ></DIV
697 ><DIV
698 CLASS="SECT2"
699 ><HR><H2
700 CLASS="SECT2"
701 ><A
702 NAME="AEN146"
703 >Creating Printer Driver Packages</A
704 ></H2
705 ><P
706 >The process of creating printer driver packages is beyond
707                 the scope of this document (refer to Imprints.txt also included
708                 with the Samba distribution for more information).  In short,
709                 an Imprints driver package is a gzipped tarball containing the
710                 driver files, related INF files, and a control file needed by the
711                 installation client.</P
712 ></DIV
713 ><DIV
714 CLASS="SECT2"
715 ><HR><H2
716 CLASS="SECT2"
717 ><A
718 NAME="AEN149"
719 >The Imprints server</A
720 ></H2
721 ><P
722 >The Imprints server is really a database server that 
723                 may be queried via standard HTTP mechanisms.  Each printer 
724                 entry in the database has an associated URL for the actual
725                 downloading of the package.  Each package is digitally signed
726                 via GnuPG which can be used to verify that package downloaded
727                 is actually the one referred in the Imprints database.  It is 
728                 <I
729 CLASS="EMPHASIS"
730 >not</I
731 > recommended that this security check 
732                 be disabled.</P
733 ></DIV
734 ><DIV
735 CLASS="SECT2"
736 ><HR><H2
737 CLASS="SECT2"
738 ><A
739 NAME="AEN153"
740 >The Installation Client</A
741 ></H2
742 ><P
743 >More information regarding the Imprints installation client 
744                 is available in the <TT
745 CLASS="FILENAME"
746 >Imprints-Client-HOWTO.ps</TT
747
748                 file included with the imprints source package.</P
749 ><P
750 >The Imprints installation client comes in two forms.</P
751 ><P
752 ></P
753 ><UL
754 ><LI
755 ><P
756 >a set of command line Perl scripts</P
757 ></LI
758 ><LI
759 ><P
760 >a GTK+ based graphical interface to 
761                         the command line perl scripts</P
762 ></LI
763 ></UL
764 ><P
765 >The installation client (in both forms) provides a means
766                 of querying the Imprints database server for a matching
767                 list of known printer model names as well as a means to 
768                 download and install the drivers on remote Samba and Windows
769                 NT print servers.</P
770 ><P
771 >The basic installation process is in four steps and 
772                 perl code is wrapped around <B
773 CLASS="COMMAND"
774 >smbclient</B
775
776                 and <B
777 CLASS="COMMAND"
778 >rpcclient</B
779 >.</P
780 ><P
781 ><PRE
782 CLASS="PROGRAMLISTING"
783 >       
784 foreach (supported architecture for a given driver)
785 {
786      1.  rpcclient: Get the appropriate upload directory 
787          on the remote server
788      2.  smbclient: Upload the driver files
789      3.  rpcclient: Issues an AddPrinterDriver() MS-RPC
790 }
791         
792 4.  rpcclient: Issue an AddPrinterEx() MS-RPC to actually
793     create the printer</PRE
794 ></P
795 ><P
796 >One of the problems encountered when implementing 
797                 the Imprints tool set was the name space issues between 
798                 various supported client architectures.  For example, Windows 
799                 NT includes a driver named "Apple LaserWriter II NTX v51.8" 
800                 and Windows 95 calls its version of this driver "Apple 
801                 LaserWriter II NTX"</P
802 ><P
803 >The problem is how to know what client drivers have 
804                 been uploaded for a printer.  As astute reader will remember 
805                 that the Windows NT Printer Properties dialog only includes 
806                 space for one printer driver name.  A quick look in the 
807                 Windows NT 4.0 system registry at</P
808 ><P
809 ><TT
810 CLASS="FILENAME"
811 >HKLM\System\CurrentControlSet\Control\Print\Environment
812                 </TT
813 ></P
814 ><P
815 >will reveal that Windows NT always uses the NT driver 
816                 name.  This is ok as Windows NT always requires that at least 
817                 the Windows NT version of the printer driver is present.  
818                 However, Samba does not have the requirement internally.  
819                 Therefore, how can you use the NT driver name if is has not 
820                 already been installed?</P
821 ><P
822 >The way of sidestepping this limitation is to require 
823                 that all Imprints printer driver packages include both the Intel 
824                 Windows NT and 95/98 printer drivers and that NT driver is 
825                 installed first.</P
826 ></DIV
827 ></DIV
828 ><DIV
829 CLASS="SECT1"
830 ><HR><H1
831 CLASS="SECT1"
832 ><A
833 NAME="AEN175"
834 ><A
835 NAME="MIGRATION"
836 ></A
837 >Migration to from Samba 2.0.x to 2.2.x</A
838 ></H1
839 ><P
840 >Given that printer driver management has changed (we hope improved) in 
841 2.2 over prior releases, migration from an existing setup to 2.2 can 
842 follow several paths. Here are the possible scenarios for 
843 migration:</P
844 ><P
845 ></P
846 ><UL
847 ><LI
848 ><P
849 >If you do not desire the new Windows NT 
850         print driver support, nothing needs to be done.  
851         All existing parameters work the same.</P
852 ></LI
853 ><LI
854 ><P
855 >If you want to take advantage of NT printer 
856         driver support but do not want to migrate the 
857         9x drivers to the new setup, the leave the existing 
858         <TT
859 CLASS="FILENAME"
860 >printers.def</TT
861 > file.  When smbd attempts 
862         to locate a 
863         9x driver for the printer in the TDB and fails it 
864         will drop down to using the printers.def (and all 
865         associated parameters).  The <B
866 CLASS="COMMAND"
867 >make_printerdef</B
868
869         tool will also remain for backwards compatibility but will 
870         be removed in the next major release.</P
871 ></LI
872 ><LI
873 ><P
874 >If you install a Windows 9x driver for a printer 
875         on your Samba host (in the printing TDB), this information will 
876         take precedence and the three old printing parameters
877         will be ignored (including print driver location).</P
878 ></LI
879 ><LI
880 ><P
881 >If you want to migrate an existing <TT
882 CLASS="FILENAME"
883 >printers.def</TT
884
885         file into the new setup, the current only solution is to use the Windows 
886         NT APW to install the NT drivers and the 9x  drivers.  This can be scripted 
887         using <B
888 CLASS="COMMAND"
889 >smbclient</B
890 > and <B
891 CLASS="COMMAND"
892 >rpcclient</B
893 >.  See the 
894         Imprints installation client at <A
895 HREF="http://imprints.sourceforge.net/"
896 TARGET="_top"
897 >http://imprints.sourceforge.net/</A
898
899         for an example.
900         </P
901 ></LI
902 ></UL
903 ><DIV
904 CLASS="WARNING"
905 ><P
906 ></P
907 ><TABLE
908 CLASS="WARNING"
909 BORDER="1"
910 WIDTH="100%"
911 ><TR
912 ><TD
913 ALIGN="CENTER"
914 ><B
915 >Achtung!</B
916 ></TD
917 ></TR
918 ><TR
919 ><TD
920 ALIGN="LEFT"
921 ><P
922 >The following <TT
923 CLASS="FILENAME"
924 >smb.conf</TT
925 > parameters are considered to 
926 be deprecated and will be removed soon.  Do not use them in new 
927 installations</P
928 ><P
929 ></P
930 ><UL
931 ><LI
932 ><P
933 ><TT
934 CLASS="PARAMETER"
935 ><I
936 >printer driver file (G)</I
937 ></TT
938 >
939         </P
940 ></LI
941 ><LI
942 ><P
943 ><TT
944 CLASS="PARAMETER"
945 ><I
946 >printer driver (S)</I
947 ></TT
948 >
949         </P
950 ></LI
951 ><LI
952 ><P
953 ><TT
954 CLASS="PARAMETER"
955 ><I
956 >printer driver location (S)</I
957 ></TT
958 >
959         </P
960 ></LI
961 ></UL
962 ></TD
963 ></TR
964 ></TABLE
965 ></DIV
966 ><P
967 >The have been two new parameters add in Samba 2.2.2 to for 
968 better support of Samba 2.0.x backwards capability (<TT
969 CLASS="PARAMETER"
970 ><I
971 >disable
972 spoolss</I
973 ></TT
974 >) and for using local printers drivers on Windows 
975 NT/2000 clients (<TT
976 CLASS="PARAMETER"
977 ><I
978 >use client driver</I
979 ></TT
980 >). Both of 
981 these options are described in the smb.conf(5) man page and are 
982 disabled by default.</P
983 ></DIV
984 ></DIV
985 ></BODY
986 ></HTML
987 >