summaryrefslogtreecommitdiff
path: root/docs/docbook/projdoc/printer_driver2.sgml
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-06-01 11:50:38 +0000
committerGerald Carter <jerry@samba.org>2001-06-01 11:50:38 +0000
commit05b2b2cdd4895b6d2a4d345192bfd4fed1e0ec25 (patch)
tree0c08619346abcac14ae3eb579b60e8c58bf84822 /docs/docbook/projdoc/printer_driver2.sgml
parente07b85ab195509cd1bd83e813ecf464f5629c566 (diff)
downloadsamba-05b2b2cdd4895b6d2a4d345192bfd4fed1e0ec25.tar.gz
samba-05b2b2cdd4895b6d2a4d345192bfd4fed1e0ec25.tar.bz2
samba-05b2b2cdd4895b6d2a4d345192bfd4fed1e0ec25.zip
syncing up with SAMBA_2_2
(This used to be commit 1bc58c21b15fcdb0a504d051f60e20c4e24441e6)
Diffstat (limited to 'docs/docbook/projdoc/printer_driver2.sgml')
-rw-r--r--docs/docbook/projdoc/printer_driver2.sgml341
1 files changed, 247 insertions, 94 deletions
diff --git a/docs/docbook/projdoc/printer_driver2.sgml b/docs/docbook/projdoc/printer_driver2.sgml
index 7f0aebc45f..51471ae690 100644
--- a/docs/docbook/projdoc/printer_driver2.sgml
+++ b/docs/docbook/projdoc/printer_driver2.sgml
@@ -13,7 +13,7 @@
</author>
- <pubdate> (20 Apr 2001) </pubdate>
+ <pubdate> (3 May 2001) </pubdate>
</chapterinfo>
<title>Printing Support in Samba 2.2.x</title>
@@ -55,17 +55,42 @@ SPOOLSS support includes:</para>
information</para></listitem>
</itemizedlist>
+<para>
+There has been some initial confusion about what all this means
+and whether or not it is a requirement for printer drivers to be
+installed on a Samba host in order to support printing from Windows
+clients. A bug existed in Samba 2.2.0 which made Windows NT/2000 clients
+require that the Samba server possess a valid driver for the printer.
+This is fixed in Samba 2.2.1 and once again, Windows NT/2000 clients
+can use the local APW for installing drivers to be used with a Samba
+served printer. This is the same behavior exhibited by Windows 9x clients.
+As a side note, Samba does not use these drivers in any way to process
+spooled files. They are utilized entirely by the clients.
+</para>
+
+<para>
+The following MS KB article, may be of some help if you are dealing with
+Windows 2000 clients: <emphasis>How to Add Printers with No User
+Interaction in Windows 2000</emphasis>
+</para>
+
+<para>
+<ulink url="http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP">http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP</ulink>
+</para>
+
</sect1>
<sect1>
<title>Configuration</title>
+<warning>
+<title>[print$] vs. [printer$]</title>
+
<para>
-<emphasis>WARNING!!!</emphasis> 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
+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.
</para>
@@ -81,13 +106,13 @@ the client.
</para>
<para>
-These parameters, including <parameter>printer driver
+These parameters, including <parameter>printer driver
file</parameter> parameter, are being depreciated and should not
be used in new installations. For more information on this change,
-you should refer to the <link linkend="MIGRATION">Migration section
-</link>of this document.
+you should refer to the <link linkend="MIGRATION">Migration section</link>
+of this document.
</para>
-
+</warning>
<sect2>
<title>Creating [print$]</title>
@@ -112,18 +137,22 @@ appropriate values for your site):</para>
guest ok = yes
browseable = yes
read only = yes
+ ; since this share is configured as read only, then we need
+ ; a 'write list'. Check the file system permissions to make
+ ; sure this account can copy files to the share. If this
+ ; is setup to a non-root account, then it should also exist
+ ; as a 'printer admin'
write list = ntadmin
</programlisting></para>
<para>The <ulink url="smb.conf.5.html#WRITELIST"><parameter>
write list</parameter></ulink> is used to allow administrative
level user accounts to have write access in order to update files
-on the share. See the <ulink url="smb./conf.5.html">
-smb.conf(5) man page</ulink> for more information on
-configuring file shares.</para>
+on the share. See the <ulink url="smb./conf.5.html">smb.conf(5)
+man page</ulink> for more information on configuring file shares.</para>
-<para>The requirement for <ulink url="smb.conf.5.html#GUESTOK"><command>
-guest ok = yes</command></ulink> depends upon how your
+<para>The requirement for <ulink url="smb.conf.5.html#GUESTOK"><command>guest
+ok = yes</command></ulink> 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.</para>
@@ -165,27 +194,33 @@ for each architecture you wish to support.</para>
</programlisting></para>
<warning>
- <title>ATTENTION! REQUIRED PERMISSIONS</title>
+<title>ATTENTION! REQUIRED PERMISSIONS</title>
- <para>In order to currently add a new driver to you Samba host,
- one of two conditions must hold true:</para>
+<para>
+In order to currently add a new driver to you Samba host,
+one of two conditions must hold true:
+</para>
- <itemizedlist>
- <listitem><para>The account used to connect to the Samba host
- must have a uid of 0 (i.e. a root account)</para></listitem>
+<itemizedlist>
+ <listitem><para>The account used to connect to the Samba host
+ must have a uid of 0 (i.e. a root account)</para></listitem>
- <listitem><para>The account used to connect to the Samba host
- must be a member of the <ulink
- url="smb.conf.5.html#PRINTERADMIN"><parameter>printer
- admin</parameter></ulink> list.</para></listitem>
- </itemizedlist>
-
- <para>Of course, the connected account must still possess access
- to add files to the subdirectories beneath [print$].</para>
+ <listitem><para>The account used to connect to the Samba host
+ must be a member of the <ulink
+ url="smb.conf.5.html#PRINTERADMIN"><parameter>printer
+ admin</parameter></ulink> list.</para></listitem>
+</itemizedlist>
+
+<para>
+Of course, the connected account must still possess access
+to add files to the subdirectories beneath [print$]. Remember
+that all file shares are set to 'read only' by default.
+</para>
</warning>
-<para>Once you have created the required [print$] service and
+<para>
+Once you have created the required [print$] service and
associated subdirectories, simply log onto the Samba server using
a root (or <parameter>printer admin</parameter>) account
from a Windows NT 4.0 client. Navigate to the "Printers" folder
@@ -198,9 +233,27 @@ that matches the printer shares defined on your Samba host.
<title>Setting Drivers for Existing Printers</title>
<para>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</para>
+Printers folder will have no real printer driver assigned
+to them. By default, in Samba 2.2.0 this driver name was set to
+<emphasis>NO PRINTER DRIVER AVAILABLE FOR THIS PRINTER</emphasis>.
+Later versions changed this to a NULL string to allow the use
+tof the local Add Printer Wizard on NT/2000 clients.
+Attempting to view the printer properties for a printer
+which has this default driver assigned will result in
+the error message:</para>
+
+<para>
+<emphasis>Device settings cannot be displayed. The driver
+for the specified printer is not installed, only spooler
+properties will be displayed. Do you want to install the
+driver now?</emphasis>
+</para>
+
+<para>
+Click "No" in the error dialog and you will be presented with
+the printer properties window. The way assign a driver to a
+printer is to either
+</para>
<itemizedlist>
<listitem><para>Use the "New Driver..." button to install
@@ -271,7 +324,7 @@ Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]
comment:[]
-<prompt>$ </prompt>rpcclient pogo -U root%bleaK.er \
+<prompt>$ </prompt>rpcclient pogo -U root%secret \
<prompt>&gt; </prompt> -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""
Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
Successfully set hp-print to driver HP LaserJet 4000 Series PS.
@@ -292,7 +345,7 @@ Add Printer Wizard icon. The APW will be show only if
<itemizedlist>
<listitem><para>The connected user is able to successfully
execute an OpenPrinterEx(\\server) with administrative
- priviledges (i.e. root or <parameter>printer admin</parameter>.
+ priviledges (i.e. root or <parameter>printer admin</parameter>).
</para></listitem>
<listitem><para><ulink url="smb.conf.5.html#SHOWADDPRINTERWIZARD"><parameter>show
@@ -302,8 +355,8 @@ Add Printer Wizard icon. The APW will be show only if
<para>
In order to be able to use the APW to successfully add a printer to a Samba
-server, the <ulink url="smb.conf.5.html#ADDPRINTERCOMMAND"><parameter>addprinter
-command</parameter></ulink> must have a defined value. The program
+server, the <ulink url="smb.conf.5.html#ADDPRINTERCOMMAND"><parameter>add
+printer command</parameter></ulink> must have a defined value. The program
hook must successfully add the printer to the system (i.e.
<filename>/etc/printcap</filename> or appropriate files) and
<filename>smb.conf</filename> if necessary.
@@ -312,16 +365,16 @@ hook must successfully add the printer to the system (i.e.
<para>
When using the APW from a client, if the named printer share does
not exist, <command>smbd</command> will execute the <parameter>add printer
-program</parameter> and reparse to the <filename>smb.conf</filename>
+command</parameter> and reparse to the <filename>smb.conf</filename>
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
-<parameter>add printer program</parameter> is executed undet the context
+<parameter>add printer program</parameter> is executed under the context
of the connected user, not necessarily a root account.
</para>
<para>
-There is a complementing <ulink url="smb.conf.5.html#DELETEPRINTERCOMMAND"><parameter>deleteprinter
-command</parameter></ulink> for removing entries from the "Printers..."
+There is a complementing <ulink url="smb.conf.5.html#DELETEPRINTERCOMMAND"><parameter>delete
+printer command</parameter></ulink> for removing entries from the "Printers..."
folder.
</para>
@@ -473,7 +526,7 @@ foreach (supported architecture for a given driver)
</filename></para>
<para>will reveal that Windows NT always uses the NT driver
- name. The is ok as Windows NT always requires that at least
+ name. This is ok as Windows NT always requires that at least
the Windows NT version of the printer driver is present.
However, Samba does not have the requirement internally.
Therefore, how can you use the NT driver name if is has not
@@ -489,67 +542,167 @@ foreach (supported architecture for a given driver)
<sect1>
- <title><anchor id="MIGRATION">Migration to from Samba 2.0.x to
- 2.2.x</title>
-
- <para>Given that printer driver management has changed
- (we hope improved :) ) in 2.2.0 over prior releases,
- migration from an existing setup to 2.2.0 can follow
- several paths.</para>
+<title><anchor id="MIGRATION">Migration to from Samba 2.0.x to 2.2.x</title>
+
+<para>
+Given that printer driver management has changed (we hope improved) in
+2.2 over prior releases, migration from an existing setup to 2.2 can
+follow several paths.
+</para>
+
+<para>
+Windows clients have a tendency to remember things for quite a while.
+For example, if a Windows NT client has attached to a Samba 2.0 server,
+it will remember the server as a LanMan printer server. Upgrading
+the Samba host to 2.2 makes support for MSRPC printing possible, but
+the NT client will still remember the previous setting.
+</para>
+
+<para>
+In order to give an NT client printing "amesia" (only necessary if you
+want to use the newer MSRPC printing functionality in Samba), delete
+the registry keys associated with the print server contained in
+<constant>[HKLM\SYSTEM\CurrentControlSet\Control\Print]</constant>. The
+spooler service on the client should be stopped prior to doing this:
+</para>
+
+<para>
+<prompt>C:\WINNT\ ></prompt> <userinput>net stop spooler</userinput>
+</para>
+
+<para>
+<emphasis>All the normal disclaimers about editing the registry go
+here.</emphasis> Be careful, and know what you are doing.
+</para>
+
+<para>
+The spooler service should be restarted after you have finished
+removing the appropriate registry entries by replacing the
+<command>stop</command> command above with <command>start</command>.
+</para>
+
+<para>
+Windows 9x clients will continue to use LanMan printing calls
+with a 2.2 Samba server so there is no need to perform any of these
+modifications on non-NT clients.
+</para>
- <warning>
- <title>Achtung!</title>
- <para>The following smb.conf parameters are considered to be
- depreciated and will be removed soon. Do not use them
- in new installations</para>
+<warning>
+<title>Achtung!</title>
+
+<para>
+The following smb.conf parameters are considered to be depreciated and will
+be removed soon. Do not use them in new installations
+</para>
- <itemizedlist>
- <listitem><para><parameter>printer driver file (G)</parameter>
- </para></listitem>
+<itemizedlist>
+ <listitem><para><parameter>printer driver file (G)</parameter>
+ </para></listitem>
- <listitem><para><parameter>printer driver (S)</parameter>
- </para></listitem>
+ <listitem><para><parameter>printer driver (S)</parameter>
+ </para></listitem>
- <listitem><para><parameter>printer driver location (S)</parameter>
- </para></listitem>
- </itemizedlist>
- </warning>
+ <listitem><para><parameter>printer driver location (S)</parameter>
+ </para></listitem>
+</itemizedlist>
+</warning>
- <para>Here are the possible scenarios for supporting migration:</para>
+<para>
+Here are the possible scenarios for supporting migration:
+</para>
- <itemizedlist>
- <listitem><para>If you do not desire the new Windows NT
- print driver support, nothing needs to be done.
- All existing parameters work the same.</para></listitem>
-
- <listitem><para>If you want to take advantage of NT printer
- driver support but do not want to migrate the
- 9x drivers to the new setup, the leave the existing
- printers.def file. When smbd attempts to locate a
- 9x driver for the printer in the TDB and fails it
- will drop down to using the printers.def (and all
- associated parameters). The <command>make_printerdef</command>
- tool will also remain for backwards compatibility but will
- be moved to the "this tool is the old way of doing it"
- pile.</para></listitem>
-
- <listitem><para>If you install a Windows 9x driver for a printer
- on your Samba host (in the printing TDB), this information will
- take precedence and the three old printing parameters
- will be ignored (including print driver location).</para></listitem>
-
- <listitem><para>If you want to migrate an existing <filename>printers.def</filename>
- 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 <command>smbclient</command>
- and <command>rpcclient</command>. See the
- Imprints installation client at <ulink
- url="http://imprints.sourceforge.net/">http://imprints.sourceforge.net/</ulink>
- for an example.
- </para></listitem>
- </itemizedlist>
+<itemizedlist>
+ <listitem><para>If you do not desire the new Windows NT
+ print driver support, nothing needs to be done.
+ All existing parameters work the same.</para></listitem>
+
+ <listitem><para>If you want to take advantage of NT printer
+ driver support but do not want to migrate the
+ 9x drivers to the new setup, the leave the existing
+ printers.def file. When smbd attempts to locate a
+ 9x driver for the printer in the TDB and fails it
+ will drop down to using the printers.def (and all
+ associated parameters). The <command>make_printerdef</command>
+ tool will also remain for backwards compatibility but will
+ be moved to the "this tool is the old way of doing it"
+ pile.</para></listitem>
+
+ <listitem><para>If you install a Windows 9x driver for a printer
+ on your Samba host (in the printing TDB), this information will
+ take precedence and the three old printing parameters
+ will be ignored (including print driver location).</para></listitem>
+
+ <listitem><para>If you want to migrate an existing <filename>printers.def</filename>
+ 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 <command>smbclient</command> and <command>rpcclient</command>. See the
+ Imprints installation client at <ulink
+ url="http://imprints.sourceforge.net/">http://imprints.sourceforge.net/</ulink>
+ for an example.
+ </para></listitem>
+</itemizedlist>
</sect1>
+
+<!--
+
+ This comment from rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex()
+ needs to be added into a section probably. This is to remind me it needs
+ to be done. -jerry
+
+ /*
+ * If the openprinterex rpc call contains a devmode,
+ * it's a per-user one. This per-user devmode is derivated
+ * from the global devmode. Openprinterex() contains a per-user
+ * devmode for when you do EMF printing and spooling.
+ * In the EMF case, the NT workstation is only doing half the job
+ * of rendering the page. The other half is done by running the printer
+ * driver on the server.
+ * The EMF file doesn't contain the page description (paper size, orientation, ...).
+ * The EMF file only contains what is to be printed on the page.
+ * So in order for the server to know how to print, the NT client sends
+ * a devicemode attached to the openprinterex call.
+ * But this devicemode is short lived, it's only valid for the current print job.
+ *
+ * If Samba would have supported EMF spooling, this devicemode would
+ * have been attached to the handle, to sent it to the driver to correctly
+ * rasterize the EMF file.
+ *
+ * As Samba only supports RAW spooling, we only receive a ready-to-print file,
+ * we just act as a pass-thru between windows and the printer.
+ *
+ * In order to know that Samba supports only RAW spooling, NT has to call
+ * getprinter() at level 2 (attribute field) or NT has to call startdoc()
+ * and until NT sends a RAW job, we refuse it.
+ *
+ * But to call getprinter() or startdoc(), you first need a valid handle,
+ * and to get an handle you have to call openprintex(). Hence why you have
+ * a devicemode in the openprinterex() call.
+ *
+ *
+ * Differences between NT4 and NT 2000.
+ * NT4:
+ *
+ * On NT4, you only have a global devicemode. This global devicemode can be changed
+ * by the administrator (or by a user with enough privs). Everytime a user
+ * wants to print, the devicemode is resetted to the default. In Word, everytime
+ * you print, the printer's characteristics are always reset to the global devicemode.
+ *
+ * NT 2000:
+ *
+ * In W2K, there is the notion of per-user devicemode. The first time you use
+ * a printer, a per-user devicemode is build from the global devicemode.
+ * If you change your per-user devicemode, it is saved in the registry, under the
+ * H_KEY_CURRENT_KEY sub_tree. So that everytime you print, you have your default
+ * printer preferences available.
+ *
+ * To change the per-user devicemode: it's the "Printing Preferences ..." button
+ * on the General Tab of the printer properties windows.
+ *
+ * To change the global devicemode: it's the "Printing Defaults..." button
+ * on the Advanced Tab of the printer properties window.
+-->
+
</chapter>