Missing Printer Name for cups-pdf in Samba
I am running a Debian 8.4 (all current updates applied) server (amd64).
I have Samba up and running and files shares are working across Windows
7, Windows XP and Debian 8 clients. Printer shares are also working -
with one exception: Windows XP clients cannot connect to the pdf printer
Samba is sharing (cups-pdf).
Windows 7 clients have no problem using this "virtual" printer. Printing
directly to CUPS via port 631 is not an option because cups-pdf is not
shareable via CUPS (because CUPS does not know the owner of the print
job, hence cups-pdf cannot assign the resulting file to a directory).
I tried to find out why Windows 7 clients can print without problems to
the pdf printer while at the same time Windows XP clients fail to even
install the printer. It looks like the problem is the fact that for some
reason the cups-pdf printer does not have a printer name in samba after
it has been installed in cups.
In CUPS the cups-pdf printer is installed with a default name of
"PDF_Printer". But in Samba the printer does not have a printer name!
You can check that using "enumprinters" in "rpcclient". So I renamed the
cups-pdf printer from "PDF_Printer" to "PDF-Printer" (using
system-config-printer), restarted Samba, checked again with rpcclient
and this time the printer name was valid. I was then able to install the
printers in my Windows XP clients.
Two questions came to my mind:
[1] Does Samba not like underscore characters in printer names? I
created another printer (a Color Laserjet 5 an LPT1) and named it
"Laserjet_5". No problem with the underscore. The printer name in Samba
is valid. So the underscore character does not seem to be a problem.
[2] What happenes if I rename my cups-pdf printer back to its default
name? I tried, renamed it back to "PDF_Printer" and the printer name in
Samba was gone again!
Conclusion:
This is a specific bug which happenes under CUPS with cups-pdf. If the
name of the CUPS printer is equal to "PDF_Printer" then the according
printer in Samba will not have a printer name. Windows 7 obviously is
less picky ans is happy with just connecting to the printer queue (which
does have a valid name), but good old XP insists on talking to "the
printer", which does not have a valid Samba name if the CUPS printer is
named "PDF_Printer".
XP is obsolete, I know, and I am only running 2 isolated virtual
machines which are used for compatibility testing. Nevertheless, this
problem IS a bug. And might cause problems with other operating systems
which rely on being a Samba client.
If any of the devs reads this, please let me know if I should file a bug
report or if this is a known problem anyway.
Markus Hamilton
Hamilton Engineering
Reply to: