[Samba] Letter instead of A4 with driver installed via Samba's Point'n'Print

Kay Obermueller kobermueller at web.de
Thu Jan 18 15:10:32 GMT 2007

Hello everyone,
I have already asked for this the cups list/newsgroup, but it seems to me that this might be more a question about Samba. According (hopefully) to these howtos I have setup printers and prepared their cups postscript drivers to be installed automatically via Samba and the so called Point'n'Print method:


Everything works pretty well except that a new windows client that installs the driver tries to print out as Letter instead of A4. I can then change this setting and it is correctly saved, but only on this particular client. Is there a way to set this beforehand in the driver on the server?
In smb.conf this is set:
default devmode = Yes
Does this have influence on this issue?
When I grep for A4 in R020-magicolor.ppd
I get:
*DefaultPageSize: A4
*DefaultPageRegion: A4
*DefaultImageableArea: A4
*DefaultPaperDimension: A4

In both ppd's. In /etc/cups/ppd and in /var/lib/samba/printers/W32X86/3 it is the same. And I already printed correctly in A4 to this printer from Linux and OS X via IPP before using cupsaddsmb.
But here I can find Letter and no A4:
#strings /var/lib/samba/ntprinters.tdb | grep Letter

It seemed to me to be related to what is described here:
So I did repeat cupsaddsmb with "default devmode = no" instead of yes in smb.conf. This gave mixed results.
I tried to delete the driver this way, but it was still set to the printer and didn't work:
#rpcclient -U'root%xxxxx' cups.server.loc -c'deldriver R020-magicolor'
Failed to remove driver R020-magicolor for arch [Windows NT x86] - error
Failed to remove driver R020-magicolor for arch [Windows NT x86] - error

Because I didn't find out how to "unset" the driver I set a non existent driver "NULL":
#rpcclient -U'root%xxxxx' cups.server.loc -c'setdriver R020-magicolor NULL'
Succesfully set R020-magicolor to driver NULL.

I hope this was a correct deletion:
#rpcclient -U'root%xxxxx' cups.server.loc -c"deldriver R020-magicolor"
Driver R020-magicolor removed for arch [Windows NT x86].

This time I hopefully prevented Samba from interfere with the device mode in smb.conf:
default devmode = No

Then I executed cupsaddsmb and specified the driver:
#cupsaddsmb -U root -H localhost -h localhost -v R020-magicolor
It wrote in it's output that all of it's operations were successfull. As a result on the Magicolor it still tries to print as Letter on the first printout without correction of the setting. But on the the server is also another printer, which I thought I didn't change in that procedure and it's driver was correctly set instead!

#rpcclient -U'root%xxxxx' cups.server.loc -c'enumprinters'

        description:[\\cups\LaserJet2200DN,LaserJet2200DN,HP LaserJet in
        comment:[HP LaserJet in R411]

The LaserJet now works perfectly although it ignored the wrong paper for the print job and just printed. Unfortunately the Magicolor is too "intelligent"... How are settings in device mode influenced? Could naming the driver the
same as it's printer cause problems?


More information about the samba mailing list