Bug 10628 - use client driver option
use client driver option
Status: NEW
Product: Samba 3.6
Classification: Unclassified
Component: Printing
unspecified
All All
: P5 normal
: ---
Assigned To: printing-maintainers
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-25 16:33 UTC by Vieri
Modified: 2014-05-25 16:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vieri 2014-05-25 16:33:23 UTC
Hi,

I'm having trouble doing what should apparently be quite simple and I'm wondering if it's a bug. I want my Samba host to share a locally-attached usb printer and I want Windows clients to connect to this printer WITHOUT asking the user to select an appropriate driver since it should already be installed in the client's system.

On the Windows client, "printer control panel" -> "File" -> "server properties" shows that the following driver is installed:
"HP LaserJet Professional P1606dn" (in the "name" column)

On the server, I'm using Samba and CUPS.

The Linux printer driver being used is:

# zcat /usr/share/ppd/foo2zjs/HP-LaserJet_Pro_P1606dn.ppd.gz | grep -i name
*PCFileName:    "FOO2ZJS-.PPD"
*ModelName:     "HP LaserJet Pro P1606dn"
*ShortNickName: "HP Las.Jet Pro, foo2zjs-z2"
*NickName:      "HP LaserJet Pro P1606dn Foomatic/foo2zjs-z2 (recommended)"
*driverName foo2zjs-z2/foo2zjs-z2: ""

However, when I try to connect the Samba printer for the first time from the Windows client (\\sambaIP\printername) I get an "unknown printer driver" message requiring me to select/install a driver (even if it's already present in the system). After selecting and installing the "HP LaserJet Professional P1606dn" driver, I can print successfully.

If I remove/delete the printer in Windows and try to reconnect to it, it requires once more that I specify the driver.

I'd really like Windows to detect that it already has the driver for that printer and auto-connect it without user interaction.

I'd like to know why this isn't happening. I suppose Samba or CUPS are not telling Windows clients what driver name is necessary to operate the device. If there were a way to manually force Samba to set a driver name then maybe it would work.
In any case I even set "log level = 10" in smb.conf but I can't seem to see anything in the log related to the printer driver name so I really don't know what Samba is telling Windows.

I'm sure this is pretty trivial so it's probably a dumb mistake on my behalf.
Or could it be a bug?

# cat /etc/samba/smb.conf
[global]
   workgroup = DOMAIN
   server string = HMAN live system
   printcap name = cups
   load printers = yes
   printing = cups
   log file = /var/log/samba/log.%m
   max log size = 5
   map to guest = bad user
   security = user
   encrypt passwords = yes
   unix password sync = Yes
   pam password change = yes
   username map = /etc/samba/smbusers
   template homedir = /home/%U
   template shell = /bin/bash
   obey pam restrictions = yes
   socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
   local master = no
   os level = 20
   domain master = no
   preferred master = no
   idmap uid = 10000-20000
   idmap gid = 10000-20000
   wins server = 10.215.144.31
   dns proxy = yes
   dos charset = 850
   unix charset = ISO8859-1
   max protocol = smb2
   use client driver = yes

[printers]
   comment = All printers
   path = /var/spool/samba
   browseable = yes
   guest ok = yes
   writable = no
   printable = yes
   public = yes
   use client driver = yes

[print$]
   path = /usr/share/cups/drivers
   browseable = yes
   guest ok = yes
   read only = yes
   write list = @adm root

include = /etc/samba/custom.printers

# cat /etc/samba/custom.printers
[custom1$]
   browseable = yes
   printable = yes
   use client driver = yes
   path = /var/spool/samba
   public = yes
   guest ok = yes
   printer = HP_LaserJet_Professional_P1606dn
   comment = HP_LaserJet_Professional_P1606dn printer

Thanks,

Vieri