[Samba] Automatic printer drivers for Windows clients do not work

Sven Hergenhahn Sven.Hergenhahn at eur.sas.com
Wed Sep 28 15:28:16 GMT 2005

Hi All,

My problem is that when I "connect" a printer by right-clicking it on \\smbhost\printers (on a Windows client), it seems to install the printer fine (without error), but I can't print (it seems to print, no error message or so, but it never makes it to the printer).

I was able to install the printer drivers both via the Windows GUI (wizard) and via rpcclient (please see below).
Also my smb.conf should be OK (please see below).

I installed a printer driver on a different Windows desktop manually and that Desktop can print to the same printer (it is actually a script that creates a PDF file and therefore a PS printer driver needs to be installed on the client) without problems. 

The only difference I noticed is that when I do a enumdrivers, it shows \\\\SMBHOST... instead of \\SMBHOST. Also when opening the "Server Properties" and then the Driver Tab, for all drivers it shows "Driver Path: \\\\SMBHOST\print$\W32X86\3" whereas on a Windows Printserver (and in all of the documentation I read about this) I only see two backslashes.

Could that be the problem? If so, is it a bug or can I somehow fix this?

Any hints greatly appreciated.
Thanks in advance,


$ rpcclient -d3 -U'me' -c 'adddriver "Windows NT x86" "HP Color LaserJet 5/5M PS:PSCRIPT5.DLL:HPCLJ5V2.PPD:PS5UI.DLL:PSCRIPT.HLP:NULL:RAW:PSCRIPT.NTF"' localhost

added interface ip=xxx.xxx.xxx.xxx bcast=xxx.xxx.xxx.255 nmask=
Connecting to host=localhost
resolve_lmhosts: Attempting lmhosts lookup for name localhost<0x20>
Connecting to at port 445
Doing spnego session setup (blob length=97)
got OID=1 2 840 113554 1 2 2
got OID=1 2 840 48018 1 2 2
got OID=1 3 6 1 4 1 311 2 2 10
got principal=smbhost$@MYDOMAIN.COM
Got challenge flags:
Got NTLMSSP neg_flags=0x60890215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60080215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60080215
lsa_io_sec_qos: length c does not match size 8
Printer Driver HP Color LaserJet 5/5M PS successfully installed.

$ rpcclient -U'me' -c 'setdriver ps2pdf "HP Color LaserJet 5/5M PS"' localhost
Succesfully set ps2pdf to driver HP Color LaserJet 5/5M PS.

$ rpcclient -U'me' -c 'enumdrivers 3' SMBHOST

Printer Driver Info 3:
        Version: [3]
        Driver Name: [HP Color LaserJet 5/5M PS]
        Architecture: [Windows NT x86]
        Driver Path: [\\\\SMBHOST\print$\W32X86\3\PSCRIPT5.DLL] <<<< HERE!!!
        Datafile: [\\\\SMBHOST\print$\W32X86\3\HPCLJ5V2.PPD]
        Configfile: [\\\\SMBHOST\print$\W32X86\3\PS5UI.DLL]
        Helpfile: [\\\\SMBHOST\print$\W32X86\3\PSCRIPT.HLP]

        Dependentfiles: [\\\\SMBHOST\print$\W32X86\3\PSCRIPT.NTF]

        Monitorname: []
        Defaultdatatype: []
$ rpcclient -Ume -c 'enumprinters' localhost
        description:[\\SMBHOST\ps2pdf,HP Color LaserJet 5/5M PS,print ps to pdf - mail]
        comment:[print ps to pdf - mail]

$ rpcclient -U'me' -c 'getprinter ps2pdf 2' localhost
        portname:[Samba Printer Port]
        drivername:[HP Color LaserJet 5/5M PS]
        comment:[print ps to pdf - mail]

$ find /usr/local/samba/printers/W32X86
######################## smb.conf ##################################        

	workgroup = MYDOMAIN
	netbios name = SMBHOST
	server string = xxxxxxx
	security = ADS
	encrypt passwords = Yes
	password server = xxx.xxx.xxx.xxx
	syslog = 3
	keepalive = 60
	socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
	load printers = No
	preferred master = False
	local master = No
	domain master = False
	browse list = No
	dns proxy = No
	short preserve case = No
	dos filetime resolution = Yes
	idmap uid = 20000-60000
	idmap gid = 20000-60000
	map acl inherit = Yes
	nt acl support = Yes
	winbind use default domain = Yes
	winbind enum users = yes
	winbind enum groups = yes
	allow trusted domains = No
	winbind separator = +
	template shell = /bin/false
	printcap name = cups
	printing = cups
	cups options = "raw"
	use client driver = no
	admin users = root me
	printer admin = root me
	printcap name = /etc/printcap
	cups options = raw
	log file = /var/log/samba/%m.log

  path = /tmp
  printing = bsd
  lpq command = /bin/true
  comment = print ps to pdf - mail
  guest ok = yes
  print command = /usr/local/samba/pdfprinter/ps2mailpdf.pl %U %s /tmp
  printable = yes

  path = /usr/local/samba/printers
  guest ok = yes
  browseable = yes
  read only = no

      comment = All Printers
      path = /var/spool/samba
      browseable = no
      public = yes
      guest ok = yes
      writable = no
      printable = yes
      printer admin = root me

More information about the samba mailing list