Bug 10447 - Printer shouldn't get renamed when a driver is uploaded via Explorer
Summary: Printer shouldn't get renamed when a driver is uploaded via Explorer
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.6.22
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: printing-maintainers
QA Contact: Samba QA Contact
Depends on:
Reported: 2014-02-14 21:25 UTC by Alex K
Modified: 2015-01-08 20:18 UTC (History)
0 users

See Also:

registry.tdb-dump-before.txt (29.69 KB, text/plain)
2014-02-14 21:26 UTC, Alex K
no flags Details
registry.tdb-dump-after.txt (32.51 KB, text/plain)
2014-02-14 21:26 UTC, Alex K
no flags Details
enumprinters-2-before.txt (2.21 KB, text/plain)
2014-02-14 21:27 UTC, Alex K
no flags Details
enumprinters-2-after.txt (2.25 KB, text/plain)
2014-02-14 21:27 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 2014-02-14 21:25:35 UTC
This happens on a Linux printserver that serves Windows clients using manufacturer-provided Windows drivers for printers. 

If I want to use a manufacturer-provided Windows driver for a printer, here is how I upload it. The name of my printer is jeeves. 

1. Open \\printserver in Windows explorer
2. Click "View remote Printers" button (available in XP, Vista, 7, but not 8). 
3. Right-click desired printer, choose Properties. 
4. Switch to Advanced tab, press "New driver" button. 
5. Point the wizard to the location of my manufacturer-provided Windows driver. 
In this case I use "RICOH Aficio MP C2551 PCL 5c". 
6. Wait until all the files upload to printserver, click OK. 

Now, refreshing the list of printers on the remote printers list (step 2 above) will show that the printer has been renamed into "RICOH Aficio MP C2551 PCL 5c". Windows clients won't be able to use it until I rename it back into jeeves. 

rpcclient enumprinters before upload:


after upload:

	name:[\\LOCALHOST\RICOH Aficio MP C2551 PCL 5c]
	description:[\\LOCALHOST\RICOH Aficio MP C2551 PCL 5c,RICOH Aficio MP C2551 PCL 5c,Jeeves]

This is super-inconvenient and error-prone, because it is easy to rename wrong printer, large printserver might already have a printer named "RICOH Aficio MP C2551 PCL 5c" forgotten since the last upload, so two printers get mixed up, etc. 

Please make sure the name is kept when a binary driver is uploaded. 

I'm attaching a tdbdump of the registry.tdb with one single printer called jeeves before I uploaded the driver, and another dump after "RICOH Aficio MP C2551 PCL 5c x64" was uploaded (I didn't rename the printer back).

Also attaching 'enumprinters 2' output before and after the upload.
Comment 1 Alex K 2014-02-14 21:26:33 UTC
Created attachment 9685 [details]

registry.tdb dump before uploading a binary driver.
Comment 2 Alex K 2014-02-14 21:26:53 UTC
Created attachment 9686 [details]

registry.tdb dump after uploading a binary driver.
Comment 3 Alex K 2014-02-14 21:27:35 UTC
Created attachment 9687 [details]
Comment 4 Alex K 2014-02-14 21:27:47 UTC
Created attachment 9688 [details]
Comment 5 Alex K 2014-03-05 21:46:03 UTC
For the record, same behaviour confirmed for Samba 4.1.5.
Comment 6 David Disseldorp 2015-01-08 17:29:09 UTC
Hi Alex,

Does the "force printername = yes" smb.conf parameter satisfy your requirement? The printer-rename-on-driver-assignment behaviour was implemented to reflect what Windows spoolss servers under the same circumstances.
Comment 7 Alex K 2015-01-08 20:18:20 UTC
I had no clue this parameter exists, despite for looking through documentation many times. Looks like this is exactly what I need and it seems to be working as expected. Thank you!