From 527cd4c53cfa8ef6ccbcf01e5f69555b6bbebf19 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jun 2003 19:43:49 +0000 Subject: Large update for layout. Everything is consistent with the rest of the HOWTO now (This used to be commit 59cfa1ced486e98ebd49f5bb23c228435d174fc3) --- docs/docbook/projdoc/printer_driver2.xml | 708 +++++++++++++++---------------- 1 file changed, 343 insertions(+), 365 deletions(-) diff --git a/docs/docbook/projdoc/printer_driver2.xml b/docs/docbook/projdoc/printer_driver2.xml index f730b238bd..acf8584299 100644 --- a/docs/docbook/projdoc/printer_driver2.xml +++ b/docs/docbook/projdoc/printer_driver2.xml @@ -123,7 +123,7 @@ from the Samba spooling area. There are a number of configuration parameters in -smb.conf controlling Samba's printing + controlling Samba's printing behaviour. Please also refer to the man page for smb.conf to acquire an overview about these. As with other parameters, there are Global Level (tagged with a "G" in the listings) and @@ -134,7 +134,7 @@ Service Level ("S") parameters. Service Level Parameters These may go into the [global] section of -smb.conf. In this case they define the default +. In this case they define the default behaviour of all individual or service level shares (provided those don't have a different setting defined for the same parameter, thus overriding the global default). @@ -151,13 +151,13 @@ this (if you run it) and tell you so. Parameters Recommended for Use -The following smb.conf parameters directly +The following &smb.conf; parameters directly related to printing are used in Samba-3. See also the -smb.conf man page for detailed explanations: +&smb.conf; man page for detailed explanations: -LIST OF PRINTING RELATED PARAMETERS IN Samba-3 + List of printing related parameters in Samba-3 Global level parameters: addprinter command (G) @@ -209,7 +209,7 @@ follow further beneath. Two new parameters that were added in Samba 2.2.2, are still present in Samba-3.0. Both of these options are described in the -smb.conf(5) man page and are disabled by +&smb.conf; man page and are disabled by default. Use them with caution! @@ -229,7 +229,7 @@ not apply to Windows 95/98/ME clients. -PARAMETERS "FOR BACKWARD COMPATIBILITY ONLY", USE WITH CAUTION +Parameters "for backward compatibility only", use with caution @@ -243,7 +243,7 @@ not apply to Windows 95/98/ME clients. -Parameters no longer in Use +Parameters no longer in use Samba users upgrading from 2.2.x to 3.0 need to be aware that some @@ -252,10 +252,10 @@ announced some time ago). Here is a list of them: -"OLD" PARAMETERS, REMOVED IN Samba-3 +"old" parameters, removed in Samba-3 -The following smb.conf parameters have been +The following &smb.conf; parameters have been deprecated already in Samba 2.2 and are now completely removed from Samba-3. You cannot use them in new 3.0 installations: @@ -278,16 +278,16 @@ Samba-3. You cannot use them in new 3.0 installations: Here is a very simple example configuration for print related settings -in the smb.conf file. If you compare it with your -own system's smb.conf, you probably find some +in the file. If you compare it with your +own system's , you probably find some additional parameters included there (as pre-configured by your OS vendor). Further below is a discussion and explanation of the parameters. Note, that this example doesn't use many parameters. However, in many environments these are enough to provide a valid -smb.conf which enables all clients to print. + which enables all clients to print. - + [global] printing = bsd load printers = yes @@ -297,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 @@ -311,7 +311,7 @@ and more. You may want to pipe it through a pager program. The syntax for the configuration file is easy to grasp. You should -know that smb.conf is not very picky about its +know that is not very picky about its syntax. It has been explained elsewhere in this document. A short reminder: It even tolerates some spelling errors (like "browsable" instead of "browseable"). Most spelling is case-insensitive. Also, you @@ -330,13 +330,12 @@ including the implicitly used ones, try the command outlined below a nice overview about the running smbd's print configuration. (Note that this command does not show individually created printer shares, or the spooling paths in each case). Here is the output of my Samba -setup, with exactly the same settings in smb.conf +setup, with exactly the same settings in as shown above: - transmeta: # testparm -v | egrep "(lp|print|spool|driver|ports|\[)" - +&rootprompt;testparm -v | egrep "(lp|print|spool|driver|ports|\[)" Load smb config files from /etc/samba/smb.conf.simpleprinting Processing section "[homes]" Processing section "[printers]" @@ -382,7 +381,7 @@ be important in your future dealings with Samba. testparm in Samba-3.0 behaves differently from 2.2.x: used without the "-v" switch it only shows you the settings actually -written into smb.conf! To see the complete +written into ! To see the complete configuration used, add the "-v" parameter to testparm. @@ -399,12 +398,11 @@ parameter. If your 2.2.x system behaves like mine, you'll see this: - - kde-bitshop:/etc/samba # grep "load printers" smb.conf +&rootprompt;grep "load printers" /etc/samba/smb.conf # load printers = Yes # This setting is commented ooouuuuut!! - kde-bitshop:/etc/samba # testparm -v smb.conf | egrep "(load printers)" +&rootprompt;testparm -v /etc/samba/smb.conf | egrep "(load printers)" load printers = Yes @@ -417,14 +415,13 @@ any more... at least not by this ;-) - - kde-bitshop:/etc/samba # grep -A1 "load printers" smb.conf +&rootprompt;grep -A1 "load printers" /etc/samba/smb.conf load printers = No # This setting is what I mean!! # load printers = Yes # This setting is commented ooouuuuut!! - kde-bitshop:/etc/samba # testparm -v smb.conf.simpleprinting | egrep "(load printers)" +&rootprompt;testparm -v smb.conf.simpleprinting | egrep "(load printers)" load printers = No @@ -448,12 +445,11 @@ settings which might not reflect your intentions. You can have a working Samba print configuration with this -minimal smb.conf: +minimal : - - kde-bitshop:/etc/samba # cat /etc/samba/smb.conf-minimal +&rootprompt;cat /etc/samba/smb.conf-minimal [printers] @@ -462,21 +458,20 @@ minimal smb.conf: This example should show you that you can use testparm to test any filename for fitness as a Samba configuration. Actually, we want to encourage you not to change your -smb.conf on a working system (unless you know + on a working system (unless you know exactly what you are doing)! Don't rely on an assumption that changes will only take effect after you re-start smbd! This is not the -case. Samba re-reads its smb.conf every 60 +case. Samba re-reads its every 60 seconds and on each new client connection. You might have to face changes for your production clients that you didn't intend to apply at this time! You will now note a few more interesting things. Let's now ask testparm what the Samba print configuration 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|[)" +&rootprompt; testparm -v /etc/samba/smb.conf-minimal | egrep "(print|lpq|spool|driver|ports|[)" Processing section "[printers]" WARNING: [printers] service MUST be printable! No path in service printers - using /tmp @@ -527,7 +522,7 @@ your setup to be what you really want it to be. The outcome on your system may vary for some parameters, since you may have a Samba built with a different compile-time configuration. Warning: don't put a comment sign at -the end of a valid smb.conf line. It +the end of a valid line. It will cause the parameter to be ignored (just as if you had put the comment sign at the front). At first I regarded this as a bug in my Samba version(s). But the man page states: Internal whitespace @@ -552,14 +547,14 @@ that will be ignored, and a default value used instead.] Here we show a more verbose example configuration for print related -settings in an smb.conf. Below is a discussion +settings in an . Below is a discussion and explanation of the various parameters. We chose to use BSD-style printing here, because we guess it is still the most commonly used system on legacy Linux installations (new installs now predominantly have CUPS, which is discussed entirely in the next chapter of this document). Note, that this example explicitly names many parameters which don't need to be stated because they are set by default. You -might be able to do with a leaner smb.conf. +might be able to do with a leaner . if you read access it with the Samba Web Administration Tool (SWAT), @@ -568,10 +563,10 @@ that it doesn't contain any superfluous parameters and comments. SWAT organizes the file for best performance. Remember that each smbd re-reads the Samba configuration once a minute, and that each connection spawns an smbd process of its own, so it is not a bad idea -to optimize the smb.conf in environments with +to optimize the in environments with hundreds or thousands of clients. - + [global] printing = bsd load printers = yes @@ -602,12 +597,12 @@ 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 may not find all the settings in your own -smb.conf (as pre-configured by your OS + (as pre-configured by your OS vendor). Many configuration parameters, if not explicitly set to a specific value, are used and set by Samba implicitly to its own default, because these have been compiled in. To see all settings, let @@ -648,12 +643,14 @@ applicable for the BSD (a.k.a. RFC 1179 style or LPR/LPD) printing system. In general, the "printing" parameter informs Samba about the print subsystem it should expect. Samba supports CUPS, LPD, LPRNG, SYSV, HPUX, AIX, QNX and PLP. Each of these systems defaults to a -different "print command" (and other queue control -commands). Caution: The "printing" parameter is +different print command (and other queue control +commands). +The printing parameter is normally a service level parameter. Since it is included here in the [global] section, it will take effect for all printer shares that are not defined differently. Samba-3.0 no longer -supports the SOFTQ printing system. +supports the SOFTQ printing system. + load printers = yes this tells Samba to create automatically all @@ -670,10 +667,11 @@ publicly visible and available). show add printer wizard = yes this setting is normally enabled by default (even if the parameter is not written into the -smb.conf). It makes the "Add Printer Wizard" icon -show up in the "Printers" folder of the Samba host's share listing (as -shown in "Network Neighbourhood" or by the "net view" command). To -disable it, you need to explicitly set it to "no" (commenting it out +). It makes the Add Printer Wizard icon +show up in the Printers folder of the Samba host's +share listing (as shown in Network Neighbourhood or +by the net view command). To disable it, you need to +explicitly set it to no (commenting it out will not suffice!). The Add Printer Wizard lets you upload printer drivers to the [print$] share and associate it with a printer (if the respective queue exists there before the @@ -701,8 +699,8 @@ file is written: this is controlled by the "Printcap" directive of members of the ntadmin group should be able to add drivers and set printer properties ("ntadmin" is only an example name, it needs to be a valid UNIX group name); root is implicitly always a -'printer admin'. The "@" sign precedes group names in -smb.conf. A printer admin can do anything to +printer admin. The "@" sign precedes group names in +. A printer admin can do anything to printers via the remote administration interfaces offered by MS-RPC (see below). Note that the printer admin parameter is normally a share level parameter, so you may associate @@ -718,12 +716,13 @@ reduces load on a heavily used print server. use client driver = no - if set to "yes", this setting only takes effect for -Win NT/2k/XP clients (and not for Win 95/98/ME). Its default value is -"No" (or "False"). It must not be enabled on -print shares (with a "yes" or "true" setting) which have valid drivers -installed on the Samba server! For more detailed explanations see the -man page of smb.conf. + if set to yes, this setting only +takes effect for Win NT/2k/XP clients (and not for Win 95/98/ME). Its +default value is No (or False). +It must not be enabled on print shares +(with a yes or true setting) which +have valid drivers installed on the Samba server! For more detailed +explanations see the man page of &smb.conf;. @@ -734,22 +733,22 @@ man page of smb.conf. This is the second special section. If a section with this name -appears in the smb.conf, users are able to +appears in the &smb.conf;, users are able to connect to any printer specified in the Samba host's printcap file, because Samba on startup then creates a printer share for every printername it finds in the printcap file. You could regard this section as a general convenience shortcut to share all printers with minimal configuration. It is also a container for settings which should apply as default to all printers. (For more details see the -smb.conf man page.) Settings inside this +&smb.conf; man page.) Settings inside this container must be share level parameters (S). comment = All printers the comment is shown next to -the share if a client queries the server, either via "Network -Neighbourhood" or with the net view command to list +the share if a client queries the server, either via Network +Neighbourhood or with the net view command to list available shares. @@ -757,7 +756,7 @@ available shares. please note well, that the [printers] service must be declared as printable. If you specify otherwise, smbd will refuse to -load smb.conf at startup. This parameter allows +load at startup. This parameter allows connected clients to open, write to and submit spool files into the directory specified with the path parameter for this service. It is used by Samba to differentiate printer shares from @@ -772,8 +771,9 @@ which is world writeable, with the "sticky" bit set to it. browseable = no - this is always set to "no" if printable = -yes. It makes the [printer] share itself invisible in the + this is always set to no if +printable = yes. It makes the +[printer] share itself invisible in the list of available shares in a net view command or in the Explorer browse list. (Note that you will of course see the individual printers). @@ -782,19 +782,18 @@ individual printers). guest ok = yes -if set to "yes", then no password is required to +if set to yes, then no password is required to connect to the printers service. Access will be granted with the -privileges of the "guest account". On many systems the guest -account will map to a user named "nobody". This user is in the UNIX +privileges of the guest account. On many systems the +guest account will map to a user named "nobody". This user is in the UNIX passwd file with an empty password, but with no valid UNIX login. (Note: on some systems the guest account might not have the 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 +guest user using su - guest and run a system print +command like - -lpr -P printername /etc/motd - +lpr -P printername /etc/motd @@ -830,7 +829,7 @@ synonym for read only = yes Any [my_printer_name] Section -If a section appears in the smb.conf, which is +If a section appears in the , which is tagged as printable = yes, Samba presents it as a printer share to its clients. Note, that Win95/98/ME clients may have problems with connecting or loading printer drivers if the share @@ -862,8 +861,8 @@ did it to show that it is possible if you want it. browseable = yes we also made this printer browseable (so that the -clients may conveniently find it when browsing the Network -Neighbourhood). +clients may conveniently find it when browsing the Network +Neighbourhood). printable = yes @@ -876,7 +875,7 @@ Neighbourhood). hosts allow = 10.160.50.,10.160.51. here we exercise a certain degree of access control -by using the "hosts allow" and "hosts deny" parameters. Note, that +by using the hosts allow and hosts deny parameters. Note, that this is not by any means a safe bet. It is not a way to secure your printers. This line accepts all clients from a certain subnet in a first evaluation of access control @@ -1016,7 +1015,7 @@ We excluded the special CUPS case here, because it is discussed in the next chapter. Just a short summary. For printing = CUPS: If SAMBA is compiled against libcups, it uses the CUPS API to submit jobs, etc. (It is a good idea also to set -"printcap = cups" in case your +printcap = cups in case your cupsd.conf is set to write its autogenerated printcap file to an unusual place). Otherwise Samba maps to the System V printing commands with the -oraw option for printing, i.e. it uses @@ -1025,6 +1024,7 @@ cups , and if SAMBA is compiled against libcups, any manually set print command will be ignored! + Having listed the above mappings here, you should note that there used to be a bug in recent 2.2.x versions which @@ -1123,7 +1123,7 @@ You can form quite complex print commands. You need to realize that print commands are just passed to a UNIX shell. The shell is able to expand the included environment variables as usual. (The syntax to include a UNIX environment variable $variable -in smb.conf or in the Samba print command is +in or in the Samba print command is %$variable.) To give you a working print command example, the following will log a print job to /tmp/print.log, print the file, then @@ -1131,11 +1131,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 @@ -1144,9 +1144,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 - + @@ -1206,7 +1206,7 @@ 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 -smb.conf. The reason is that Windows NT/2k/XPprof +. The reason is that Windows NT/2k/XPprof clients do not normally need to use the standard SMB printer share; rather they can print directly to any printer on another Windows NT host using MS-RPC. This of course assumes that the printing client has @@ -1324,7 +1324,7 @@ to retrieve printer driver files. -You should modify the server's smb.conf file to +You should modify the server's file to add the global parameters and create the [print$] file share (of course, some of the parameter values, such as 'path' are arbitrary and should be replaced @@ -1362,7 +1362,7 @@ Of course, you also need to ensure that the directory named by the [print$] is a special section in -smb.conf. It contains settings relevant to +. It contains settings relevant to potential printer driver download and local installation by clients. @@ -1425,7 +1425,7 @@ accounts in this setting. Check the file system permissions to make sure these accounts can copy files to the share. If this is a non-root account, then the account should also be mentioned in the global printer admin parameter. See the -smb.conf man page for more information on + man page for more information on configuring file shares. @@ -1453,18 +1453,17 @@ Therefore, create a directory tree below the to support. - - + + [print$]--+-- |--W32X86 # serves drivers to "Windows NT x86" |--WIN40 # serves drivers to "Windows 95/98" |--W32ALPHA # serves drivers to "Windows NT Alpha_AXP" |--W32MIPS # serves drivers to "Windows NT R4000" |--W32PPC # serves drivers to "Windows NT PowerPC" + - - -REQUIRED PERMISSIONS +Required permissions In order to add a new driver to your Samba host, one of two conditions @@ -1491,11 +1490,11 @@ to 'read only' by default. Once you have created the required [print$] service and associated subdirectories, go to a Windows NT 4.0/2k/XP -client workstation. Open "Network Neighbourhood" or "My Network -Places" and browse for the Samba host. Once you have located the -server, navigate to its "Printers and Faxes" folder. You should see -an initial listing of printers that matches the printer shares defined -on your Samba host. +client workstation. Open Network Neighbourhood or +My Network Places and browse for the Samba host. +Once you have located the server, navigate to its Printers and +Faxes folder. You should see an initial listing of printers +that matches the printer shares defined on your Samba host. @@ -1505,7 +1504,7 @@ on your Samba host. You have successfully created the [print$] -share in smb.conf? And Samba has re-read its +share in ? And Samba has re-read its configuration? Good. But you are not yet ready to take off. The driver files need to be present in this share, too! So far it is still an empty share. Unfortunatly, it is not enough @@ -1538,7 +1537,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 +Printers folder accessed from a client's Explorer will have no real printer driver assigned to them. By default, in 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 @@ -1557,16 +1556,16 @@ properties for a queue which has this default NULL driver assigned. This will result in an error message (this is normal here): - Device settings cannot be displayed. The driver + 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? +now? -Important:Don't click "Yes"! Instead, -click "No" in the error dialog. Only now you will -be presented with the printer properties window. From here, the way to -assign a driver to a printer is open to us. You have now the choice +Important:Don't click Yes! Instead, +click No in the error dialog. +Only now you will be presented with the printer properties window. From here, +the way to assign a driver to a printer is open to us. You have now the choice either: @@ -1575,7 +1574,7 @@ either: drivers. Initially this list will be empty. Or -use the "New Driver..." button to +use the New Driver... button to install a new printer driver (which will in fact start up the APW). @@ -1585,11 +1584,11 @@ Once the APW is started, the procedure is exactly the same as the one you are familiar with in Wiindows (we assume here that you are familiar with the printer driver installations procedure on Windows NT). Make sure your connection is in fact setup as a user with -printer admin privileges (if in doubt, use +printer admin privileges (if in doubt, use smbstatus to check for this). 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. +Windows NT x86, you will need to use the +Sharing tab of the printer properties dialog. @@ -1612,18 +1611,18 @@ done from the UNIX command line. This involves four distinct steps: - gathering the info about the required driver files +gathering the info about the required driver files and collecting the files together; - deposit the driver files into the +deposit the driver files into the [print$] share's correct subdirectories (possibly by using smbclient); -2. -- running the rpcclient +running the rpcclient commandline utility once with the addriver subcommand, -3. -- running rpcclient a second +running rpcclient a second time with the setdriver subcommand. @@ -1653,19 +1652,19 @@ Then you only have the second option: install the driver first on a Windows client *locally* and investigate which file names and paths it uses after they are installed. (Note, that you need to repeat this procedure for every client platform you want to support. We are going -to show it here for the "W32X86" platform only, a +to show it here for the W32X86 platform only, a name used by Microsoft for all WinNT/2k/XP clients...) A good method to recognize the driver files this is to print the test -page from the driver's Properties Dialog -(General tab). Then look at the list of driver +page from the driver's Properties Dialog +(General tab). Then look at the list of driver files named on the printout. You'll need to recognize what Windows -(and Samba) are calling the Driver File , the -Data File, the Config File, -the Help File and (optionally) the -Dependent Driver Files (this may vary slightly +(and Samba) are calling the Driver File , the +Data File, the Config File, +the Help File and (optionally) the +Dependent Driver Files (this may vary slightly for Windows NT). You need to remember all names (or better take a note) for the next steps. @@ -1684,7 +1683,7 @@ the name of the Linux host from which I am working. We could run an then we'd get an rpcclient /> prompt and would type the subcommands at this prompt. This is left as a good exercise to the reader. For now we use rpcclient with the --c parameter to execute a single subcommand + parameter to execute a single subcommand line and exit again. This is the method you would use if you want to create scripts to automate the procedure for a large number of printers and drivers. Note the different quotes used to overcome the @@ -1692,8 +1691,7 @@ different spaces in between words: - - kde-bitshop:~# rpcclient -U'Danka%xxxx' -c 'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP +&rootprompt;rpcclient -U'Danka%xxxx' -c 'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP cmd = getdriver "Heidelberg Digimaster 9110 (PS)" 3 [Windows NT x86] @@ -1726,20 +1724,21 @@ different spaces in between words: You may notice, that this driver has quite a big number of -"Dependentfiles" (I know worse cases however). Also, strangely, the -"Driver File" is here tagged as "Driver -Path".... oh, well. Here we don't have yet support for the -so-called "WIN40" architecture installed. This name is used by -Microsoft for the Win95/98/ME platforms. If we want to support these, -we need to install the Win95/98/ME driver files in addition to those -for W32X86 (i.e. the WinNT72000/XP clients) onto a Windows PC. This PC +Dependentfiles (I know worse cases however). Also, +strangely, the Driver File is here tagged as +Driver Path.... oh, well. Here we don't have yet +support for the so-called WIN40 architecture +installed. This name is used by Microsoft for the Win95/98/ME platforms. +If we want to support these, we need to install the Win95/98/ME driver +files in addition to those for W32X86 +(i.e. the WinNT72000/XP clients) onto a Windows PC. This PC can also host the Win9x drivers, even if itself runs on Windows NT, 2000 or XP. -Since the print$ share is usually accessible -through the Network Neighbourhood, you can also use the UNC notation +Since the [print$] share is usually accessible +through the Network Neighbourhood, you can also use the UNC notation from Windows Explorer to poke at it. The Win9x driver files will end up in subdirectory "0" of the "WIN40" directory. The full path to access them will be @@ -1771,36 +1770,33 @@ listing is edited to include linebreaks for readability: - - kde-bitshop:~# smbclient //TURBO_XP/print\$ -U'Danka%xxxx' \ - -c 'cd W32X86/2;mget HD*_de.* \ - hd*ppd Hd*_de.* Hddm*dll HDN*Aux.DLL' +&rootprompt;smbclient //TURBO_XP/print\$ -U'Danka%xxxx' \ + -c 'cd W32X86/2;mget HD*_de.* \ + hd*ppd Hd*_de.* Hddm*dll HDN*Aux.DLL' added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 Got a positive name query response from 10.160.50.8 ( 10.160.50.8 ) Domain=[DEVELOPMENT] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] - Get file Hddm91c1_de.ABD? n - Get file Hddm91c1_de.def? y - getting file \W32X86\2\Hddm91c1_de.def of size 428 as Hddm91c1_de.def (22.0 kb/s) \ - (average 22.0 kb/s) - Get file Hddm91c1_de.DLL? y - getting file \W32X86\2\Hddm91c1_de.DLL of size 876544 as Hddm91c1_de.DLL (737.3 kb/s) \ - (average 737.3 kb/s) - [...,] + Get file Hddm91c1_de.ABD? n + Get file Hddm91c1_de.def? y + getting file \W32X86\2\Hddm91c1_de.def of size 428 as Hddm91c1_de.def (22.0 kb/s) (average 22.0 kb/s) + Get file Hddm91c1_de.DLL? y + getting file \W32X86\2\Hddm91c1_de.DLL of size 876544 as Hddm91c1_de.DLL (737.3 kb/s) (average 737.3 kb/s) + [...] After this command is complete, the files are in our current local directory. You probably have noticed that this time we passed several -commands to the "-c" parameter, separated by semi-colons. This +commands to the parameter, separated by semi-colons. This effects that all commands are executed in sequence on the remote Windows server before smbclient exits again. -Don't forget to repeat the procedure for the "WIN40" architecture -should you need to support Win95/98/XP clients. Remember, the files -for these architectures are in the WIN40/0/ subdir. Once we are +Don't forget to repeat the procedure for the WIN40 +architecture should you need to support Win95/98/XP clients. Remember, the +files for these architectures are in the WIN40/0/ subdir. Once we are complete, we can run smbclient ... put to store the collected files on the Samba server's [print$] share. @@ -1814,7 +1810,7 @@ the collected files on the Samba server's So, now we are going to put the driver files into the [print$] share. Remember, the UNIX path to this share has been defined previously in your -smb.conf. You also have created subdirectories +. You also have created subdirectories for the different Windows client types you want to support. Supposing your [print$] share maps to the UNIX path /etc/samba/drivers/, your driver files should now @@ -1834,23 +1830,22 @@ go here: We again use smbclient to transfer the driver files across the network. We specify the same files and paths as were leaked to us by -running "getdriver" against the original +running getdriver against the original Windows install. However, now we are going to 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; \ - put HDNIS01U_de.HLP; put Hddm91c1_de.DLL; \ - put Hddm91c1_de.INI; put Hddm91c1KMMin.DLL; \ - put Hddm91c1_de.dat; put Hddm91c1_de.dat; \ - put Hddm91c1_de.def; put Hddm91c1_de.hre; \ - put Hddm91c1_de.vnd; put Hddm91c1_de.hlp; \ - put Hddm91c1_de_reg.HLP; put HDNIS01Aux.dll; \ - put HDNIS01_de.NTF' +&rootprompt;smbclient //SAMBA-CUPS/print\$ -U'root%xxxx' -c 'cd W32X86; put HDNIS01_de.DLL; \ + put Hddm91c1_de.ppd; put HDNIS01U_de.DLL; \ + put HDNIS01U_de.HLP; put Hddm91c1_de.DLL; \ + put Hddm91c1_de.INI; put Hddm91c1KMMin.DLL; \ + put Hddm91c1_de.dat; put Hddm91c1_de.dat; \ + put Hddm91c1_de.def; put Hddm91c1_de.hre; \ + put Hddm91c1_de.vnd; put Hddm91c1_de.hlp; \ + put Hddm91c1_de_reg.HLP; put HDNIS01Aux.dll; \ + put HDNIS01_de.NTF' added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 Got a positive name query response from 10.160.51.162 ( 10.160.51.162 ) Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a] @@ -1882,7 +1877,7 @@ put them (for now) in this same subdirectory of the Samba box! This re-location will automatically be done by the adddriver command which we will run shortly (and don't forget to also put the files for the Win95/98/ME architecture -into the WIN40/ subdirectory should you need +into the WIN40/ subdirectory should you need them). @@ -1897,8 +1892,7 @@ 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' +&rootprompt;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 Got a positive name query response from 10.160.51.162 ( 10.160.51.162 ) Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a] @@ -1958,27 +1952,26 @@ driver files belong. So, next you must tell Samba about the special category of the files you just uploaded into the [print$] share. This -is done by the "adddriver" command. It will +is done by the adddriver command. It will prompt Samba to register the driver files into its internal TDB 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: \ - NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ - Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ - Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ - HDNIS01Aux.dll,HDNIS01_de.NTF, \ - Hddm91c1_de_reg.HLP' SAMBA-CUPS +&rootprompt;rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" "dm9110:HDNIS01_de.DLL: \ + Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \ + NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ + Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ + Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ + HDNIS01Aux.dll,HDNIS01_de.NTF, \ + Hddm91c1_de_reg.HLP' SAMBA-CUPS cmd = adddriver "Windows NT x86" "dm9110:HDNIS01_de.DLL:Hddm91c1_de.ppd:HDNIS01U_de.DLL: \ - HDNIS01U_de.HLP:NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ - Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ - Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ - HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP" + HDNIS01U_de.HLP:NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ + Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ + Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ + HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP" Printer Driver dm9110 successfully installed. @@ -2005,14 +1998,13 @@ more detailed description, if you should need it. One indication for Samba's recognition of the files as driver files is the successfully installed message. Another one is the fact, that our files have been moved by the -adddriver command into the "2" +adddriver command into the 2 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' +&rootprompt;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 Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a] @@ -2069,10 +2061,10 @@ files by at least three methods: from any Windows client browse Network Neighbourhood, -finde the Samba host and open the Samba "Printers and -Faxes" folder. Select any printer icon, right-click and -select the printer " Properties". Click on the -"Advanced" tab. Here is a field indicating the +finde the Samba host and open the Samba Printers and +Faxes folder. Select any printer icon, right-click and +select the printer Properties. Click on the +Advanced tab. Here is a field indicating the driver for that printer. A drop down menu allows you to change that driver (be carefull to not do this unwittingly.). You can use this list to view all drivers know to Samba. Your new one should be amongst @@ -2082,44 +2074,41 @@ list will differ if you look at it from Windows95/98/ME or WindowsNT/2000/XP.) from a Windows 2000 or XP client (not WinNT) browse -Network Neighbourhood, search for the Samba -server and open the server's Printers folder, +Network Neighbourhood, search for the Samba +server and open the server's Printers folder, right-click the white background (with no printer highlighted). Select -"Server Properties". On the -"Drivers " tab you will see the new driver listed +Server Properties. On the +Drivers tab you will see the new driver listed now. This view enables you to also inspect the list of files belonging to that driver (this doesn't work on Windows NT, but only on Windows 2000 and Windows XP. WinNT doesn't provide the "Drivers" tab).. An alternative, much quicker method for Windows 2000/XP to start this dialog is by typing into a DOS box (you must of -course adapt the name to your Samba server instead of SAMBA-CUPS): +course adapt the name to your Samba server instead of SAMBA-CUPS): - - rundll32 printui.dll,PrintUIEntry /s /t2 /n\\SAMBA-CUPS - + rundll32 printui.dll,PrintUIEntry /s /t2 /n\\SAMBA-CUPS from a UNIX prompt run this command (or a variant -thereof), where "SAMBA-CUPS" is the name of the Samba host and "xxxx" -represents the actual Samba password assigned to root: +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 - +rpcclient -U'root%xxxx' -c 'enumdrivers' SAMBA-CUPS You will see a listing of all drivers Samba knows about. Your new one -should be amongst them. But it is only listed under the [Windows NT -x86] heading, not under [Windows 4.0], since we didn't install that -part. Or did *you*? -- You will see a listing of all drivers Samba -knows about. Your new one should be amongst them. In our example it is -named dm9110. Note that the 3rd column shows the -other installed drivers twice, for each supported architecture one -time. Our new driver only shows up for "Windows NT 4.0 or 2000". To -have it present for "Windows 95, 98 and ME" you'll have to repeat the -whole procedure with the WIN40 architecture and subdirectory. +should be amongst them. But it is only listed under the [Windows NT +x86] heading, not under [Windows 4.0], +since we didn't install that part. Or did *you*? -- You will see a listing of +all drivers Samba knows about. Your new one should be amongst them. In our +example it is named dm9110. Note that the 3rd column +shows the other installed drivers twice, for each supported architecture one +time. Our new driver only shows up for +Windows NT 4.0 or 2000. To +have it present for Windows 95, 98 and ME you'll +have to repeat the whole procedure with the WIN40 architecture and subdirectory. @@ -2134,15 +2123,15 @@ with a different driver name, it will work the same: - - kde-bitshop:~# rpcclient -Uroot%xxxx \ - -c 'adddriver "Windows NT x86" \ - "myphantasydrivername:HDNIS01_de.DLL: \ - Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \ - NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ - Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ - Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ - HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP' SAMBA-CUPS +&rootprompt;rpcclient -Uroot%xxxx \ + -c 'adddriver "Windows NT x86" \ + "myphantasydrivername:HDNIS01_de.DLL: \ + Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \ + NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \ + Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \ + Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \ + HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP' SAMBA-CUPS + cmd = adddriver "Windows NT x86" "myphantasydrivername:HDNIS01_de.DLL:Hddm91c1_de.ppd:HDNIS01U_de.DLL:\ @@ -2163,8 +2152,8 @@ which make sense to the target printer). Note, that you can't run the repeatedly. Each run "consumes" the files you had put into the [print$] share by moving them into the respective subdirectories. So you must precede an -"smbclient ... put" command before each -"rpcclient ... addriver" command. +smbclient ... put command before each +rpcclient ... addriver" command. @@ -2180,7 +2169,7 @@ setdriver command achieves exactly this: - kde-bitshop:~# rpcclient -U'root%xxxx' -c 'setdriver dm9110 myphantasydrivername' SAMBA-CUPS +&rootprompt;rpcclient -U'root%xxxx' -c 'setdriver dm9110 myphantasydrivername' SAMBA-CUPS cmd = setdriver dm9110 myphantasydrivername Successfully set dm9110 to driver myphantasydrivername. @@ -2191,23 +2180,27 @@ name I intended: - kde-bitshop:~# rpcclient -U'root%xxxx' -c 'setdriver dm9110 dm9110' SAMBA-CUPS +&rootprompt;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' --c 'setdriver "printername" "drivername' SAMBA-Hostname . -- +The syntax of the command is rpcclient +-U'root%sambapassword' -c 'setdriver +"printername" +"drivername' +SAMBA-Hostname . -- Now we have done *most* of the work. But not yet all.... -the "setdriver" command will only succeed if the printer is known to +the setdriver command will only succeed if the printer is +known to Samba already. A bug in 2.2.x prevented Samba from recognizing freshly installed printers. You had to restart Samba, or at least send a HUP signal to all running smbd processes to work around this: -kill -HUP `pidof smbd`. +kill -HUP `pidof smbd`. @@ -2236,14 +2229,12 @@ guarantee that your connection is not unwittingly mapped to bad user "nobody". In a DOS box type: - -net use \\SAMBA-SERVER\print$ /user:root - +net use \\SAMBA-SERVER\print$ /user:root -Replace root, if needed, by another valid 'printer admin' user as -given in the smb.conf definition. Should you -already be connected as a different user, you'll get an error +Replace root, if needed, by another valid +printer admin user as given in the definition. +Should you already be connected as a different user, you'll get an error message. There is no easy way to get rid of that connection, because Windows doesn't seem to know a concept of "logging off" from a share connection (don't confuse this with logging off from the local @@ -2258,33 +2249,34 @@ Windows workstation: -Open Network -Neighbourhood +Open Network +Neighbourhood Browse to Samba server -Open its Printers and -Faxes folder +Open its Printers and +Faxes folder Highlight and right-click the printer -Select Connect... (for WinNT4/2K -it is possibly Install...) +Select Connect... (for WinNT4/2K +it is possibly Install...) A new printer (named printername on samba-server) should now have appeared in your -local Printer folder (check Start -- -Settings -- Control Panel -- Printers and Faxes). +local Printer folder (check Start -- +Settings -- Control Panel +-- Printers and Faxes). Most likely you are now tempted to try and print a test page. After all, you now can open the printer properties and on the "General" tab, there is a button offering to do just that. But chances are that you -get an error message saying Unable to print Test -Page. The reason might be that there is not yet a +get an error message saying Unable to print Test +Page. The reason might be that there is not yet a valid Device Mode set for the driver, or that the "Printer Driver Data" set is still incomplete. @@ -2337,7 +2329,7 @@ This can be achieved by accessing the drivers remotely from an NT (or Be aware, that a valid Device Mode can only be initiated by a -"printer admin", or root (the reason should be +printer admin, or root (the reason should be obvious). Device Modes can only correctly be set by executing the printer driver program itself. Since Samba can not execute this Win32 platform driver code, it sets this field initially to NULL (which is @@ -2359,12 +2351,12 @@ for this: -Browse the "Network Neighbourhood" +Browse the Network Neighbourhood Find the Samba server -Open the Samba server's Printers and -Faxes folder +Open the Samba server's Printers and + Faxes folder Highlight the shared printer in question @@ -2372,12 +2364,13 @@ Faxes folder followed the last section's description) At the bottom of the context menu select -"Properties...." (if the menu still offers the "Connect..." entry +Properties.... (if the menu still offers the +Connect... entry further above, you need to click that one first to achieve the driver installation as shown in the last section) -Go to the "Advanced" tab; click on "Printing -Defaults..." +Go to the Advanced tab; click on +Printing Defaults... Change the "Portrait" page setting to "Landscape" (and back) @@ -2397,8 +2390,8 @@ This procedure has executed the printer driver program on the client platform and fed back the correct Device Mode to Samba, which now stored it in its TDB files. Once the driver is installed on the client, you can follow the analogous steps by accessing the -local "Printers" folder too if you are a Samba -printer admin user. From now on printing should work as expected. +local Printers folder too if you are +a Samba printer admin user. From now on printing should work as expected. @@ -2418,33 +2411,33 @@ server for you. Every further driver may be done by any user, along the lines described above: Browse network, open printers folder on Samba server, -right-click printer and choose "Connect...". Once this completes -(should be not more than a few seconds, but could also take a minute, -depending on network conditions), you should find the new printer in -your client workstation local Printers and -Faxes folder. +right-click printer and choose Connect.... Once +this completes (should be not more than a few seconds, but could also take +a minute, depending on network conditions), you should find the new printer in +your client workstation local Printers and +Faxes folder. -You can also open your local "Printers and Faxes" folder by using this -command on Windows 2000 and Windows XP Professional workstations: +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 - +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 -"Run command..." field from the "Start" menu. +You can enter the commands either inside a DOS box window +or in the Run command... field from the +Start menu. @@ -2456,7 +2449,7 @@ After you installed the driver on the Samba server (in its [print$] share, you should always make sure that your first client installation completes correctly. Make it a habit for yourself to build that the very first connection from a client as -"printer admin". This is to make sure that: +printer admin. This is to make sure that: @@ -2483,17 +2476,15 @@ 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" - +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 -seconds, click on "Printing Defaults..." and +seconds, click on Printing Defaults... and proceed to set the job options as should be used as defaults by all clients. Alternatively, instead of root you can name one other member -of theprinter admins from the -smb.conf setting. +of the printer admins from the setting. @@ -2530,7 +2521,7 @@ admins. They have struggled for hours and hours and couldn't arrive at a point were their settings seemed to be saved. It is not their fault. The confusing thing is this: in the multi-tabbed dialog that pops up when you right-click the printer name and select -Properties..., you can arrive at two identically +Properties..., you can arrive at two identically looking dialogs, each claiming that they help you to set printer options, in three different ways. Here is the definite answer to the "Samba Default Driver Setting FAQ": @@ -2554,13 +2545,13 @@ on XP Professional: The first "wrong" way: -Open the Printers +Open the Printers folder. Right-click on the printer (remoteprinter on cupshost) and -select in context menu Printing -Preferences... +select in context menu Printing +Preferences... Look at this dialog closely and remember what it looks like. @@ -2571,18 +2562,18 @@ like. The second "wrong" way: -Open the "Printers" + Open the Printers folder. Right-click on the printer (remoteprinter on cupshost) and select in the context menu -Properties +Properties -Click on the General +Click on the General tab -Click on the button Printing -Preferences... +Click on the button Printing +Preferences... A new dialog opens. Keep this dialog open and go back to the parent dialog. @@ -2595,16 +2586,15 @@ this from the beginning, just carry out steps 1. and 2. from second "way" above) -Click on the Advanced +Click on the Advanced tab. (Hmmm... if everything is "Grayed Out", then you are not logged in as a user with enough privileges). -Click on the "Printing -Defaults..." button. +Click on the Printing +Defaults... button. On any of the two new tabs, click on the -Advanced... -button. +Advanced... button. A new dialog opens. Compare this one to the other, identical looking one from "B.5" or A.3". @@ -2618,7 +2608,7 @@ either. However, only the last one, which you arrived at with steps C.1.-6. will permanently save any settings which will then become the defaults for new users. If you want all clients to have the same defaults, you need to conduct these steps as administrator -(printer admin in smb.conf) +(printer admin in ) before a client downloads the driver (the clients can later set their own per-user defaults by following the proceduresA. @@ -2631,8 +2621,8 @@ difference in their window names: one is called Bar" (which is the one you need) and the other is called "Print Settings for Printer Foo on Server Bar". The last one is the one you arrive at when you -right-click on the printer and select Print -Settings.... This is the one what you were +right-click on the printer and select Print +Settings.... This is the one what you were taught to use back in the days of Windows NT! So it is only natural to try the same way with Win2k or WinXP. You wouldn't dream that there is now a different "clicking path" to arrive at an @@ -2644,24 +2634,24 @@ for all users! with the right privileges): - -rundll32 printui.dll,PrintUIEntry /p /t3 /n\\SAMBA-SERVER\printersharename - + +rundll32 printui.dll,PrintUIEntry /p /t3 /n\\SAMBA-SERVER\printersharename + -to see the tab with the Printing Defaults... +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 - + +rundll32 printui.dll,PrintUIEntry /p /t0 /n\\SAMBA-SERVER\printersharename + -to see the tab with the Printing Preferences... +to see the tab with the Printing Preferences... button (the one which doesn't set system-wide defaults). You can -start the commands from inside a DOS box" or from the Start --- Run... menu. +start the commands from inside a DOS box" or from the Start +-- Run... menu. @@ -2691,9 +2681,7 @@ following is an example of how this could be accomplished: - - ---------------------------------------------------------------------------------- - $ rpcclient SAMBA-CUPS -U root%secret -c 'enumdrivers' +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'enumdrivers' cmd = enumdrivers [Windows NT x86] @@ -2713,50 +2701,48 @@ following is an example of how this could be accomplished: Driver Name: [myphantasydrivername] [....] - ---------------------------------------------------------------------------------- - ----------------------------------------------------------------------------------- - $ rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' + + + +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,,110ppm HiVolume DANKA Stuttgart] comment:[110 ppm HiVolume DANKA Stuttgart] [....] - ---------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------- - $ rpcclient SaMbA-cUpS -U root%secret -c 'setdriver dm9110 "Heidelberg Digimaster 9110 (PS)"' + +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'setdriver dm9110 "Heidelberg Digimaster 9110 (PS)"' cmd = setdriver dm9110 Heidelberg Digimaster 9110 (PPD) Successfully set dm9110 to driver Heidelberg Digimaster 9110 (PS). - ---------------------------------------------------------------------------------- - ----------------------------------------------------------------------------------- - $ rpcclient samba-cups -U root%secret -c 'enumprinters' + + + +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....] - ---------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------- - $ rpcclient SaMbA-cUpS -U root%secret -c 'setdriver dm9110 myphantasydrivername' + +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'setdriver dm9110 myphantasydrivername' cmd = setdriver dm9110 myphantasydrivername Successfully set dm9110 to myphantasydrivername. - ---------------------------------------------------------------------------------- - ----------------------------------------------------------------------------------- - $ rpcclient samba-cups -U root%secret -c 'enumprinters' + + + +&rootprompt;rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,myphantasydrivername,110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....] - ---------------------------------------------------------------------------------- - @@ -2775,8 +2761,8 @@ drivers with the help of rpccclient). By default, Samba exhibits all printer shares defined in -smb.conf in the -Printers... folder. Also located in this folder +&smb.conf; in the +Printers... folder. Also located in this folder is the Windows NT Add Printer Wizard icon. The APW will be shown only if: @@ -2784,22 +2770,22 @@ if: ...the connected user is able to successfully execute an OpenPrinterEx(\\server) with administrative -privileges (i.e. root or printer admin). +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 - + +runas /netonly /user:root rundll32 printui.dll,PrintUIEntry /p /t0 /n \\SAMBA-SERVER\printersharename + -and click on Printing Preferences... +and click on Printing Preferences... -...smb.conf contains the setting -show add printer wizard = yes (the +... contains the setting +show add printer wizard = yes (the default). @@ -2820,7 +2806,7 @@ print queue with one that has been uploaded before; add an entirely new printer to the Samba host (only in conjunction with a working add printer command; a corresponding delete printer command for -removing entries from the Printers... folder +removing entries from the Printers... folder may be provided too) @@ -2832,15 +2818,15 @@ have a defined value. The program hook must successfully add the printer to the Unix print system (i.e. to /etc/printcap, /etc/cups/printers.conf or other appropriate -files) and to smb.conf if necessary. +files) and to if necessary. When using the APW from a client, if the named printer share does not exist, smbd will execute the add printer -command and reparse to the smb.conf +command and reparse to the to attempt to locate the new printer share. If the share is still not -defined, an error of Access Denied is +defined, an error of Access Denied is returned to the client. Note that the add printer command is executed under the context of the connected user, not necessarily a root account. A map to guest = bad @@ -2909,7 +2895,7 @@ driver for WinNT, going into [print$]/W32X86/2/ be used on WinNT). Very often these different driver versions contain files carrying the same name; but still the files are very different! Also, if you look at them from the Windows Explorer (they reside in -"%WINDOWS%\system32\spool\drivers\W32X86\") you +%WINDOWS%\system32\spool\drivers\W32X86\) you will probably see names in capital letters, while an "enumdrivers" command from Samba would show mixed or lower case letters. So it is easy to confuse them. If you install them manually using @@ -2929,8 +2915,7 @@ reasons: - - kde4@kde-bitshop:# rpcclient -U 'Administrator%xxxx' -c 'enumdrivers 3' 10.160.50.8 +&rootprompt;rpcclient -U 'Administrator%secret' -c 'enumdrivers 3' 10.160.50.8 Printer Driver Info 3: Version: [3] @@ -2996,9 +2981,9 @@ picture: -sdiff 2-files 3-files + cpcqm407.cnt > cns3ggr.dll ]]> - - @@ -3034,11 +3017,10 @@ comparison: - - kde4@kde-bitshop:# for i in cns3g.hlp cns3gui.dll cns3g.dll; do \ - smbclient //10.160.50.8/print\$ -U 'Administrator%xxxx' \ - -c "cd W32X86/3; dir $i; cd .. ; cd 2; dir $i"; \ - done +&rootprompt;for i in cns3g.hlp cns3gui.dll cns3g.dll; do \ + smbclient //10.160.50.8/print\$ -U 'Administrator%xxxx' \ + -c "cd W32X86/3; dir $i; cd .. ; cd 2; dir $i"; \ + done CNS3G.HLP A 122981 Thu May 30 02:31:00 2002 CNS3G.HLP A 99948 Thu May 30 02:31:00 2002 @@ -3084,7 +3066,7 @@ multiple ports as a form of load balancing or fail over. If you require that multiple ports be defined for some reason or another (My users and my Boss should not know that they are -working with Samba), smb.conf possesses a +working with Samba), possesses a enumports command which can be used to define an external program that generates a listing of ports on a system. @@ -3117,7 +3099,7 @@ distribution. This section will only provide a brief introduction to the features of Imprints. -ATTENTION! MAINTAINER REQUIRED +Attention! Maintainer required Unfortunately, the Imprints toolset is no longer maintained. As of @@ -3208,20 +3190,18 @@ The basic installation process is in four steps and perl code is wrapped around smbclient and rpcclient - - - 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 - - + + + foreach (supported architecture for a given driver) + + rpcclient: Get the appropriate upload directory on the remote server + smbclient: Upload the driver files + rpcclient: Issues an AddPrinterDriver() MS-RPC + + + + rpcclient: Issue an AddPrinterEx() MS-RPC to actually create the printer + One of the problems encountered when implementing the Imprints tool @@ -3238,9 +3218,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 @@ -3277,9 +3257,7 @@ 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 /? - +rundll32 printui.dll,PrintUIEntry /? A window pops up which shows you all of the commandline switches @@ -3292,9 +3270,9 @@ 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" +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" @@ -3407,7 +3385,7 @@ Samba by the APW. If the addprinter command is designed in a way that it can create a new printer (through writing correct printcap entries on legacy systems, or execute the lpadmin command on more modern systems) and create the associated share in -smb.conf, then the APW will in effect really +, then the APW will in effect really create a new printer on Samba and the UNIX print subsystem! -- cgit