diff options
Diffstat (limited to 'docs/htmldocs/printer_driver2.html')
-rw-r--r-- | docs/htmldocs/printer_driver2.html | 527 |
1 files changed, 336 insertions, 191 deletions
diff --git a/docs/htmldocs/printer_driver2.html b/docs/htmldocs/printer_driver2.html index 34208f8fee..ac845b8433 100644 --- a/docs/htmldocs/printer_driver2.html +++ b/docs/htmldocs/printer_driver2.html @@ -33,53 +33,54 @@ NAME="AEN3" ></H1 ><P >Beginning with the 2.2.0 release, Samba supports - the native Windows NT printing mechanisms implemented via - MS-RPC (i.e. the SPOOLSS named pipe). Previous versions of - Samba only supported LanMan printing calls.</P +the native Windows NT printing mechanisms implemented via +MS-RPC (i.e. the SPOOLSS named pipe). Previous versions of +Samba only supported LanMan printing calls.</P ><P >The additional functionality provided by the new - SPOOLSS support includes:</P +SPOOLSS support includes:</P ><P ></P ><UL ><LI ><P >Support for downloading printer driver - files to Windows 95/98/NT/2000 clients upon demand. - </P + files to Windows 95/98/NT/2000 clients upon demand. + </P ></LI ><LI ><P >Uploading of printer drivers via the - Windows NT Add Printer Wizard (APW) or the <A + Windows NT Add Printer Wizard (APW) or the + Imprints tool set (refer to <A HREF="http://imprints.sourceforge.net" TARGET="_top" ->Imprints tool set - </A -></P +>http://imprints.sourceforge.net</A +>). + </P ></LI ><LI ><P >Support for the native MS-RPC printing - calls such as StartDocPrinter, EnumJobs(), etc... (See - the <A + calls such as StartDocPrinter, EnumJobs(), etc... (See + the MSDN documentation at <A HREF="http://msdn.microsoft.com/" TARGET="_top" ->MSDN documentation - </A -> for more information on the Win32 printing API) - </P +>http://msdn.microsoft.com/</A +> + for more information on the Win32 printing API) + </P ></LI ><LI ><P >Support for NT Access Control Lists (ACL) - on printer objects</P + on printer objects</P ></LI ><LI ><P >Improved support for printer queue manipulation - through the use of an internal databases for spooled job - information</P + through the use of an internal databases for spooled job + information</P ></LI ></UL ></DIV @@ -92,88 +93,75 @@ NAME="AEN20" >Configuration</A ></H1 ><P ->In order to support the uploading of printer driver - files, you must first configure a file share named [print$]. - The name of this share is hard coded in Samba's internals so - the name is very important (print$ is the service used by - Windows NT print servers to provide support for printer driver - download).</P -><DIV -CLASS="WARNING" -><P -></P -><TABLE -CLASS="WARNING" -BORDER="1" -WIDTH="100%" -><TR -><TD -ALIGN="CENTER" -><B ->Warning</B -></TD -></TR -><TR -><TD -ALIGN="LEFT" -><P ->Previous versions of Samba recommended using - a share named [printer$]. This name was taken from the - printer$ service created by Windows 9x clients when a - printer was shared. Windows 9x printer servers always have - a printer$ service which provides read-only access via no - password in order to support printer driver downloads.</P +><I +CLASS="EMPHASIS" +>WARNING!!!</I +> Previous versions of Samba +recommended using a share named [printer$]. This name was taken from the +printer$ service created by Windows 9x clients when a +printer was shared. Windows 9x printer servers always have +a printer$ service which provides read-only access via no +password in order to support printer driver downloads.</P ><P >However, the initial implementation allowed for a - parameter named <TT +parameter named <TT CLASS="PARAMETER" ><I >printer driver location</I ></TT > - to be used on a per share basis to specify the location of - the driver files associated with that printer. Another - parameter named <TT +to be used on a per share basis to specify the location of +the driver files associated with that printer. Another +parameter named <TT CLASS="PARAMETER" ><I >printer driver</I ></TT > provided - a means of defining the printer driver name to be sent to - the client.</P +a means of defining the printer driver name to be sent to +the client.</P ><P >These parameters, including <TT CLASS="PARAMETER" ><I >printer driver - file</I +file</I ></TT > parameter, are being depreciated and should not - be used in new installations. For more information on this change, - you should refer to the <A +be used in new installations. For more information on this change, +you should refer to the <A HREF="#MIGRATION" ->Migration section - </A +>Migration section </A >of this document.</P -></TD -></TR -></TABLE -></DIV +><DIV +CLASS="SECT2" +><HR><H2 +CLASS="SECT2" +><A +NAME="AEN30" +>Creating [print$]</A +></H2 +><P +>In order to support the uploading of printer driver +files, you must first configure a file share named [print$]. +The name of this share is hard coded in Samba's internals so +the name is very important (print$ is the service used by +Windows NT print servers to provide support for printer driver +download).</P ><P >You should modify the server's smb.conf file to create the - following file share (of course, some of the parameter values, - such as 'path' are arbitrary and should be replaced with - appropriate values for your site):</P +following file share (of course, some of the parameter values, +such as 'path' are arbitrary and should be replaced with +appropriate values for your site):</P ><P ><PRE CLASS="PROGRAMLISTING" >[print$] - path = /usr/local/samba/printers - guest ok = yes - browseable = yes - read only = yes - write list = ntadmin - </PRE + path = /usr/local/samba/printers + guest ok = yes + browseable = yes + read only = yes + write list = ntadmin</PRE ></P ><P >The <A @@ -182,70 +170,72 @@ TARGET="_top" ><TT CLASS="PARAMETER" ><I -> write list</I +>write list</I ></TT ></A > is used to allow administrative - level user accounts to have write access in order to update files - on the share. See the <A +level user accounts to have write access in order to update files +on the share. See the <A HREF="smb./conf.5.html" TARGET="_top" -> smb.conf(5) man page</A +>smb.conf(5) man page</A > for more information on - configuring file shares.</P +configuring file shares.</P ><P >The requirement for <A HREF="smb.conf.5.html#GUESTOK" TARGET="_top" ><B CLASS="COMMAND" -> guest ok = yes</B +>guest ok = yes</B ></A > depends upon how your - site is configured. If users will be guaranteed to have - an account on the Samba host, then this is a non-issue.</P +site is configured. If users will be guaranteed to have +an account on the Samba host, then this is a non-issue.</P +><DIV +CLASS="NOTE" +><BLOCKQUOTE +CLASS="NOTE" ><P -><I -CLASS="EMPHASIS" ->author's note: </I ->The non-issue is that - if all your Windows NT users are guarenteed to be authenticated - by the Samba server (such as a domain member server and the NT - user has already been validated by the Domain Controller in - order to logon to the Windows NT console), then guest access - is not necessary. Of course, in a workgroup environment where - you just want to be able to print without worrying about - silly accounts and security, then configure the share for - guest access. You'll probably want to add <A +><B +>Author's Note: </B +>The non-issue is that if all your Windows NT users are guaranteed to be +authenticated by the Samba server (such as a domain member server and the NT +user has already been validated by the Domain Controller in +order to logon to the Windows NT console), then guest access +is not necessary. Of course, in a workgroup environment where +you just want to be able to print without worrying about +silly accounts and security, then configure the share for +guest access. You'll probably want to add <A HREF="smb.conf.5.html#MAPTOGUEST" TARGET="_top" ><B CLASS="COMMAND" ->map to guest = Bad User - </B +>map to guest = Bad User</B ></A > in the [global] section as well. Make sure - you understand what this parameter does before using it - though. --jerry]</P +you understand what this parameter does before using it +though. --jerry</P +></BLOCKQUOTE +></DIV ><P >In order for a Windows NT print server to support - the downloading of driver files by multiple client architectures, - it must create subdirectories within the [print$] service - which correspond to each of the supported client architectures. - Samba follows this model as well.</P +the downloading of driver files by multiple client architectures, +it must create subdirectories within the [print$] service +which correspond to each of the supported client architectures. +Samba follows this model as well.</P ><P >Next create the directory tree below the [print$] share - for each architecture you wish to support.</P +for each architecture you wish to support.</P ><P ><PRE CLASS="PROGRAMLISTING" -> [print$]----- - |-W32X86 ; "Windows NT x86" - |-WIN40 ; "Windows 95/98" - |-W32ALPHA ; "Windows NT Alpha_AXP" - |-W32MIPS ; "Windows NT R4000" - |-W32PPC ; "Windows NT PowerPC" - </PRE +>[print$]----- + |-W32X86 ; "Windows NT x86" + |-WIN40 ; "Windows 95/98" + |-W32ALPHA ; "Windows NT Alpha_AXP" + |-W32MIPS ; "Windows NT R4000" + |-W32PPC ; "Windows NT PowerPC"</PRE ></P ><DIV CLASS="WARNING" @@ -259,38 +249,34 @@ WIDTH="100%" ><TD ALIGN="CENTER" ><B ->Warning</B +>ATTENTION! REQUIRED PERMISSIONS</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P -><I -CLASS="EMPHASIS" ->ATTENTION! REQUIRED PERMISSIONS</I -></P -><P >In order to currently add a new driver to you Samba host, - one of two conditions must hold true:</P + one of two conditions must hold true:</P ><P ></P ><UL ><LI ><P >The account used to connect to the Samba host - must have a uid of 0 (i.e. a root account)</P + must have a uid of 0 (i.e. a root account)</P ></LI ><LI ><P >The account used to connect to the Samba host - must be a member of the <A -HREF="smb.conf.5.html" + must be a member of the <A +HREF="smb.conf.5.html#PRINTERADMIN" TARGET="_top" ><TT CLASS="PARAMETER" ><I -> printer admin</I +>printer + admin</I ></TT ></A > list.</P @@ -298,97 +284,107 @@ CLASS="PARAMETER" ></UL ><P >Of course, the connected account must still possess access - to add files to the subdirectories beneath [print$].</P + to add files to the subdirectories beneath [print$].</P ></TD ></TR ></TABLE ></DIV ><P >Once you have created the required [print$] service and - associated subdirectories, simply log onto the Samba server using - a root (or <TT +associated subdirectories, simply log onto the Samba server using +a root (or <TT CLASS="PARAMETER" ><I >printer admin</I ></TT >) account - from a Windows NT 4.0 client. Navigate to the "Printers" folder - on the Samba server. You should see an initial listing of printers - that matches the printer shares defined on your Samba host.</P +from a Windows NT 4.0 client. Navigate to the "Printers" folder +on the Samba server. You should see an initial listing of printers +that matches the printer shares defined on your Samba host.</P +></DIV +><DIV +CLASS="SECT2" +><HR><H2 +CLASS="SECT2" +><A +NAME="AEN65" +>Setting Drivers for Existing Printers</A +></H2 ><P >The initial listing of printers in the Samba host's - Printers folder will have no printer driver assigned to them. - The way assign a driver to a printer is to view the Properties - of the printer and either</P +Printers folder will have no printer driver assigned to them. +The way assign a driver to a printer is to view the Properties +of the printer and either</P ><P ></P ><UL ><LI ><P >Use the "New Driver..." button to install - a new printer driver, or</P + a new printer driver, or</P ></LI ><LI ><P >Select a driver from the popup list of - installed drivers. Initially this list will be empty.</P + installed drivers. Initially this list will be empty.</P ></LI ></UL ><P >If you wish to install printer drivers for client - operating systems other than "Windows NT x86", you will need - to use the "Sharing" tab of the printer properties dialog.</P +operating systems other than "Windows NT x86", you will need +to use the "Sharing" tab of the printer properties dialog.</P ><P >Assuming you have connected with a root account, you - will also be able modify other printer properties such as - ACLs and device settings using this dialog box.</P +will also be able modify other printer properties such as +ACLs and device settings using this dialog box.</P ><P >A few closing comments for this section, it is possible - on a Windows NT print server to have printers - listed in the Printers folder which are not shared. Samba does - not make this distinction. By definition, the only printers of - which Samba is aware are those which are specified as shares in - <TT +on a Windows NT print server to have printers +listed in the Printers folder which are not shared. Samba does +not make this distinction. By definition, the only printers of +which Samba is aware are those which are specified as shares in +<TT CLASS="FILENAME" >smb.conf</TT >.</P ><P >Another interesting side note is that Windows NT clients do - not use the SMB printer share, but rather can print directly - to any printer on another Windows NT host using MS-RPC. This - of course assumes that the printing client has the necessary - privileges on the remote host serving the printer. The default - permissions assigned by Windows NT to a printer gives the "Print" - permissions to the "Everyone" well-known group.</P +not use the SMB printer share, but rather can print directly +to any printer on another Windows NT host using MS-RPC. This +of course assumes that the printing client has the necessary +privileges on the remote host serving the printer. The default +permissions assigned by Windows NT to a printer gives the "Print" +permissions to the "Everyone" well-known group.</P +></DIV ><DIV CLASS="SECT2" ><HR><H2 CLASS="SECT2" ><A -NAME="AEN74" +NAME="AEN78" >Support a large number of printers</A ></H2 ><P >One issue that has arisen during the development - phase of Samba 2.2 is the need to support driver downloads for - 100's of printers. Using the Windows NT APW is somewhat - awkward to say the list. If more than one printer are using the - same driver, the <A +phase of Samba 2.2 is the need to support driver downloads for +100's of printers. Using the Windows NT APW is somewhat +awkward to say the list. If more than one printer are using the +same driver, the <A HREF="rpcclient.1.html" TARGET="_top" ><B CLASS="COMMAND" >rpcclient's - setdriver command</B +setdriver command</B ></A > can be used to set the driver - associated with an installed driver. The following is example - of how this could be accomplished:</P +associated with an installed driver. The following is example +of how this could be accomplished:</P ><P ><PRE CLASS="PROGRAMLISTING" > - <TT +<TT CLASS="PROMPT" >$ </TT >rpcclient pogo -U root%secret -c "enumdrivers" @@ -396,44 +392,185 @@ Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3] [Windows NT x86] Printer Driver Info 1: - Driver Name: [HP LaserJet 4000 Series PS] + Driver Name: [HP LaserJet 4000 Series PS] Printer Driver Info 1: - Driver Name: [HP LaserJet 2100 Series PS] + Driver Name: [HP LaserJet 2100 Series PS] Printer Driver Info 1: - Driver Name: [HP LaserJet 4Si/4SiMX PS] + Driver Name: [HP LaserJet 4Si/4SiMX PS] - <TT +<TT CLASS="PROMPT" >$ </TT >rpcclient pogo -U root%secret -c "enumprinters" Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3] - flags:[0x800000] - name:[\\POGO\hp-print] - description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,] - comment:[] + flags:[0x800000] + name:[\\POGO\hp-print] + description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,] + comment:[] - <TT +<TT CLASS="PROMPT" >$ </TT >rpcclient pogo -U root%bleaK.er \ - <TT +<TT CLASS="PROMPT" >> </TT > -c "setdriver hp-print \"HP LaserJet 4000 Series PS\"" Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3] -Succesfully set hp-print to driver HP LaserJet 4000 Series PS. - </PRE +Successfully set hp-print to driver HP LaserJet 4000 Series PS.</PRE ></P ></DIV +><DIV +CLASS="SECT2" +><HR><H2 +CLASS="SECT2" +><A +NAME="AEN89" +>Adding New Printers via the Windows NT APW</A +></H2 +><P +>By default, Samba offers all printer shares defined in <TT +CLASS="FILENAME" +>smb.conf</TT +> +in the "Printers..." folder. Also existing in this folder is the Windows NT +Add Printer Wizard icon. The APW will be show only if</P +><P +></P +><UL +><LI +><P +>The connected user is able to successfully + execute an OpenPrinterEx(\\server) with administrative + priviledges (i.e. root or <TT +CLASS="PARAMETER" +><I +>printer admin</I +></TT +>. + </P +></LI +><LI +><P +><A +HREF="smb.conf.5.html#SHOWADDPRINTERWIZARD" +TARGET="_top" +><TT +CLASS="PARAMETER" +><I +>show + add printer wizard = yes</I +></TT +></A +> (the default). + </P +></LI +></UL +><P +>In order to be able to use the APW to successfully add a printer to a Samba +server, the <A +HREF="smb.conf.5.html#ADDPRINTERCOMMAND" +TARGET="_top" +><TT +CLASS="PARAMETER" +><I +>addprinter +command</I +></TT +></A +> must have a defined value. The program +hook must successfully add the printer to the system (i.e. +<TT +CLASS="FILENAME" +>/etc/printcap</TT +> or appropriate files) and +<TT +CLASS="FILENAME" +>smb.conf</TT +> if necessary.</P +><P +>When using the APW from a client, if the named printer share does +not exist, <B +CLASS="COMMAND" +>smbd</B +> will execute the <TT +CLASS="PARAMETER" +><I +>add printer +program</I +></TT +> and reparse to the <TT +CLASS="FILENAME" +>smb.conf</TT +> +to attempt to locate the new printer share. If the share is still not defined, +an error of "Access Denied" is returned to the client. Note that the +<TT +CLASS="PARAMETER" +><I +>add printer program</I +></TT +> is executed undet the context +of the connected user, not necessarily a root account.</P +><P +>There is a complementing <A +HREF="smb.conf.5.html#DELETEPRINTERCOMMAND" +TARGET="_top" +><TT +CLASS="PARAMETER" +><I +>deleteprinter +command</I +></TT +></A +> for removing entries from the "Printers..." +folder.</P +></DIV +><DIV +CLASS="SECT2" +><HR><H2 +CLASS="SECT2" +><A +NAME="AEN114" +>Samba and Printer Ports</A +></H2 +><P +>Windows NT/2000 print servers associate a port with each printer. These normally +take the form of LPT1:, COM1:, FILE:, etc... Samba must also support the +concept of ports associated with a printer. By default, only one printer port, +named "Samba Printer Port", exists on a system. Samba does not really a port in +order to print, rather it is a requirement of Windows clients. </P +><P +>Note that Samba does not support the concept of "Printer Pooling" internally +either. This is when a logical printer is assigned to multiple ports as +a form of load balancing or fail over.</P +><P +>If you require that multiple ports be defined for some reason, +<TT +CLASS="FILENAME" +>smb.conf</TT +> possesses a <A +HREF="smb.conf.5.html#ENUMPORTSCOMMAND" +TARGET="_top" +><TT +CLASS="PARAMETER" +><I +>enumports +command</I +></TT +></A +> which can be used to define an external program +that generates a listing of ports on a system.</P +></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H1 CLASS="SECT1" ><A -NAME="AEN85" +NAME="AEN122" >The Imprints Toolset</A ></H1 ><P @@ -451,7 +588,7 @@ CLASS="SECT2" ><HR><H2 CLASS="SECT2" ><A -NAME="AEN89" +NAME="AEN126" >What is Imprints?</A ></H2 ><P @@ -483,7 +620,7 @@ CLASS="SECT2" ><HR><H2 CLASS="SECT2" ><A -NAME="AEN99" +NAME="AEN136" >Creating Printer Driver Packages</A ></H2 ><P @@ -499,7 +636,7 @@ CLASS="SECT2" ><HR><H2 CLASS="SECT2" ><A -NAME="AEN102" +NAME="AEN139" >The Imprints server</A ></H2 ><P @@ -520,7 +657,7 @@ CLASS="SECT2" ><HR><H2 CLASS="SECT2" ><A -NAME="AEN106" +NAME="AEN143" >The Installation Client</A ></H2 ><P @@ -565,17 +702,16 @@ CLASS="COMMAND" ><PRE CLASS="PROGRAMLISTING" > - foreach (supported architecture for a given driver) - { - 1. rpcclient: Get the appropriate upload directory - on the remote server - 2. smbclient: Upload the driver files - 3. rpcclient: Issues an AddPrinterDriver() MS-RPC - } +foreach (supported architecture for a given driver) +{ + 1. rpcclient: Get the appropriate upload directory + on the remote server + 2. smbclient: Upload the driver files + 3. rpcclient: Issues an AddPrinterDriver() MS-RPC +} - 4. rpcclient: Issue an AddPrinterEx() MS-RPC to actually - create the printer - </PRE +4. rpcclient: Issue an AddPrinterEx() MS-RPC to actually + create the printer</PRE ></P ><P >One of the problems encountered when implementing @@ -615,7 +751,7 @@ CLASS="SECT1" ><HR><H1 CLASS="SECT1" ><A -NAME="AEN128" +NAME="AEN165" ><A NAME="MIGRATION" ></A @@ -639,7 +775,7 @@ WIDTH="100%" ><TD ALIGN="CENTER" ><B ->Warning</B +>Achtung!</B ></TD ></TR ><TR @@ -725,15 +861,24 @@ CLASS="COMMAND" ><P >If you want to migrate an existing <TT CLASS="FILENAME" -> printers.def</TT -> file into the new setup, the current only +>printers.def</TT +> + file into the new setup, the current only solution is to use the Windows NT APW to install the NT drivers - and the 9x drivers. This can be scripted using smbclient and - rpcclient. See the <A + and the 9x drivers. This can be scripted using <B +CLASS="COMMAND" +>smbclient</B +> + and <B +CLASS="COMMAND" +>rpcclient</B +>. See the + Imprints installation client at <A HREF="http://imprints.sourceforge.net/" TARGET="_top" -> Imprints insrallation client</A -> for an example. +>http://imprints.sourceforge.net/</A +> + for an example. </P ></LI ></UL |