From 99bde6889d3d8b7a9e950c86c30e82662e1dacdd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 9 Sep 2003 02:58:53 +0000 Subject: syncing files from 3.0 into HEAD again (This used to be commit bca0bba209255d0effbae6a3d3b6d298f0952c3a) --- docs/htmldocs/printing.html | 766 ++++++++++++++++++++------------------------ 1 file changed, 341 insertions(+), 425 deletions(-) (limited to 'docs/htmldocs/printing.html') diff --git a/docs/htmldocs/printing.html b/docs/htmldocs/printing.html index 089bba6e0f..2b0abb56e6 100644 --- a/docs/htmldocs/printing.html +++ b/docs/htmldocs/printing.html @@ -1,12 +1,11 @@ -Chapter 18. Classical Printing Support

Chapter 18. Classical Printing Support

Kurt Pfeifle

Danka Deutschland GmbH

Gerald (Jerry) Carter

Samba Team

May 32, 2003

Table of Contents

Features and Benefits
Technical Introduction
What happens if you send a Job from a Client
Printing Related Configuration Parameters
Parameters Recommended for Use
Parameters for Backwards Compatibility
Parameters no longer in use
A simple Configuration to Print with Samba-3
Verification of "Settings in Use" with testparm
A little Experiment to warn you
Extended Sample Configuration to Print with Samba-3
Detailed Explanation of the Example's Settings
The [global] Section
The [printers] Section
Any [my_printer_name] Section
Print Commands
Default Print Commands for various Unix Print Subsystems
Setting up your own Print Commands
Innovations in Samba Printing since 2.2
Client Drivers on Samba Server for Point'n'Print
The [printer$] Section is removed from Samba-3
Creating the [print$] Share
Parameters in the [print$] Section
Subdirectory Structure in [print$]
Installing Drivers into [print$]
Setting Drivers for existing Printers with a Client GUI
Setting Drivers for existing Printers with -rpcclient
"The Proof of the Pudding lies in the Eating" (Client Driver Install -Procedure)
The first Client Driver Installation
IMPORTANT! Setting Device Modes on new Printers
Further Client Driver Install Procedures
Always make first Client Connection as root or "printer admin"
Other Gotchas
Setting Default Print Options for the Client Drivers
Supporting large Numbers of Printers
Adding new Printers with the Windows NT APW
Weird Error Message Cannot connect under a -different Name
Be careful when assembling Driver Files
Samba and Printer Ports
Avoiding the most common Misconfigurations of the Client Driver
The Imprints Toolset
What is Imprints?
Creating Printer Driver Packages
The Imprints Server
The Installation Client
Add Network Printers at Logon without User Interaction
The addprinter command
Migration of "Classical" printing to Samba-3
Publishing Printer Information in Active Directory or LDAP
Common Errors and Problems
I give my root password but I don't get access
My printjobs get spooled into the spooling directory, but then get lost

Features and Benefits

+Chapter 18. Classical Printing Support

Chapter 18. Classical Printing Support

Kurt Pfeifle

Danka Deutschland GmbH

Gerald (Jerry) Carter

Samba Team

May 31, 2003

Table of Contents

Features and Benefits
Technical Introduction
What happens if you send a Job from a Client
Printing Related Configuration Parameters
Parameters Recommended for Use
A simple Configuration to Print
Verification of "Settings in Use" with testparm
A little Experiment to warn you
Extended Sample Configuration to Print
Detailed Explanation of the Example's Settings
The [global] Section
The [printers] Section
Any [my_printer_name] Section
Print Commands
Default Print Commands for various UNIX Print Subsystems
Setting up your own Print Commands
Innovations in Samba Printing since 2.2
Client Drivers on Samba Server for Point'n'Print
The [printer$] Section is removed from Samba 3
Creating the [print$] Share
Parameters in the [print$] Section
Subdirectory Structure in [print$]
Installing Drivers into [print$]
Setting Drivers for existing Printers with a Client GUI
Setting Drivers for existing Printers with +rpcclient
Client Driver Install Procedure
The first Client Driver Installation
IMPORTANT! Setting Device Modes on new Printers
Further Client Driver Install Procedures
Always make first Client Connection as root or "printer admin"
Other Gotchas
Setting Default Print Options for the Client Drivers
Supporting large Numbers of Printers
Adding new Printers with the Windows NT APW
Weird Error Message Cannot connect under a +different Name
Be careful when assembling Driver Files
Samba and Printer Ports
Avoiding the most common Misconfigurations of the Client Driver
The Imprints Toolset
What is Imprints?
Creating Printer Driver Packages
The Imprints Server
The Installation Client
Add Network Printers at Logon without User Interaction
The addprinter command
Migration of "Classical" printing to Samba
Publishing Printer Information in Active Directory or LDAP
Common Errors
I give my root password but I don't get access
My printjobs get spooled into the spooling directory, but then get lost

Features and Benefits

Printing is often a mission-critical service for the users. Samba can provide this service reliably and seamlessly for a client network consisting of Windows workstations.

-A Samba-3.0 print service may be run on a Standalone or a Domain +A Samba print service may be run on a Standalone or a Domain member server, side by side with file serving functions, or on a dedicated print server. It can be made as tight or as loosely secured as needs dictate. Configurations may be simple or complex. Available @@ -30,24 +29,24 @@ implemented by the more traditional UNIX (BSD- and System V-style) printing systems. Many things apply to CUPS, the newer Common UNIX Printing System, too; so if you use CUPS, you might be tempted to jump to the next chapter -- but you will certainly miss a few things if you -do so. Better read this chapter too. +do so. Better to read this chapter too.

Note

Most of the given examples have been verified on Windows XP Professional clients. Where this document describes the responses to commands given, bear in mind that Windows 2000 clients are very similar, but may differ in details. Windows NT is somewhat different again. -

Technical Introduction

+

Technical Introduction

Samba's printing support always relies on the installed print -subsystem of the Unix OS it runs on. Samba is a "middleman". It takes +subsystem of the UNIX OS it runs on. Samba is a "middleman". It takes printfiles from Windows (or other SMB) clients and passes them to the real printing system for further processing. Therefore it needs to -"talk" to two sides: to the Windows print clients and to the Unix +"talk" to two sides: to the Windows print clients and to the UNIX printing system. Hence we must differentiate between the various client OS types each of which behave differently, as well as the various UNIX print subsystems, which themselves have different features and are accessed differently. This part of the Samba HOWTO -Collection deals with the "traditional" way of Unix printing first; +Collection deals with the "traditional" way of UNIX printing first; the next chapter covers in great detail the more modern Common UNIX Printing System (CUPS). @@ -55,15 +54,15 @@ the next chapter covers in great detail the more modern

Important

CUPS users, be warned: don't just jump on to the next chapter. You might miss important information contained only here!

-

What happens if you send a Job from a Client

+

What happens if you send a Job from a Client

To successfully print a job from a Windows client via a Samba print server to a UNIX printer, there are 6 (potentially 7) stages: -

  1. Windows opens a connection to the printershare

  2. Samba must authenticate the user

  3. Windows sends a copy of the printfile over the network +

    1. Windows opens a connection to the printer share

    2. Samba must authenticate the user

    3. Windows sends a copy of the printfile over the network into Samba's spooling area

    4. Windows closes the connection again

    5. Samba invokes the print command to hand the file over -to the UNIX print subsystem's spooling area

    6. The Unix print subsystem processes the print +to the UNIX print subsystem's spooling area

    7. The UNIX print subsystem processes the print job

    8. The printfile may need to be explicitly deleted -from the Samba spooling area.

Printing Related Configuration Parameters

+from the Samba spooling area.

Printing Related Configuration Parameters

There are a number of configuration parameters in controlling Samba's printing behaviour. Please also refer to the man page for smb.conf to @@ -71,74 +70,65 @@ acquire an overview about these. As with other parameters, there are Global Level (tagged with a "G" in the listings) and Service Level ("S") parameters.

Service Level Parameters

These may go into the -[global] section of -. In this case they define the default +[global] section of smb.conf. +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).

Global Parameters

These may not go into individual shares. If they go in by error, the "testparm" utility can discover -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. See also the +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. See also the smb.conf man page for detailed explanations: -

List of printing related parameters in Samba-3.  -

Global level parameters:

  • addprinter command (G)

  • deleteprinter command (G)

  • disable spoolss (G)

  • enumports command (G)

  • load printers (G)

  • lpq cache time (G)

  • os2 driver map (G)

  • printcap name (G), printcap (G)

  • show add printer wizard (G)

  • total print jobs (G)

  • use client driver (G)

- -

Service level parameters:

  • hosts allow (S)

  • hosts deny (S)

  • lppause command (S)

  • lpq command (S)

  • lpresume command (S)

  • lprm command (S)

  • max print jobs (S)

  • min print space (S)

  • print command (S)

  • printable (S), print ok (S)

  • printer name (S), printer (S)

  • printer admin (S)

  • printing = [cups|bsd|lprng...] (S)

  • queuepause command (S)

  • queueresume command (S)

  • total print jobs (S)

+

Global level parameters: addprinter command, +deleteprinter command, +disable spoolss, +enumports command, +load printers, +lpq cache time, +os2 driver map, +printcap name, printcap, +show add printer wizard, +total print jobs, +use client driver. +

Service level parameters: hosts allow, +hosts deny, +lppause command, +lpq command, +lpresume command, +lprm command, +max print jobs, +min print space, +print command, +printable, print ok , +printer name, printer, +printer admin, +printing = [cups|bsd|lprng...], +queuepause command, +queueresume command, +total print jobs.

Samba's printing support implements the Microsoft Remote Procedure Calls (MS-RPC) methods for printing. These are used by Windows NT (and later) print servers. The old "LanMan" protocol is still supported as a fallback resort, and for older clients to use. More details will follow further beneath. -

Parameters for Backwards Compatibility

-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 man page and are disabled by -default. Use them with caution! -

disable spoolss(G)

This is -provided for better support of Samba 2.0.x backwards capability. It -will disable Samba's support for MS-RPC printing and yield identical -printing behaviour to Samba 2.0.x.

use client driver (G)

was provided -for using local printer drivers on Windows NT/2000 clients. It does -not apply to Windows 95/98/ME clients.

Parameters "for backward compatibility only", use with caution.  -

  • disable spoolss (G)

  • use client driver (S)

-

Parameters no longer in use

-Samba users upgrading from 2.2.x to 3.0 need to be aware that some -previously available settings are no longer supported (as was -announced some time ago). Here is a list of them: -

"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. You cannot use them in new 3.0 installations: - -

  • printer driver file (G)

  • total print jobs (G)

  • postscript (S)

  • printer driver (S)

  • printer driver location (S)

-

A simple Configuration to Print with Samba-3

+

A simple Configuration to Print

Here is a very simple example configuration for print related settings -in the file. If you compare it with your -own system's , 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 - which enables all clients to print. -

- [global]
-         printing = bsd
-         load printers = yes
-
- [printers]
-         path = /var/spool/samba
-         printable = yes
-         public = yes
-         writable = no
-

-This is only an example configuration. Many settings, 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 root use the testparm -utility. testparm also gives warnings if you have -mis-configured certain things. Its complete output is easily 340 lines -and more. You may want to pipe it through a pager program. +smb.conf file which enables all clients to print. +

Example 18.1. Simple configuration with BSD printing

[global]
printing = bsd
load printers = yes
[printers]
path = /var/spool/samba
printable = yes
public = yes
writable = no

+This is only an example configuration. Samba assigns default values to all +configuration parameters. On the whole the defaults are conservative and +sensible. When a parameter is specified in the smb.conf file this overwrites +the default value. The testparm utility when run as root +is capable of reporting all setting, both default as well as smb.conf file +settings. Testparm gives warnings for all mis-configured +settings. The complete output is easily 340 lines and more, so you may want +to pipe it through a pager program.

The syntax for the configuration file is easy to grasp. You should know that is not very picky about its @@ -147,7 +137,7 @@ reminder: It even tolerates some spelling errors (like "browsable" instead of "browseable"). Most spelling is case-insensitive. Also, you can use "Yes|No" or "True|False" for boolean settings. Lists of names may be separated by commas, spaces or tabs. -

Verification of "Settings in Use" with testparm

+

Verification of "Settings in Use" with testparm

To see all (or at least most) printing related settings in Samba, including the implicitly used ones, try the command outlined below (hit "ENTER" twice!). It greps for all occurrences of "lp", "print", @@ -198,20 +188,20 @@ as shown above: You can easily verify which settings were implicitly added by Samba's default behaviour. Don't forget about this point: it may be important in your future dealings with Samba. -

Note

testparm in Samba-3.0 behaves differently from 2.2.x: used +

Note

testparm in samba 3 behaves differently from 2.2.x: used without the "-v" switch it only shows you the settings actually written into ! To see the complete -configuration used, add the "-v" parameter to testparm.

A little Experiment to warn you

+configuration used, add the "-v" parameter to testparm.

A little Experiment to warn you

Should you need to troubleshoot at any stage, please always come back to this point first and verify if "testparm" shows the parameters you expect! To give you an example from personal experience as a warning, -try to just "comment out" the load printers" +try to just "comment out" the load printers" parameter. If your 2.2.x system behaves like mine, you'll see this:

 root# grep "load printers" /etc/samba/smb.conf
  #      load printers = Yes
-        # This setting is commented ooouuuuut!!
-
+ # This setting is commented ooouuuuut!!
+ 
 root# testparm -v /etc/samba/smb.conf | egrep "(load printers)"
         load printers = Yes
 
@@ -232,7 +222,7 @@ any more... at least not by this ;-)
 
 

Only when setting the parameter explicitly to -"load printers = No" +"load printers = No" would Samba recognize my intentions. So my strong advice is:

  • Never rely on "commented out" parameters!

  • Always set it up explicitly as you intend it to behave.

  • Use testparm to uncover hidden @@ -258,7 +248,7 @@ ask testparm what the Samba print configuration would be, if you used this minimalistic file as your real :

    -root#  testparm -v /etc/samba/smb.conf-minimal | egrep "(print|lpq|spool|driver|ports|[)"
    +root# testparm -v 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
    @@ -291,8 +281,8 @@ testparm issued 2 warnings:
     [printers] section as printable,
     and

  • because we didn't tell it which spool directory to use.

-However, this was not fatal, and Samba-3.0 will default to values that -will work here. But, please!, don't rely on this and don't use this +However, this was not fatal, and samba will default to values that +will work here. Please, don't rely on this and don't use this example! This was only meant to make you careful to design and specify 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 @@ -304,61 +294,20 @@ 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 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"
-

+

# This defines LPRng as the printing system"
printing = lprng

will regard the whole of the string after the "=" sign as the value you want to define. And this is an invalid value that will be ignored, and a default value used instead.] -

Extended Sample Configuration to Print with Samba-3

-Here we show a more verbose example configuration for print related -settings in an . Below is a discussion +

Extended Sample Configuration to Print

+ In the extended BSD configuration example we show a more verbose example configuration for print related + settings in BSD-printing style environment . 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 .

Tip

-if you read access it with the Samba Web Administration Tool (SWAT), -and then write it to disk again, it will be optimized in a way such -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 in environments with -hundreds or thousands of clients.

- [global]
-         printing = bsd
-         load printers = yes
-         show add printer wizard = yes
-         printcap name = /etc/printcap
-         printer admin = @ntadmin, root
-         total print jobs = 100
-         lpq cache time = 20
-         use client driver = no
-
- [printers]
-         comment = All Printers
-         printable = yes
-         path = /var/spool/samba
-         browseable = no
-         guest ok = yes
-         public = yes
-         read only = yes
-         writable = no       
-
- [my_printer_name]
-         comment = Printer with Restricted Access
-         path = /var/spool/samba_my_printer
-         printer admin = kurt
-         browseable = yes
-         printable = yes
-         writeable = no
-         hosts allow = 0.0.0.0
-         hosts deny = turbo_xp, 10.160.50.23, 10.160.51.60
-         guest ok = no
-

+which don't need to be specified because they are set by default. You +might be able to do with a leaner smb.conf file.

Example 18.2. Extended configuration with BSD printing

[global]
printing = bsd
load printers = yes
show add printer wizard = yes
printcap name = /etc/printcap
printer admin = @ntadmin, root
total print jobs = 100
lpq cache time = 20
use client driver = no
[printers]
comment = All Printers
printable = yes
path = /var/spool/samba
browseable = no
guest ok = yes
public = yes
read only = yes
writable = no
[my_printer_name]
comment = Printer with Restricted Access
path = /var/spool/samba_my_printer
printer admin = kurt
browseable = yes
printable = yes
writeable = no
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 (as pre-configured by your OS @@ -368,31 +317,31 @@ default, because these have been compiled in. To see all settings, let root use the testparm utility. testparm also gives warnings if you have mis-configured certain things.. -

Detailed Explanation of the Example's Settings

+

Detailed Explanation of the Example's Settings

Following is a discussion of the settings from above shown example. -

The [global] Section

+

The [global] Section

The [global] section is one of 4 special sections (along with [[homes], [printers] and [print$]...) It contains all parameters which apply to the server as a whole. It is the place for parameters which -have only a "global" meaning (G). It may also contain service level -parameters (S) which then define default settings for all other +have only a "global" meaning. It may also contain service level +parameters which then define default settings for all other sections and shares. This way you can simplify the configuration and avoid setting the same value repeatedly. (Within each individual section or share you may however override these globally set "share level" settings and specify other values). -

printing = bsd

this causes Samba to use default print commands +

printing = bsd

this causes Samba to use default print commands 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).

Caution

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.

load printers = yes

this tells Samba to create automatically all +printer shares that are not defined differently. Samba 3 no longer +supports the SOFTQ printing system.

load printers = yes

this tells Samba to create automatically all available printer shares. "Available" printer shares are discovered by scanning the printcap file. All created printer shares are also loaded for browsing. If you use this parameter, you do not need to specify @@ -401,8 +350,7 @@ share will clone the configuration options found in the [printers] section. (A load printers = no setting will allow you to specify each UNIX printer you want to share separately, leaving out some you don't want to be -publicly visible and available).

show add printer wizard = -yes

this setting is normally +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 ). It makes the Add Printer Wizard icon show up in the Printers folder of the Samba host's @@ -413,38 +361,38 @@ 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 action), or exchange a printer's driver against any other previously -uploaded driver.

total print jobs = 100

this setting sets the upper limit to 100 print jobs +uploaded driver.

total print jobs = 100

this setting sets the upper limit to 100 print jobs being active on the Samba server at any one time. Should a client submit a job which exceeds this number, a “no more space available on server” type of error message will be returned by Samba to the client. A setting of "0" (the default) means there is no limit at all! -

printcap name = /etc/printcap

this tells Samba where to look for a list of +

printcap name = /etc/printcap

this tells Samba where to look for a list of available printer names. (If you use CUPS, make sure that a printcap file is written: this is controlled by the "Printcap" directive of cupsd.conf). -

printer admin = @ntadmin

members of the ntadmin group should be able to add +

printer admin = @ntadmin

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 +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 +(see below). Note that the printer admin parameter is normally a share level parameter, so you may associate different groups to different printer shares in larger installations, -if you use the printer admin parameter on the +if you use the printer admin parameter on the share levels). -

lpq cache time = 20

this controls the cache time for the results of the +

lpq cache time = 20

this controls the cache time for the results of the lpq command. It prevents the lpq command being called too often and reduces load on a heavily used print server. -

use client driver = no

if set to yes, this setting only +

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. -

The [printers] Section

+

The [printers] Section

This is the second special section. If a section with this name appears in the smb.conf, users are able to connect to any printer specified in the Samba host's printcap file, @@ -454,41 +402,40 @@ 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 -container must be share level parameters (S). -

comment = All printers

the comment is shown next to +container must be share level parameters. +

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 available shares. -

printable = yes

please note well, that the +

printable = yes

please note well, that the [printers] service must be declared as printable. If you specify otherwise, smbd will refuse to 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 +directory specified with the path parameter for this service. It is used by Samba to differentiate printer shares from -file shares.

path = /var/spool/samba

this must point to a directory used by Samba to spool +file shares.

path = /var/spool/samba

this must point to a directory used by Samba to spool incoming print files. It must not be the same as the spool directory specified in the configuration of your UNIX print subsystem! The path would typically point to a directory 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 +

browseable = no

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). -

guest ok = yes

+

guest ok = yes

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 +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 -

lpr -P printername /etc/motd

public = yes

this is a synonym for guest ok = -yes. Since we have guest ok = yes, +

lpr -P printername /etc/motd

public = yes

this is a synonym for guest ok = yes. Since we have guest ok = yes, it really doesn't need to be here! (This leads to the interesting question: “What, if I by accident have to contradictory settings for the same share?” The answer is: the last one encountered by @@ -497,16 +444,16 @@ complain about different settings of the same parameter for the same share! You can test this by setting up multiple lines for the "guest account" parameter with different usernames, and then run testparm to see which one is actually used by Samba.) -

read only = yes

this normally (for other types of shares) prevents +

read only = yes

this normally (for other types of shares) prevents users creating or modifying files in the service's directory. However, in a "printable" service, it is always allowed to write to the directory (if user privileges allow the connection), but only via print spooling operations. "Normal" write operations are not -allowed.

writeable = no

-synonym for read only = yes -

Any [my_printer_name] Section

+allowed.

writeable = no

+synonym for read only = yes +

Any [my_printer_name] Section

If a section appears in the , which is -tagged as printable = yes, Samba presents it as +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 name has more than 8 characters! Also be very careful if you give a @@ -515,37 +462,36 @@ client's connection request to a certain sharename, Samba always tries to find file shares with that name first; if it finds one, it will connect to this and will never ultimately connect to a printer with the same name! -

comment = Printer with Restricted Access

the comment says it all. -

path = /var/spool/samba_my_printer

here we set the spooling area for this printer to +

comment = Printer with Restricted Access

the comment says it all. +

path = /var/spool/samba_my_printer

here we set the spooling area for this printer to another directory than the default. It is not a requirement to set it differently, but the option is available. -

printer admin = kurt

the printer admin definition is different for this +

printer admin = kurt

the printer admin definition is different for this explicitly defined printer share from the general [printers] share. It is not a requirement; we did it to show that it is possible if you want it. -

browseable = yes

we also made this printer browseable (so that the +

browseable = yes

we also made this printer browseable (so that the clients may conveniently find it when browsing the Network Neighbourhood). -

printable = yes

see explanation in last subsection. -

writeable = no

see explanation in last subsection. -

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 +

printable = yes

see explanation in last subsection. +

writeable = no

see explanation in last subsection. +

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 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 -

hosts deny = turbo_xp,10.160.50.23,10.160.51.60 -

all listed hosts are not allowed here (even if they +

hosts deny = turbo_xp,10.160.50.23,10.160.51.60

all listed hosts are not allowed here (even if they belong to the "allowed subnets"). As you can see, you could name IP addresses as well as NetBIOS hostnames here. -

guest ok = no

this printer is not open for the guest account! -

Print Commands

+

guest ok = no

this printer is not open for the guest account! +

Print Commands

In each section defining a printer (or in the [printers] section), a print command parameter may be defined. It sets a command to process the files which have been placed into the Samba print spool directory for that printer. (That spool directory was, if you -remember, set up with the path +remember, set up with the path parameter). Typically, this command will submit the spool file to the Samba host's print subsystem, using the suitable system print command. But there is no requirement that this needs to be the @@ -557,24 +503,24 @@ your own print commands (or even develop print command shell scripts), make sure you pay attention to the need to remove the files from the Samba spool directory. Otherwise your hard disk may soon suffer from shortage of free space. -

Default Print Commands for various Unix Print Subsystems

+

Default Print Commands for various UNIX Print Subsystems

You learned earlier on, that Samba in most cases uses its built-in settings for many parameters if it can not find an explicitly stated one in its configuration file. The same is true for the -print command. The default print command varies -depending on the printing =... parameter +print command. The default print command varies +depending on the printing parameter setting. In the commands listed below, you will notice some parameters of the form %X where X is p, s, J etc. These letters stand for "printername", "spoolfile" and "job ID" respectively. They are explained in more detail further below. Here is an overview (excluding the special case of CUPS, which is discussed in the next chapter): -

If this setting is active......this is used in lieu of an explicit command:
printing = bsd|aix|lprng|plpprint command is lpr -r -P%p %s
printing = sysv|hpuxprint command is lp -c -P%p %s; rm %s
printing = qnxprint command is lp -r -P%p -s %s
printing = bsd|aix|lprng|plplpq command is lpq -P%p
printing = sysv|hpuxlpq command is lpstat -o%p
printing = qnxlpq command is lpq -P%p
printing = bsd|aix|lprng|plplprm command is lprm -P%p %j
printing = sysv|hpuxlprm command is cancel %p-%j
printing = qnxlprm command is cancel %p-%j
printing = bsd|aix|lprng|plplppause command is lp -i %p-%j -H hold
printing = sysv|hpuxlppause command (...is empty)
printing = qnxlppause command (...is empty)
printing = bsd|aix|lprng|plplpresume command is lp -i %p-%j -H resume
printing = sysv|hpuxlpresume command (...is empty)
printing = qnxlpresume command (...is empty)

+

If this setting is active......this is used in lieu of an explicit command:
printing = bsd|aix|lprng|plpprint command is lpr -r -P%p %s
printing = sysv|hpuxprint command is lp -c -P%p %s; rm %s
printing = qnxprint command is lp -r -P%p -s %s
printing = bsd|aix|lprng|plplpq command is lpq -P%p
printing = sysv|hpuxlpq command is lpstat -o%p
printing = qnxlpq command is lpq -P%p
printing = bsd|aix|lprng|plplprm command is lprm -P%p %j
printing = sysv|hpuxlprm command is cancel %p-%j
printing = qnxlprm command is cancel %p-%j
printing = bsd|aix|lprng|plplppause command is lp -i %p-%j -H hold
printing = sysv|hpuxlppause command (...is empty)
printing = qnxlppause command (...is empty)
printing = bsd|aix|lprng|plplpresume command is lp -i %p-%j -H resume
printing = sysv|hpuxlpresume command (...is empty)
printing = qnxlpresume command (...is empty)

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 @@ -597,9 +543,9 @@ check which command takes effect. Then check that this command is adequate and actually works for your installed print subsystem. It is always a good idea to explicitly set up your configuration files the way you want them to work and not rely on any built-in defaults. -

Setting up your own Print Commands

+

Setting up your own Print Commands

After a print job has finished spooling to a service, the -print command will be used by Samba via a +print command will be used by Samba via a system() call to process the spool file. Usually the command specified will submit the spool file to the host's printing subsystem. But there is no requirement at all that this must @@ -652,22 +598,16 @@ expand the included environment variables as usual. (The syntax to include a UNIX environment variable $variable in or in the Samba print command is %$variable.) To give you a working -print command example, the following will log a +print command example, the following will log a print job to /tmp/print.log, print the file, then remove it. Note that ';' is the usual separator for commands in shell scripts: -

-
- print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
-
-

+

print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s

You may have to vary your own command considerably from this example depending on how you normally print files on your system. The default -for the print command parameter varies depending on the setting of -the printing parameter. Another example is: -

- print command = /usr/local/samba/bin/myprintscript %p %s
-

Innovations in Samba Printing since 2.2

+for the print command parameter varies depending on the setting of +the printing parameter. Another example is: +

print command = /usr/local/samba/bin/myprintscript %p %s

Innovations in Samba Printing since 2.2

Before version 2.2.0, Samba's print server support for Windows clients was limited to the level of LanMan printing calls. This is the same protocol level as Windows 9x PCs offer when @@ -682,16 +622,14 @@ The additional functionality provided by the new SPOOLSS support includes: 95/98/NT/2000 clients upon demand (Point'n'Print);

  • Uploading of printer drivers via the Windows NT Add Printer Wizard (APW) or the -Imprints tool set (refer to http://imprints.sourceforge.net); +Imprints tool set.

  • Support for the native MS-RPC printing calls such as -StartDocPrinter, EnumJobs(), etc... (See the MSDN documentation -at http://msdn.microsoft.com/ -for more information on the Win32 printing API);

  • Support for NT Access Control + StartDocPrinter, EnumJobs(), etc... (See the MSDN documentation for more information on the Win32 printing API);

  • Support for NT Access Control Lists (ACL) on printer objects;

  • Improved support for printer queue manipulation through the use of internal databases for spooled job information (implemented by various *.tdb files).

  • -One other benefit of an update is this: Samba-3 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)!

    One slight difference is here: it is possible on a Windows NT print @@ -708,7 +646,7 @@ default permissions assigned by Windows NT to a printer gives the "Print" permissions to the well-known Everyone group. (The older clients of type Win9x can only print to "shared" printers). -

    Client Drivers on Samba Server for Point'n'Print

    +

    Client Drivers on Samba Server for Point'n'Print

    There is still confusion about what all this means: Is it or is it not a requirement for printer drivers to be installed on a Samba host in order to support printing from Windows clients? The @@ -743,10 +681,10 @@ does not use these uploaded drivers in any way to process spooled files. Drivers are utilized entirely by the clients, who download and install them via the "Point'n'Print" mechanism supported by Samba. The clients use these drivers to generate print files in the -format the printer (or the Unix print system) requires. Print files -received by Samba are handed over to the Unix printing system, which +format the printer (or the UNIX print system) requires. Print files +received by Samba are handed over to the UNIX printing system, which is responsible for all further processing, if needed. -

    The [printer$] Section is removed from Samba-3

    +

    The [printer$] Section is removed from Samba 3

    [print$] vs. [printer$] Versions of Samba prior to 2.2 made it possible to use a share @@ -762,7 +700,7 @@ files associated with that printer. Another parameter named printer driver provided a means of defining the printer driver name to be sent to the client. These parameters, including the printer driver file parameter, -are now removed and can not be used in installations of Samba-3.0. +are now removed and can not be used in installations of samba-3. Now the share name [print$] is used for the location of downloadable printer drivers. It is taken from the [print$] service created by Windows NT PCs when @@ -772,7 +710,7 @@ access (in the context of its ACLs) in order to support printer driver down- and uploads. Don't fear -- this does not mean Windows 9x clients are thrown aside now. They can use Samba's [print$] share support just fine. -

    Creating the [print$] Share

    +

    Creating the [print$] Share

    In order to support the up- and downloading of printer driver files, you must first configure a file share named [print$]. The "public" name of this share is @@ -786,42 +724,25 @@ 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 with appropriate values for your site): -

    - [global]
    -      ; members of the ntadmin group should be able to add drivers and set
    -      ; printer properties. root is implicitly always a 'printer admin'.
    -      printer admin = @ntadmin
    -      [....]
    -
    - [printers]
    -      [....]
    -
    - [print$]
    -      comment = Printer Driver Download Area
    -      path = /etc/samba/drivers
    -      browseable = yes
    -      guest ok = yes
    -      read only = yes
    -      write list = @ntadmin, root
    -

    +

    Example 18.3. [print\$] example

    [global]
    # members of the ntadmin group should be able to add drivers and set
    # printer properties. root is implicitly always a 'printer admin'.
    printer admin = @ntadmin
    ...
    [printers]
    ...
    [print$]
    comment = Printer Driver Download Area
    path = /etc/samba/drivers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = @ntadmin, root

    Of course, you also need to ensure that the directory named by the -path parameter exists on the Unix file system. -

    Parameters in the [print$] Section

    +path parameter exists on the UNIX file system. +

    Parameters in the [print$] Section

    [print$] is a special section in . It contains settings relevant to potential printer driver download and local installation by clients. -

    comment = Printer Driver -Download Area

    the comment appears next to the share name if it is +

    comment = Printer Driver + Download Area

    the comment appears next to the share name if it is listed in a share list (usually Windows clients won't see it often but it will also appear up in a smbclient -L sambaserver - output).

    path = /etc/samba/printers

    this is the path to the location of the Windows + output).

    path = /etc/samba/printers

    this is the path to the location of the Windows driver file deposit from the UNIX point of -view.

    browseable = no

    this makes the [print$] share +view.

    browseable = no

    this makes the [print$] share "invisible" in Network Neighbourhood to clients. However, you can still "mount" it from any client using the net use g:\\sambaserver\print$ command in a "DOS box" or the "Connect network drive" menu from Windows -Explorer.

    guest ok = yes

    this gives read only access to this share for all +Explorer.

    guest ok = yes

    this gives read only access to this share for all guest users. Access may be used to download and install printer drivers on clients. The requirement for guest ok = yes depends upon how your site is configured. If users @@ -834,13 +755,13 @@ validated by the Domain Controller in order to logon to the Windows NT session), then guest access is not necessary. Of course, in a workgroup environment where you just want to be able to print without worrying about silly accounts and security, then configure the share -for guest access. You'll probably want to add map to guest -= Bad User in the [global] section +for guest access. You'll probably want to add map to guest = Bad User in the +[global] section as well. Make sure you understand what this parameter does before using it. -

    read only = yes

    as we don't want everybody to upload driver files (or +

    read only = yes

    as we don't want everybody to upload driver files (or even change driver settings) we tagged this share as not -writeable.

    write list = @ntadmin,root

    since the [print$] was made +writeable.

    write list = @ntadmin,root

    since the [print$] was made read only by the previous setting, we need to create a "write list" also. UNIX groups (denoted with a leading "@" character) and users listed here are allowed write access (as an exception to the general @@ -849,13 +770,13 @@ share. Normally you will want to only name administrative level user 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 +printer admin parameter. See the man page for more information on -configuring file shares.

    Subdirectory Structure in [print$]

    +configuring file shares.

    Subdirectory Structure in [print$]

    In order for a Windows NT print server to support the downloading of driver files by multiple client architectures, you must create several subdirectories within the [print$] service -(i.e. the Unix directory named by the path +(i.e. the UNIX directory named by the path parameter). These correspond to each of the supported client architectures. Samba follows this model as well. Just like the name of the [print$] share itself, the subdirectories @@ -890,7 +811,7 @@ client workstation. Open Network Neighbourhood or 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. -

    Installing Drivers into [print$]

    +

    Installing Drivers into [print$]

    You have successfully created the [print$] share in ? And Samba has re-read its configuration? Good. But you are not yet ready to take off. The @@ -908,11 +829,11 @@ Properties and Add Printer Wizard

    The latter option is probably the easier one (even if the only entrance to this realm seems a little bit weird at first). -

    Setting Drivers for existing Printers with a Client GUI

    +

    Setting Drivers for existing Printers with a Client GUI

    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 (as in 2.2.1 and later) this driver name is set to a NULL +will have no real printer driver assigned to them. By default +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. @@ -943,18 +864,18 @@ Once the APW is started, the procedure is exactly the same as the one you are familiar with in Windows (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.

    Assuming you have connected with an administrative (or root) account -(as named by the printer admin parameter), +(as named by the printer admin parameter), you will also be able to modify other printer properties such as ACLs and default device settings using this dialog. For the default device settings, please consider the advice given further below. -

    Setting Drivers for existing Printers with +

    Setting Drivers for existing Printers with rpcclient

    The second way to install printer drivers into [print$] and set them up in a valid way can be @@ -969,7 +890,7 @@ time with the setdriver subcommand.

    We will provide detailed hints for each of these steps in the next few paragraphs. -

    Identifying the Driver Files

    +

    Identifying the Driver Files

    To find out about the driver files, you have two options: you could investigate the driver CD which comes with your printer. Study the *.inf file on the CD, if it is contained. This @@ -1017,35 +938,35 @@ create scripts to automate the procedure for a large number of printers and drivers. Note the different quotes used to overcome the different spaces in between words:

    -root# rpcclient -U'Danka%xxxx' -c 'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP
    -  cmd = getdriver "Heidelberg Digimaster 9110 (PS)" 3
    +root# rpcclient -U'Danka%xxxx' -c \
    +	'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP
    +cmd = getdriver "Heidelberg Digimaster 9110 (PS)" 3
     
    -  [Windows NT x86]
    -  Printer Driver Info 3:
    -          Version: [2]
    -          Driver Name: [Heidelberg Digimaster 9110 (PS)]
    -          Architecture: [Windows NT x86]
    -          Driver Path: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.DLL]
    -          Datafile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.ppd]
    -          Configfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.DLL]
    -          Helpfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.HLP]
    +[Windows NT x86]
    +Printer Driver Info 3:
    +  Version: [2]
    +  Driver Name: [Heidelberg Digimaster 9110 (PS)]
    +  Architecture: [Windows NT x86]
    +  Driver Path: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.DLL]
    +  Datafile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.ppd]
    +  Configfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.DLL]
    +  Helpfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.HLP]
       
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.DLL]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.INI]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1KMMin.DLL]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.dat]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.cat]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.def]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hre]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.vnd]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hlp]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de_reg.HLP]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01Aux.dll]
    -          Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.NTF]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.DLL]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.INI]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1KMMin.DLL]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.dat]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.cat]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.def]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hre]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.vnd]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hlp]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de_reg.HLP]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01Aux.dll]
    +  Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.NTF]
       
    -          Monitorname: []
    -          Defaultdatatype: []
    -
    +  Monitorname: []
    +  Defaultdatatype: []
     

    You may notice, that this driver has quite a big number of Dependentfiles (I know worse cases however). Also, @@ -1072,7 +993,7 @@ Windows 2000 changed this. While it still can use the Kernel Mode drivers (if this is enabled by the Admin), its native mode for printer drivers is User Mode execution. This requires drivers designed for this. These type of drivers install into the "3" subdirectory. -

    Collecting the Driver Files from a Windows Host's +

    Collecting the Driver Files from a Windows Host's [print$] Share

    Now we need to collect all the driver files we identified. in our previous step. Where do we get them from? Well, why not retrieve them @@ -1085,15 +1006,15 @@ listing is edited to include linebreaks for readability: root# 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) - [...] +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 +Get file Hddm91c1_de.DLL? y +getting file \W32X86\2\Hddm91c1_de.DLL of size 876544 as Hddm91c1_de.DLL +[...]

    After this command is complete, the files are in our current local @@ -1108,7 +1029,7 @@ 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. -

    Depositing the Driver Files into [print$]

    +

    Depositing the Driver Files into [print$]

    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 @@ -1129,7 +1050,8 @@ running getdriver against the original store the files into a Samba/UNIX print server's [print$] share...

    -root# smbclient //SAMBA-CUPS/print\$ -U'root%xxxx' -c 'cd W32X86; put HDNIS01_de.DLL; \
    +		root# 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;      \
    @@ -1138,26 +1060,25 @@ store the files into a Samba/UNIX print s
       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]
    - putting file HDNIS01_de.DLL as \W32X86\HDNIS01_de.DLL (4465.5 kb/s) (average 4465.5 kb/s)
    - putting file Hddm91c1_de.ppd as \W32X86\Hddm91c1_de.ppd (12876.8 kb/s) (average 4638.9 kb/s)
    - putting file HDNIS01U_de.DLL as \W32X86\HDNIS01U_de.DLL (20249.8 kb/s) (average 5828.3 kb/s)
    - putting file HDNIS01U_de.HLP as \W32X86\HDNIS01U_de.HLP (9652.8 kb/s) (average 5899.8 kb/s)
    - putting file Hddm91c1_de.DLL as \W32X86\Hddm91c1_de.DLL (23777.7 kb/s) (average 10400.6 kb/s)
    - putting file Hddm91c1_de.INI as \W32X86\Hddm91c1_de.INI (98.6 kb/s) (average 10329.0 kb/s)
    - putting file Hddm91c1KMMin.DLL as \W32X86\Hddm91c1KMMin.DLL (22931.5 kb/s) (average 10501.7 kb/s)
    - putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat (2462.8 kb/s) (average 10393.0 kb/s)
    - putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat (4925.3 kb/s) (average 10356.3 kb/s)
    - putting file Hddm91c1_de.def as \W32X86\Hddm91c1_de.def (417.9 kb/s) (average 10290.1 kb/s)
    - putting file Hddm91c1_de.hre as \W32X86\Hddm91c1_de.hre (22571.3 kb/s) (average 11338.5 kb/s)
    - putting file Hddm91c1_de.vnd as \W32X86\Hddm91c1_de.vnd (3384.6 kb/s) (average 10754.3 kb/s)
    - putting file Hddm91c1_de.hlp as \W32X86\Hddm91c1_de.hlp (18406.8 kb/s) (average 10839.8 kb/s)
    - putting file Hddm91c1_de_reg.HLP as \W32X86\Hddm91c1_de_reg.HLP (20278.3 kb/s) (average 11386.3 kb/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)
    -
    +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]
    +putting file HDNIS01_de.DLL as \W32X86\HDNIS01_de.DLL
    +putting file Hddm91c1_de.ppd as \W32X86\Hddm91c1_de.ppd
    +putting file HDNIS01U_de.DLL as \W32X86\HDNIS01U_de.DLL
    +putting file HDNIS01U_de.HLP as \W32X86\HDNIS01U_de.HLP
    +putting file Hddm91c1_de.DLL as \W32X86\Hddm91c1_de.DLL
    +putting file Hddm91c1_de.INI as \W32X86\Hddm91c1_de.INI
    +putting file Hddm91c1KMMin.DLL as \W32X86\Hddm91c1KMMin.DLL
    +putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat
    +putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat
    +putting file Hddm91c1_de.def as \W32X86\Hddm91c1_de.def
    +putting file Hddm91c1_de.hre as \W32X86\Hddm91c1_de.hre
    +putting file Hddm91c1_de.vnd as \W32X86\Hddm91c1_de.vnd
    +putting file Hddm91c1_de.hlp as \W32X86\Hddm91c1_de.hlp
    +putting file Hddm91c1_de_reg.HLP as \W32X86\Hddm91c1_de_reg.HLP
    +putting file HDNIS01Aux.dll as \W32X86\HDNIS01Aux.dll
    +putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF
     

    Phewww -- that was a lot of typing! Most drivers are a lot smaller -- many only having 3 generic PostScript driver files plus 1 PPD. Note, @@ -1169,47 +1090,47 @@ re-location will automatically be done by the don't forget to also put the files for the Win95/98/ME architecture into the WIN40/ subdirectory should you need them). -

    Check if the Driver Files are there (with smbclient)

    +

    Check if the Driver Files are there (with smbclient)

    For now we verify that our files are there. This can be done with smbclient too (but of course you can log in via SSH also and do this through a standard UNIX shell access too):

    -root# smbclient //SAMBA-CUPS/print\$ -U 'root%xxxx' -c 'cd W32X86; pwd; dir; cd 2; pwd; dir'
    +root# 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]
    +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]
     
    -  Current directory is \\SAMBA-CUPS\print$\W32X86\
    -  .                                   D        0  Sun May  4 03:56:35 2003
    -  ..                                  D        0  Thu Apr 10 23:47:40 2003
    -  2                                   D        0  Sun May  4 03:56:18 2003
    -  HDNIS01Aux.dll                      A    15356  Sun May  4 03:58:59 2003
    -  Hddm91c1KMMin.DLL                   A    46966  Sun May  4 03:58:59 2003
    -  HDNIS01_de.DLL                      A   434400  Sun May  4 03:58:59 2003
    -  HDNIS01_de.NTF                      A   790404  Sun May  4 03:56:35 2003
    -  Hddm91c1_de.DLL                     A   876544  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.INI                     A      101  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.dat                     A     5044  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.def                     A      428  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.hlp                     A    37699  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.hre                     A   323584  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.ppd                     A    26373  Sun May  4 03:58:59 2003
    -  Hddm91c1_de.vnd                     A    45056  Sun May  4 03:58:59 2003
    -  HDNIS01U_de.DLL                     A   165888  Sun May  4 03:58:59 2003
    -  HDNIS01U_de.HLP                     A    19770  Sun May  4 03:58:59 2003
    -  Hddm91c1_de_reg.HLP                 A   228417  Sun May  4 03:58:59 2003
    -                40976 blocks of size 262144. 709 blocks available
    -
    -  Current directory is \\SAMBA-CUPS\print$\W32X86\2\
    -  .                                   D        0  Sun May  4 03:56:18 2003
    -  ..                                  D        0  Sun May  4 03:56:35 2003
    -  ADOBEPS5.DLL                        A   434400  Sat May  3 23:18:45 2003
    -  laserjet4.ppd                       A     9639  Thu Apr 24 01:05:32 2003
    -  ADOBEPSU.DLL                        A   109568  Sat May  3 23:18:45 2003
    -  ADOBEPSU.HLP                        A    18082  Sat May  3 23:18:45 2003
    -  PDFcreator2.PPD                     A    15746  Sun Apr 20 22:24:07 2003
    -                40976 blocks of size 262144. 709 blocks available
    +Current directory is \\SAMBA-CUPS\print$\W32X86\
    +.                                   D        0  Sun May  4 03:56:35 2003
    +..                                  D        0  Thu Apr 10 23:47:40 2003
    +2                                   D        0  Sun May  4 03:56:18 2003
    +HDNIS01Aux.dll                      A    15356  Sun May  4 03:58:59 2003
    +Hddm91c1KMMin.DLL                   A    46966  Sun May  4 03:58:59 2003
    +HDNIS01_de.DLL                      A   434400  Sun May  4 03:58:59 2003
    +HDNIS01_de.NTF                      A   790404  Sun May  4 03:56:35 2003
    +Hddm91c1_de.DLL                     A   876544  Sun May  4 03:58:59 2003
    +Hddm91c1_de.INI                     A      101  Sun May  4 03:58:59 2003
    +Hddm91c1_de.dat                     A     5044  Sun May  4 03:58:59 2003
    +Hddm91c1_de.def                     A      428  Sun May  4 03:58:59 2003
    +Hddm91c1_de.hlp                     A    37699  Sun May  4 03:58:59 2003
    +Hddm91c1_de.hre                     A   323584  Sun May  4 03:58:59 2003
    +Hddm91c1_de.ppd                     A    26373  Sun May  4 03:58:59 2003
    +Hddm91c1_de.vnd                     A    45056  Sun May  4 03:58:59 2003
    +HDNIS01U_de.DLL                     A   165888  Sun May  4 03:58:59 2003
    +HDNIS01U_de.HLP                     A    19770  Sun May  4 03:58:59 2003
    +Hddm91c1_de_reg.HLP                 A   228417  Sun May  4 03:58:59 2003
    +              40976 blocks of size 262144. 709 blocks available
     
    +Current directory is \\SAMBA-CUPS\print$\W32X86\2\
    +.                                   D        0  Sun May  4 03:56:18 2003
    +..                                  D        0  Sun May  4 03:56:35 2003
    +ADOBEPS5.DLL                        A   434400  Sat May  3 23:18:45 2003
    +laserjet4.ppd                       A     9639  Thu Apr 24 01:05:32 2003
    +ADOBEPSU.DLL                        A   109568  Sat May  3 23:18:45 2003
    +ADOBEPSU.HLP                        A    18082  Sat May  3 23:18:45 2003
    +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 2 subdir (probably from a previous @@ -1222,7 +1143,7 @@ Point'n'Print. The reason is: Samba doesn't know yet that these files are something special, namely printer driver files and it doesn't know yet to which print queue(s) these driver files belong. -

    Running rpcclient with +

    Running rpcclient with adddriver

    So, next you must tell Samba about the special category of the files you just uploaded into the [print$] share. This @@ -1231,21 +1152,23 @@ 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:

    -root# 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
    +		root# 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"
    +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"
     
    - Printer Driver dm9110 successfully installed.
    +Printer Driver dm9110 successfully installed.
     
     

    After this step the driver should be recognized by Samba on the print @@ -1257,7 +1180,7 @@ files successfully, but render the driver unworkable. So take care! Hints about the syntax of the adddriver command are in the man page. The CUPS printing chapter of this HOWTO collection provides a more detailed description, if you should need it. -

    Check how Driver Files have been moved after +

    Check how Driver Files have been moved after adddriver finished

    One indication for Samba's recognition of the files as driver files is the successfully installed message. @@ -1266,9 +1189,9 @@ Another one is the fact, that our files have been moved by the subdirectory. You can check this again with smbclient:

    -root# smbclient //SAMBA-CUPS/print\$ -Uroot%xxxx -c 'cd W32X86;dir;pwd;cd 2;dir;pwd'
    +root# smbclient //SAMBA-CUPS/print\$ -Uroot%xx -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]
    + Domain=[CUPS-PRINT] OS=[UNIX] Server=[Samba 2.2.7a]
     
       Current directory is \\SAMBA-CUPS\print$\W32X86\
       .                                   D        0  Sun May  4 04:32:48 2003
    @@ -1305,7 +1228,7 @@ subdirectory. You can check this again with
     

    Another verification is that the timestamp of the printing TDB files is now updated (and possibly their filesize has increased). -

    Check if the Driver is recognized by Samba

    +

    Check if the Driver is recognized by Samba

    Now the driver should be registered with Samba. We can easily verify this, and will do so in a moment. However, this driver is not yet associated with a particular @@ -1349,19 +1272,19 @@ 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. -

    A side note: you are not bound to specific driver names

    +

    A side note: you are not bound to specific driver names

    You can name the driver as you like. If you repeat the adddriver step, with the same files as before, but with a different driver name, it will work the same:

     root# 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
    +  -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" 
    @@ -1383,7 +1306,7 @@ repeatedly. Each run "consumes" the files you had put into the
     respective subdirectories. So you must precede an
     smbclient ... put command before each
     rpcclient ...  adddriver" command.
    -

    La Grande Finale: Running rpcclient with +

    Running rpcclient with setdriver

    Samba still needs to know which printer's driver this is. It needs to create a mapping of the driver to a printer, and @@ -1413,20 +1336,19 @@ 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`.

    "The Proof of the Pudding lies in the Eating" (Client Driver Install -Procedure)

    +kill -HUP `pidof smbd`.

    Client Driver Install Procedure

    A famous philosopher said once: “The Proof of the Pudding lies in the Eating”. The proof for our setup lies in the printing. So let's install the printer driver onto the client PCs. This is not as straightforward as it may seem. Read on. -

    The first Client Driver Installation

    +

    The first Client Driver Installation

    Especially important is the installation onto the first client PC (for each architectural platform separately). Once this is done correctly, all further clients are easy to setup and shouldn't need further attention. What follows is a description for the recommended first procedure. You work now from a client workstation. First you should guarantee that your connection is not unwittingly mapped to -bad user "nobody". In a DOS box type: +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 given in the definition. @@ -1462,7 +1384,7 @@ Data" set is still incomplete.

    You must now make sure that a valid "Device Mode" is set for the driver. Don't fear -- we will explain now what that means. -

    IMPORTANT! Setting Device Modes on new Printers

    +

    IMPORTANT! Setting Device Modes on new Printers

    In order for a printer to be truly usable by a Windows NT/2K/XP client, it must possess:

    • a valid Device Mode generated by @@ -1489,7 +1411,7 @@ This can be achieved by accessing the drivers remotely from an NT (or 2k/XP) client, as is discussed in the next paragraphs.

      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 @@ -1534,7 +1456,7 @@ properties. Others may crash the client's spooler service. So use this parameter with caution. It is always better to have the client generate a valid device mode for the printer and store it on the server for you. -

    Further Client Driver Install Procedures

    +

    Further Client Driver Install Procedures

    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 @@ -1554,12 +1476,12 @@ 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. -

    Always make first Client Connection as root or "printer admin"

    +

    Always make first Client Connection as root or "printer admin"

    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:

    • a first valid Device Mode is really initialized (see above for more explanation details), and that

    • the default print settings of your printer for all @@ -1573,20 +1495,23 @@ set to Letter, when you are all using

      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" +

      +C:\> 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 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 the printer admins from the setting. +of the printer admin from the setting.

      Now all the other users downloading and installing the driver the same way (called Point'n'Print) will have the same defaults set for them. If you miss this step you'll get a lot of helpdesk calls from your users. But maybe you like to talk to people.... ;-) -

    Other Gotchas

    +

    Other Gotchas

    Your driver is installed. It is ready for Point'n'Print installation by the clients now. You may have tried to download and use it @@ -1596,7 +1521,7 @@ example, suppose you didn't manage to "set the defaults" on the printer, as advised in the preceding paragraphs? And your users complain about various issues (such as “We need to set the paper size for each job from Letter to A4 and it won't store it!”) -

    Setting Default Print Options for the Client Drivers

    +

    Setting Default Print Options for the Client Drivers

    The last sentence might be viewed with mixed feelings by some users and 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 @@ -1651,7 +1576,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 ) +(printer admin in ) before a client downloads the driver (the clients can later set their own per-user defaults by following the procedures A. @@ -1685,7 +1610,7 @@ 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. -

    Supporting large Numbers of Printers

    +

    Supporting large Numbers of Printers

    One issue that has arisen during the recent development phase of Samba is the need to support driver downloads for 100's of printers. Using Windows NT APW here is somewhat awkward (to say the least). If you @@ -1735,7 +1660,8 @@ following is an example of how this could be accomplished:

    -root# rpcclient SAMBA-CUPS -U root%secret -c 'setdriver dm9110 "Heidelberg Digimaster 9110 (PS)"'
    +root# 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).
     

    @@ -1745,7 +1671,8 @@ following is an example of how this could be accomplished: cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] - description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),110ppm HiVolume DANKA Stuttgart] + description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),\ + 110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....]

    @@ -1761,7 +1688,8 @@ following is an example of how this could be accomplished: cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] - description:[\\SAMBA-CUPS\dm9110,myphantasydrivername,110ppm HiVolume DANKA Stuttgart] + description:[\\SAMBA-CUPS\dm9110,myphantasydrivername,\ + 110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....]

    @@ -1772,7 +1700,7 @@ commas in the "description" field). After the setdriver command succeeded, all is well. (The CUPS Printing chapter has more info about the installation of printer drivers with the help of rpcclient). -

    Adding new Printers with the Windows NT APW

    +

    Adding new Printers with the Windows NT APW

    By default, Samba exhibits all printer shares defined in smb.conf in the Printers... folder. Also located in this folder @@ -1780,29 +1708,29 @@ is the Windows NT Add Printer Wizard icon. The APW will be shown only 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).

      Tip

      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...

    • ... contains the setting -show add printer wizard = yes (the +show add printer wizard = yes (the default).

    The APW can do various things:

    • upload a new driver to the Samba [print$] share;

    • associate an uploaded driver with an existing (but still "driverless") print queue;

    • exchange the currently used driver for an existing 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 +conjunction with a working add printer command; +a corresponding delete printer command for removing entries from the Printers... folder may be provided too)

    The last one (add a new printer) requires more effort than the previous ones. In order to use the APW to successfully add a printer -to a Samba server, the add printer command must +to a Samba server, the add printer command must have a defined value. The program hook must successfully add the -printer to the Unix print system (i.e. to +printer to the UNIX print system (i.e. to /etc/printcap, /etc/cups/printers.conf or other appropriate files) and to if necessary. @@ -1812,13 +1740,11 @@ exist, smbd will execute the add printer 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 -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 -user may have connected you unwittingly under the wrong +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 user may have connected you unwittingly under the wrong privilege; you should check it by using the smbstatus command. -

    Weird Error Message Cannot connect under a +

    Weird Error Message Cannot connect under a different Name

    Once you are connected with the wrong credentials, there is no means to reverse the situation other than to close all Explorer windows, and @@ -1848,7 +1774,7 @@ message. You close all Explorer Windows and start it again. You try to connect - and this times it works! Windows seems to cache connection info somewhere and doesn't keep it up to date (if you are unlucky you might need to reboot to get rid of the error message). -

    Be careful when assembling Driver Files

    +

    Be careful when assembling Driver Files

    You need to be very careful when you take notes about the files and belonging to a particular driver. Don't confuse the files for driver version "0" (for Win95/98/ME, going into @@ -1989,7 +1915,7 @@ In my example were even more differences than shown here. Conclusion: you must be very careful to select the correct driver files for each driver version. Don't rely on the names alone. Don't interchange files belonging to different driver versions. -

    Samba and Printer Ports

    +

    Samba and Printer Ports

    Windows NT/2000 print servers associate a port with each printer. These normally take the form of LPT1:, COM1:, FILE:, etc. Samba @@ -2008,20 +1934,20 @@ 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”), possesses a -enumports command which can be used to define +enumports command which can be used to define an external program that generates a listing of ports on a system. -

    Avoiding the most common Misconfigurations of the Client Driver

    +

    Avoiding the most common Misconfigurations of the Client Driver

    So - printing works, but there are still problems. Most jobs print well, some don't print at all. Some jobs have problems with fonts, which don't look good at all. Some jobs print fast, and some are dead-slow. We can't cover it all; but we want to encourage you to read the little paragraph about "Avoiding the wrong PostScript Driver Settings" in the CUPS Printing part of this document. -

    The Imprints Toolset

    +

    The Imprints Toolset

    The Imprints tool set provides a UNIX equivalent of the Windows NT Add Printer Wizard. For complete information, please refer to the Imprints web site -athttp://imprints.sourceforge.net/ +at http://imprints.sourceforge.net/ as well as the documentation included with the imprints source distribution. This section will only provide a brief introduction to the features of Imprints. @@ -2034,20 +1960,20 @@ coordinate your efforts on the samba-technical mailing list. The toolset is still in usable form; but only for a series of older printer models, where there are prepared packages to use. Packages for more up to date print devices are needed if Imprints should have a -future.

    What is Imprints?

    +future.

    What is Imprints?

    Imprints is a collection of tools for supporting these goals:

    • Providing a central repository information regarding Windows NT and 95/98 printer driver packages

    • Providing the tools necessary for creating the Imprints printer driver packages.

    • Providing an installation client which will obtain printer drivers from a central internet (or intranet) Imprints Server repository and install them on remote Samba and Windows NT4 print -servers.

    Creating Printer Driver Packages

    +servers.

    Creating Printer Driver Packages

    The process of creating printer driver packages is beyond the scope of this document (refer to Imprints.txt also included with the Samba distribution for more information). In short, an Imprints driver package is a gzipped tarball containing the driver files, related INF files, and a control file needed by the installation client. -

    The Imprints Server

    +

    The Imprints Server

    The Imprints server is really a database server that may be queried via standard HTTP mechanisms. Each printer entry in the database has an associated URL for the actual downloading of the package. Each @@ -2055,7 +1981,7 @@ package is digitally signed via GnuPG which can be used to verify that package downloaded is actually the one referred in the Imprints database. It is strongly recommended that this security check not be disabled. -

    The Installation Client

    +

    The Installation Client

    More information regarding the Imprints installation client is available in the Imprints-Client-HOWTO.ps file included with the imprints source package. @@ -2096,7 +2022,7 @@ if is has not already been installed? The way of sidestepping this limitation is to require that all Imprints printer driver packages include both the Intel Windows NT and 95/98 printer drivers and that NT driver is installed first. -

    Add Network Printers at Logon without User Interaction

    +

    Add Network Printers at Logon without User Interaction

    The following MS Knowledge Base article may be of some help if you need to handle Windows 2000 clients: How to Add Printers with No User Interaction in Windows 2000. ( http://support.microsoft.com/default.aspx?scid=kb;en-us;189105 @@ -2121,13 +2047,7 @@ printers via Samba, but works for Windows-based print servers too): rundll32 printui.dll,PrintUIEntry /y /n "\\sambacupsserver\infotec2105-PS"

    Here is a list of the used commandline parameters: -

    /dn

    deletes a network printer

    /q

    quiet modus

    /n

    names a printer

    /in

    adds a network printer connection

    /y

    sets printer as default printer

    -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 -interest here). -

    • Line 1 deletes a possibly existing previous network +

      /dn

      deletes a network printer

      /q

      quiet modus

      /n

      names a printer

      /in

      adds a network printer connection

      /y

      sets printer as default printer

      • Line 1 deletes a possibly existing previous network printer infotec2105-IPDS (which had used native Windows drivers with LPRng that were removed from the server which was converted to CUPS). The /q at the end eliminates @@ -2171,7 +2091,7 @@ at logon time will not really be noticeable. Printers can be centrally added, changed, and deleted at will on the server with no user intervention required on the clients (you just need to keep the logon scripts up to date). -

      The addprinter command

      +

      The addprinter command

      The addprinter command can be configured to be a shell script or program executed by Samba. It is triggered by running the APW from a client against the Samba print server. The APW asks the @@ -2183,7 +2103,7 @@ on legacy systems, or execute the lpadmin command on more modern systems) and create the associated share in , then the APW will in effect really create a new printer on Samba and the UNIX print subsystem! -

      Migration of "Classical" printing to Samba-3

      +

      Migration of "Classical" printing to Samba

      The basic "NT-style" printer driver management has not changed considerably in 3.0 over the 2.2.x releases (apart from many small improvements). Here migration should be quite easy, especially if you @@ -2194,14 +2114,13 @@ is more of an effort. Please read the appropriate release notes and the HOWTO Collection for 2.2. You can follow several paths. Here are possible scenarios for migration:

      • You need to study and apply the new Windows NT printer -and driver support. Previously used parameters "printer -driver file", " printer driver" and -"printer driver location" are no longer +and driver support. Previously used parameters printer +driver file, printer driver and +printer driver location are no longer supported.

      • If you want to take advantage of WinNT printer driver support you also need to migrate the Win9x/ME drivers to the new setup.

      • An existing printers.def file -(the one specified in the now removed parameter printer -driver file = ...) will work no longer with Samba-3.0. In + (the one specified in the now removed parameter printer driver file) will work no longer with samba 3. In 3.0, smbd attempts to locate a Win9x/ME driver files for the printer in [print$] and additional settings in the TDB and only there; if it fails it will not (as 2.2.x @@ -2217,24 +2136,21 @@ only solution is to use the Windows NT APW to install the NT drivers and the 9x drivers. This can be scripted using smbclient and rpcclient. See the Imprints installation client at:

        -http://imprints.sourceforge.net/ + http://imprints.sourceforge.net/

        for an example. See also the discussion of rpcclient usage in the -"CUPS Printing" section.

      Publishing Printer Information in Active Directory or LDAP

      +"CUPS Printing" section.

    Publishing Printer Information in Active Directory or LDAP

    We will publish an update to this section shortly. -

    Common Errors and Problems

    -Here are a few typical errors and problems people have -encountered. You can avoid them. Read on. -

    I give my root password but I don't get access

    -Don't confuse the root password which is valid for the Unix system +

    Common Errors

    I give my root password but I don't get access

    +Don't confuse the root password which is valid for the UNIX system (and in most cases stored in the form of a one-way hash in a file named /etc/shadow) with the password used to authenticate against Samba!. Samba doesn't know the UNIX password; for root to access Samba resources via Samba-type access, a Samba account for root must be created first. This is often done with the smbpasswd command. -

    My printjobs get spooled into the spooling directory, but then get lost

    -Don't use the existing Unix print system spool directory for the Samba +

    My printjobs get spooled into the spooling directory, but then get lost

    +Don't use the existing UNIX print system spool directory for the Samba spool directory. It may seem convenient and a saving of space, but it only leads to problems. The two must be separate. -

    +

    -- cgit