Bug 13177 - enumdrivers reports no output, while enumprinters works fine
Summary: enumdrivers reports no output, while enumprinters works fine
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: 4.6.9
Hardware: All Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: printing-maintainers
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-06 16:13 UTC by Alex K
Modified: 2017-12-07 16:57 UTC (History)
1 user (show)

See Also:


Attachments
samba-logs-enumdrivers.tar.gz (4.14 MB, application/gzip)
2017-12-06 16:13 UTC, Alex K
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex K 2017-12-06 16:13:10 UTC
Created attachment 13849 [details]
samba-logs-enumdrivers.tar.gz

I have several Samba 4.6.9 printservers in my environment, with a few hundred printers on each. 

This week I noticed that some of them lost any output from enumdrivers command:

$ rpcclient localhost -c 'timeout 90000; enumdrivers' 
Enter ACME\korobkin's password: 
timeout is 90000
$

Same thing happens if I query the list of drivers using Windows 7 x64 printmanagement.msc, Drivers folder. It returns empty folder for this server. 

At the same time printing works, and enumprinters shows assigned drivers:

$ rpcclient localhost -c 'timeout 90000; enumprinters' 
Enter ACME\korobkin's password: 
timeout is 90000
	flags:[0x800000]
	name:[\\LOCALHOST\printer1]
	description:[\\LOCALHOST\printer1,printer1,MP C3003]
	comment:[MP C3003]

	flags:[0x800000]
	name:[\\LOCALHOST\publicpolicy-color]
	description:[\\LOCALHOST\publicprinter-color,publicprinter-color,AFICIO SP C320DN]
	comment:[AFICIO SP C320DN]

<.snip.>

I've cleared cache, spool, enabled level 10 logging, restarted samba and collected all the logs (attached). This is just 2 minutes of running Samba on an idle server, and then doing enumdrivers command. 

What could it be?
Comment 1 Andreas Schneider 2017-12-07 14:12:53 UTC
It looks like it fails because it wants to open the non-existing registry key:

HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\8f-ux-plotter

winreg_get_driver: Could not open driver key (8f-ux-plotter,Windows NT x86,3): WERR_FILE_NOT_FOUND
Comment 2 Alex K 2017-12-07 16:57:13 UTC
Thank you. Yes, a closed pipe event with NT_STATUS_CONNECTION_DISCONNECTED happens after that, and the log file log.spoolssd.1 ends. 

What I don't understand is why would it be looking for this x86 driver for 8f-ux-plotter. The 8f-ux-plotter data in the registry is as follows:

$ cat 8f-ux-plotter-settings.txt
Windows Registry Editor Version 5.00

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\8f-ux-plotter]
"Datatype"="RAW"
"Default Priority"=dword:00000001
"Port"="Samba Printer Port"
"Name"="8f-ux-plotter"
"Print Processor"="winprint"
"Priority"=dword:00000001
"Share Name"="8f-ux-plotter"
"Status"=dword:00000000
"Printer Driver"="HP Designjet Z3200ps 44in Photo PS3"
"Attributes"=dword:00003848
<snipped away options not useful here>

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\8f-ux-plotter\DsSpooler]
"printerName"="8f-ux-plotter"
<snip>
"driverName"="HP Designjet Z3200ps 44in Photo PS3"

<snip> 
;End:


Samba smb.conf includes this line, too:

spoolss: architecture = Windows x64



The driver assigned to this printer is "Printer Driver"="HP Designjet Z3200ps 44in Photo PS3", and it exists (in x64 only, though). 

What makes it search for that driver name? Is it mentioned elsewhere?