From 275d1a4a13c9521b8690754fd36579f950178e2d Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Mon, 2 Jun 2003 05:52:24 +0000 Subject: A few little edits to clean up style and to blend this into current doc format. (This used to be commit ea32dd07ca130da85df2f1ff95d4808bc87e669c) --- docs/docbook/projdoc/printer_driver2.xml | 188 +++++++++++++++---------------- 1 file changed, 91 insertions(+), 97 deletions(-) (limited to 'docs') diff --git a/docs/docbook/projdoc/printer_driver2.xml b/docs/docbook/projdoc/printer_driver2.xml index c7188d783a..4fb7a019df 100644 --- a/docs/docbook/projdoc/printer_driver2.xml +++ b/docs/docbook/projdoc/printer_driver2.xml @@ -8,16 +8,12 @@
kpfeifle@danka.de
- (23 May 2003) + May 32, 2003 -Classical Printing Support in Samba 3.0 +Classical Printing Support -Introduction - - - Features and Benefits @@ -66,8 +62,6 @@ again. - - @@ -158,12 +152,12 @@ this (if you run it) and tell you so. Parameters Recommended for Use The following smb.conf parameters directly -related to printing are used in Samba 3.0. See also the +related to printing are used in Samba-3. See also the smb.conf man page for detailed explanations: -LIST OF PRINTING RELATED PARAMETERS IN SAMBA-3.0 +LIST OF PRINTING RELATED PARAMETERS IN Samba-3 Global level parameters: addprinter command (G) @@ -258,12 +252,12 @@ announced some time ago). Here is a list of them: -"OLD" PARAMETERS, REMOVED IN SAMBA-3.0 +"OLD" PARAMETERS, REMOVED IN Samba-3 The following smb.conf parameters have been deprecated already in Samba 2.2 and are now completely removed from -Samba 3.0. You cannot use them in new 3.0 installations: +Samba-3. You cannot use them in new 3.0 installations: printer driver file (G) @@ -280,7 +274,7 @@ Samba 3.0. You cannot use them in new 3.0 installations: -A simple Configuration to Print with Samba 3.0 +A simple Configuration to Print with Samba-3 Here is a very simple example configuration for print related settings @@ -293,7 +287,7 @@ However, in many environments these are enough to provide a valid smb.conf which enables all clients to print. - + [global] printing = bsd load printers = yes @@ -303,7 +297,7 @@ However, in many environments these are enough to provide a valid printable = yes public = yes writable = no - + This is only an example configuration. Many settings, if not @@ -340,7 +334,7 @@ setup, with exactly the same settings in smb.conf as shown above: - + transmeta: # testparm -v | egrep "(lp|print|spool|driver|ports|\[)" @@ -379,7 +373,7 @@ as shown above: path = /var/spool/samba printable = Yes - + You can easily verify which settings were implicitly added by Samba's @@ -405,7 +399,7 @@ try to just "comment out" the load printers" parameter. If your 2.2.x system behaves like mine, you'll see this: - + kde-bitshop:/etc/samba # grep "load printers" smb.conf # load printers = Yes @@ -414,7 +408,7 @@ parameter. If your 2.2.x system behaves like mine, you'll see this: kde-bitshop:/etc/samba # testparm -v smb.conf | egrep "(load printers)" load printers = Yes - + Despite my imagination that the commenting out of this setting should @@ -423,7 +417,7 @@ cost me quite some time to find out the reason. But I am not fooled any more... at least not by this ;-) - + kde-bitshop:/etc/samba # grep -A1 "load printers" smb.conf load printers = No @@ -434,7 +428,7 @@ any more... at least not by this ;-) kde-bitshop:/etc/samba # testparm -v smb.conf.simpleprinting | egrep "(load printers)" load printers = No - + Only when setting the parameter explicitly to @@ -458,12 +452,12 @@ You can have a working Samba print configuration with this minimal smb.conf: - + kde-bitshop:/etc/samba # cat /etc/samba/smb.conf-minimal [printers] - + This example should show you that you can use testparm to test any @@ -481,7 +475,7 @@ would be, if you used this minimalistic file as your real smb.conf: - + kde-bitshop:~ # testparm -v /etc/samba/smb.conf-minimal | egrep "(print|lpq|spool|driver|ports|[)" Processing section "[printers]" @@ -510,7 +504,7 @@ would be, if you used this minimalistic file as your real [printers] printable = Yes - + testparm issued 2 warnings: @@ -542,9 +536,9 @@ in a parameter value is retained verbatim. This means that a line consisting of, for example, - + printing =lprng #This defines LPRng as the printing system" - + will regard the whole of the string after the "=" @@ -555,7 +549,7 @@ that will be ignored, and a default value used instead.] -Extended Sample Configuration to Print with Samba 3.0 +Extended Sample Configuration to Print with Samba-3 Here we show a more verbose example configuration for print related @@ -578,7 +572,7 @@ connection spawns an smbd process of its own, so it is not a bad idea to optimize the smb.conf in environments with hundreds or thousands of clients. - + [global] printing = bsd load printers = yes @@ -609,7 +603,7 @@ hundreds or thousands of clients. hosts allow = 0.0.0.0 hosts deny = turbo_xp, 10.160.50.23, 10.160.51.60 guest ok = no - + This also is only an example configuration. You @@ -799,9 +793,9 @@ privilege to be able to print. Test this by logging in as your guest user using "su - guest" and run a system print command like - + lpr -P printername /etc/motd - + @@ -1138,11 +1132,11 @@ remove it. Note that ';' is the usual separator for commands in shell scripts: - + > /tmp/print.log; lpr -P %p %s; rm %s ]]> - + You may have to vary your own command considerably from this example @@ -1151,9 +1145,9 @@ for the print command parameter varies depending on the s the printing parameter. Another example is: - + print command = /usr/local/samba/bin/myprintscript %p %s - + @@ -1203,7 +1197,7 @@ files). -One other benefit of an update is this: Samba 3.0 is able to publish +One other benefit of an update is this: Samba-3 is able to publish all its printers in Active Directory (or LDAP)! @@ -1284,7 +1278,7 @@ is responsible for all further processing, if needed. -The [printer$] Section is removed from Samba 3.0 +The [printer$] Section is removed from Samba-3 <parameter>[print$]</parameter> vs. <parameter>[printer$]</parameter> @@ -1338,7 +1332,7 @@ parameter values, such as 'path' are arbitrary and should be replaced with appropriate values for your site): </para> -<para><programlisting> +<para><screen> [global] ; members of the ntadmin group should be able to add drivers and set ; printer properties. root is implicitly always a 'printer admin'. @@ -1355,7 +1349,7 @@ with appropriate values for your site): guest ok = yes read only = yes write list = @ntadmin, root -</programlisting></para> +</screen></para> <para> Of course, you also need to ensure that the directory named by the @@ -1460,7 +1454,7 @@ Therefore, create a directory tree below the to support. </para> -<para><programlisting> +<para><screen> [print$]--+-- |--W32X86 # serves drivers to "Windows NT x86" @@ -1469,7 +1463,7 @@ to support. |--W32MIPS # serves drivers to "Windows NT R4000" |--W32PPC # serves drivers to "Windows NT PowerPC" -</programlisting></para> +</screen></para> <important><title>REQUIRED PERMISSIONS @@ -1547,7 +1541,7 @@ entrance to this realm seems a little bit weird at first). The initial listing of printers in the Samba host's Printers folder accessed from a client's Explorer will have no real printer driver assigned to them. By default, in -Samba 3.0 (as in 2.2.1 and later) this driver name is set to a NULL +Samba-3 (as in 2.2.1 and later) this driver name is set to a NULL string. This must be changed now. The local Add Printer Wizard, run from NT/2000/XP clients, will help us in this task. @@ -1698,7 +1692,7 @@ printers and drivers. Note the different quotes used to overcome the different spaces in between words: - + kde-bitshop:~# rpcclient -U'Danka%xxxx' -c 'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP cmd = getdriver "Heidelberg Digimaster 9110 (PS)" 3 @@ -1729,7 +1723,7 @@ different spaces in between words: Monitorname: [] Defaultdatatype: [] - + You may notice, that this driver has quite a big number of @@ -1777,7 +1771,7 @@ names which were leaked to us by getdriver. The listing is edited to include linebreaks for readability: - + kde-bitshop:~# smbclient //TURBO_XP/print\$ -U'Danka%xxxx' \ -c 'cd W32X86/2;mget HD*_de.* \ @@ -1794,7 +1788,7 @@ listing is edited to include linebreaks for readability: (average 737.3 kb/s) [...,] - + After this command is complete, the files are in our current local @@ -1847,7 +1841,7 @@ store the files into a Samba/UNIX print server's [print$] share... - + kde-bitshop:~# smbclient //SAMBA-CUPS/print\$ -U'root%xxxx' -c 'cd W32X86; put HDNIS01_de.DLL; \ put Hddm91c1_de.ppd; put HDNIS01U_de.DLL; \ @@ -1878,7 +1872,7 @@ store the files into a Samba/UNIX print server's putting file HDNIS01Aux.dll as \W32X86\HDNIS01Aux.dll (14994.6 kb/s) (average 11405.2 kb/s) putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF (23390.2 kb/s) (average 13170.8 kb/s) - + Phewww -- that was a lot of typing! Most drivers are a lot smaller -- @@ -1903,7 +1897,7 @@ For now we verify that our files are there. This can be done with also and do this through a standard UNIX shell access too): - + kde-bitshop:~# smbclient //SAMBA-CUPS/print\$ -U 'root%xxxx' -c 'cd W32X86; pwd; dir; cd 2; pwd; dir' added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 @@ -1941,7 +1935,7 @@ also and do this through a standard UNIX shell access too): PDFcreator2.PPD A 15746 Sun Apr 20 22:24:07 2003 40976 blocks of size 262144. 709 blocks available - + Notice that there are already driver files present in the @@ -1971,7 +1965,7 @@ database files. The following command and its output has been edited, again, for readability: - + kde-bitshop:~# rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" "dm9110:HDNIS01_de.DLL: \ Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \ @@ -1989,7 +1983,7 @@ again, for readability: Printer Driver dm9110 successfully installed. - + After this step the driver should be recognized by Samba on the print @@ -2017,7 +2011,7 @@ subdirectory. You can check this again with smbclient: - + kde-bitshop:~# smbclient //SAMBA-CUPS/print\$ -Uroot%xxxx -c 'cd W32X86;dir;pwd;cd 2;dir;pwd' added interface ip=10.160.51.162 bcast=10.160.51.255 nmask=255.255.252.0 @@ -2055,7 +2049,7 @@ subdirectory. You can check this again with Hddm91c1_de_reg.HLP A 228417 Sun May 4 04:32:18 2003 40976 blocks of size 262144. 731 blocks available - + Another verification is that the timestamp of the printing TDB files @@ -2102,9 +2096,9 @@ tab).. An alternative, much quicker method for Windows course adapt the name to your Samba server instead of SAMBA-CUPS): - + rundll32 printui.dll,PrintUIEntry /s /t2 /n\\SAMBA-CUPS - + from a UNIX prompt run this command (or a variant @@ -2112,9 +2106,9 @@ thereof), where "SAMBA-CUPS" is the name of the Samba host and "xxxx" represents the actual Samba password assigned to root: - + rpcclient -U'root%xxxx' -c 'enumdrivers' SAMBA-CUPS - + You will see a listing of all drivers Samba knows about. Your new one @@ -2140,7 +2134,7 @@ You can name the driver as you like. If you repeat the with a different driver name, it will work the same: - + kde-bitshop:~# rpcclient -Uroot%xxxx \ -c 'adddriver "Windows NT x86" \ @@ -2160,7 +2154,7 @@ with a different driver name, it will work the same: Printer Driver myphantasydrivername successfully installed. - + You will also be able to bind that driver to any print queue (however, @@ -2186,22 +2180,22 @@ store this info in its "memory", the TDB files. The rpcclient setdriver command achieves exactly this: - + kde-bitshop:~# rpcclient -U'root%xxxx' -c 'setdriver dm9110 myphantasydrivername' SAMBA-CUPS cmd = setdriver dm9110 myphantasydrivername Successfully set dm9110 to driver myphantasydrivername. - + Ahhhhh -- no, I didn't want to do that. Repeat, this time with the name I intended: - + kde-bitshop:~# rpcclient -U'root%xxxx' -c 'setdriver dm9110 dm9110' SAMBA-CUPS cmd = setdriver dm9110 dm9110 Succesfully set dm9110 to driver dm9110. - + The syntax of the command is rpcclient -U'root%sambapassword' @@ -2243,9 +2237,9 @@ guarantee that your connection is not unwittingly mapped to bad user "nobody". In a DOS box type: - + net use \\SAMBA-SERVER\print$ /user:root - + Replace root, if needed, by another valid 'printer admin' user as @@ -2437,17 +2431,17 @@ You can also open your local "Printers and Faxes" folder by using this command on Windows 2000 and Windows XP Professional workstations: - + rundll32 shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder - + or this command on Windows NT 4.0 workstations: - + rundll32 shell32.dll,Control_RunDLL MAIN.CPL @2 - + You can enter the commands either inside a "DOS box" window or in the @@ -2490,9 +2484,9 @@ To connect as root to a Samba printer, try this command from a Windows 2K/XP DOS box command prompt: - + runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /p /t3 /n \\SAMBA-SERVER\printername" - + You will be prompted for root's Samba-password; type it, wait a few @@ -2651,18 +2645,18 @@ for all users! with the right privileges): - + rundll32 printui.dll,PrintUIEntry /p /t3 /n\\SAMBA-SERVER\printersharename - + to see the tab with the Printing Defaults... button (the one you need). Also run this command: - + rundll32 printui.dll,PrintUIEntry /p /t0 /n\\SAMBA-SERVER\printersharename - + to see the tab with the Printing Preferences... @@ -2697,7 +2691,7 @@ conduct the adddriver again and again). The following is an example of how this could be accomplished: - + ---------------------------------------------------------------------------------- $ rpcclient SAMBA-CUPS -U root%secret -c 'enumdrivers' @@ -2764,7 +2758,7 @@ following is an example of how this could be accomplished: [....] ---------------------------------------------------------------------------------- - + It may be not easy to recognize: but the first call to @@ -2797,9 +2791,9 @@ privileges (i.e. root or printer admin). Try this from a Windows 2K/XP DOS box command prompt: - + runas /netonly /user:root rundll32 printui.dll,PrintUIEntry /p /t0 /n \\SAMBA-SERVER\printersharename - + and click on Printing Preferences... @@ -2935,7 +2929,7 @@ Note: the version-0 set contained 40 (!) reasons: - + kde4@kde-bitshop:# rpcclient -U 'Administrator%xxxx' -c 'enumdrivers 3' 10.160.50.8 @@ -2994,7 +2988,7 @@ reasons: Monitorname: [CPCA Language Monitor2] Defaultdatatype: [] - + If we write the "version 2" files and the "version 3" files @@ -3002,7 +2996,7 @@ into different text files and compare the result, we see this picture: - + - + Don't be fooled though! Driver files for each version with identical @@ -3040,7 +3034,7 @@ names may be different in their content, as you can see from this size comparison: - + kde4@kde-bitshop:# for i in cns3g.hlp cns3gui.dll cns3g.dll; do \ smbclient //10.160.50.8/print\$ -U 'Administrator%xxxx' \ @@ -3056,7 +3050,7 @@ comparison: CNS3G.DLL A 1145088 Thu May 30 02:31:00 2002 CNS3G.DLL A 15872 Thu May 30 02:31:00 2002 - + In my example were even more differences than shown here. Conclusion: @@ -3215,7 +3209,7 @@ The basic installation process is in four steps and perl code is wrapped around smbclient and rpcclient - + foreach (supported architecture for a given driver) { @@ -3228,7 +3222,7 @@ wrapped around smbclient and rpcclient 4. rpcclient: Issue an AddPrinterEx() MS-RPC to actually create the printer - + One of the problems encountered when implementing the Imprints tool @@ -3245,9 +3239,9 @@ Properties dialog only includes space for one printer driver name. A quick look in the Windows NT 4.0 system registry at - + HKLM\System\CurrentControlSet\Control\Print\Environment - + will reveal that Windows NT always uses the NT driver name. This is @@ -3284,9 +3278,9 @@ if integrated in Logon Scripts. You can see what options are available by typing in a command prompt ("DOS box") this: - + rundll32 printui.dll,PrintUIEntry /? - + A window pops up which shows you all of the commandline switches @@ -3298,11 +3292,11 @@ what the lines actually do (it works if 2k/XP Windows clients access printers via Samba, but works for Windows-based print servers too): - + rundll32 printui.dll,PrintUIEntry /dn /n "\\sambacupsserver\infotec2105-IPDS" /q rundll32 printui.dll,PrintUIEntry /in /n "\\sambacupsserver\infotec2105-PS" rundll32 printui.dll,PrintUIEntry /y /n "\\sambacupsserver\infotec2105-PS" - + Here is a list of the used commandline parameters: @@ -3327,7 +3321,7 @@ Here is a list of the used commandline parameters: -I have tested this with a Samba 2.2.7a and a Samba 3.0alpha24 +I have tested this with a Samba 2.2.7a and a Samba-3alpha24 installation and Windows XP Professional clients. Note that this specific command set works with network print queues (installing local print queues requires different parameters, but this is of no @@ -3420,7 +3414,7 @@ create a new printer on Samba and the UNIX print subsystem! -Migration of "Classical" printing to Samba 3.0 +Migration of "Classical" printing to Samba-3 The basic "NT-style" printer driver management has not changed -- cgit