I already reported this issue a while ago at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822574 The issue is still present in current Samba 4.4.5. I am experiencing problems with RPC printer management (SPOOLSS_ENUMPRINTERS ) with certain printer names. It looks like the problem is caused if the printer name contains an umlaut (non-ASCII character) as the 23rd character. Thus aaaaaaaaaaaaaaaaaaaaaaä causes problems, while aaaaaaaaaaaaaaaaaaaaaä and aaaaaaaaaaaaaaaaaaaaaaaä work(*). I tried dozens other examples that lead me to track down and limit the problem as described above. The problem is observed while using setdriver on the mentioned printer with rpcclient or acessing the "Remote Printers" view on Windows 7 - the window is blank then and no printers are displayed at all. From the logs: Apr 25 14:10:26 iserv smbd[12856]: ndr_push_error(5): Bad character conversion Apr 25 14:10:26 iserv smbd[12856]: ndr_push_error(11): SPOOLSS Buffer: *r->out.info but there's no r->in.buffer Apr 25 14:10:26 iserv smbd[12856]: api_rpcTNP: spoolss: SPOOLSS_ENUMPRINTERS failed. (*) They do not really work, I reported this as #822571 since I do not think that these issues are related.
I'm not able to reproduce this. rpcclient //SAMBA-PRINT01 -UEARTH+administrator%Secret007! -c "enumprinters" flags:[0x800000] name:[\\SAMBA-PRINT01\aaaaaaaaaaaaaaaaaaaaaaä] description:[\\SAMBA-PRINT01\aaaaaaaaaaaaaaaaaaaaaaä,,] comment:[] Also there are no useful logs or details how to reproduce this, see: https://www.samba.org/~asn/reporting_samba_bugs.txt
enumprinters in rpcclient seems to work for me too. setdriver seems to crash. rpcclient $> setdriver 'aaaaaaaaaaaaaaaaaaaaaaä' 'HP Universal Printing PS' Unable to retrieve printer information! result was WERR_WRITE_FAULT Also the "Remote Printers" view on Windows 7 crashes. Open \\servername in explorer, click remote printers, the list is empty. I still can reproduce this bug. I will try to compile more useful debugging information.
rpcclient $> setdriver 'aaaaaaaaaaaaaaaaaaaaaaä' 'HP LaserJet Professional P 1102w' Successfully set aaaaaaaaaaaaaaaaaaaaaaä to driver HP LaserJet Professional P 1102w. Are you using CUPS? I've just fixed a bug with CUPS and umlauts. Patch is on samba-technical mailinglist ...
The posted patch fixes #12183 for me. However, this bug is still present with the patch applied. Will produce some more logs now.
Created attachment 12640 [details] Log (setdriver failing)
Created attachment 12641 [details] Log (setdriver successful) I attached two debug log files from two rpcclient sessions: dev2.iserv.eu ~ # date Do 10. Nov 14:51:10 CET 2016 dev2.iserv.eu ~ # rpcclient_root iserv rpcclient $> setdriver aaaaaaaaaaaaaaaaaaaaaaä 'HP Universal Print Driver PS' Unable to retrieve printer information! result was WERR_WRITE_FAULT rpcclient $> quit dev2.iserv.eu ~ # date Do 10. Nov 14:51:18 CET 2016 dev2.iserv.eu ~ # rpcclient_root iserv rpcclient $> setdriver aaaaaaaaaaaaaaaaaaaaaä 'HP Universal Print Driver PS' Successfully set aaaaaaaaaaaaaaaaaaaaaä to driver HP Universal Print Driver PS. rpcclient $> quit dev2.iserv.eu ~ # date Do 10. Nov 14:56:35 CET 2016 dev2.iserv.eu ~ # (rpcclient_root = exec rpcclient -A /var/lib/iserv/pwd/samba.auth "$@") The only difference is one missing 'a' in the printer name. Let me know what further information would be useful.
Created attachment 12642 [details] testparm output
b) Is your system using UTF-8? b) Are you using CUPS? c) Is the printer name coming form /etc/printcap
I don't know your system, but the encoding in the log file doesn't seem to be utf-8. printername : '\\ISERV\AAAAAAAAAAAAAAAAAAAAAAÃ<84>' This looks really strange ...
(In reply to Andreas Schneider from comment #8) > a) Is your system using UTF-8? Yes. Everything should be UTF-8, not sure how to verify here. > b) Are you using CUPS? Yes. > c) Is the printer name coming form /etc/printcap No, /etc/printcap exists, possibly created by an installed Brother driver, nothing else regarding any other printer in CUPS. Same error occurs with /etc/printcap removed.
(In reply to Andreas Schneider from comment #9) > I don't know your system, but the encoding in the log file doesn't seem to be utf-8. The two log files were created with identical system configuration on the same system. I can delete and recreate the printers and am able to reproduce the issue.
Then I would say that CUPS gives you garbage. It works just fine on my system. And the printer name has strange characters on your system.
My current test machine: [2016/11/10 17:01:29.174065, 3, pid=19772, effective(0, 0), real(0, 0)] ../source3/param/loadparm.c:1622(lp_add_printer) adding printer service Flüwatüt You machiner: [2016/11/10 14:51:16.577938, 3, pid=18327, effective(0, 0), real(0, 0)] ../source3/param/loadparm.c:1626(lp_add_printer) adding printer service aaaaaaaaaaaaaaaaaaaaaaaä So it looks like CUPS is sending the name not UTF-8 encoded.
(In reply to Andreas Schneider from comment #13) This sounds like this could be a bug in CUPS. I set 'cups server = localhost' and ran a second test. I am attaching the server log smbd.log the session log iserv.log and a packet dump for CUPS (port 631). So far I could not see anything strange coming from CUPS. dev2.iserv.eu /var/log/samba # date Do 10. Nov 18:49:51 CET 2016 dev2.iserv.eu /var/log/samba # #service smbd start dev2.iserv.eu /var/log/samba # service smbd start dev2.iserv.eu /var/log/samba # rpcclient_root iserv rpcclient $> setdriver aaaaaaaaaaaaaaaaaaaaaä 'HP Universal Print Driver PS' Successfully set aaaaaaaaaaaaaaaaaaaaaä to driver HP Universal Print Driver PS. rpcclient $> setdriver aaaaaaaaaaaaaaaaaaaaaaä 'HP Universal Print Driver PS' Unable to retrieve printer information! result was WERR_WRITE_FAULT rpcclient $> quit dev2.iserv.eu /var/log/samba # date Do 10. Nov 18:50:25 CET 2016
Created attachment 12645 [details] Test 2 smbd.log
Created attachment 12646 [details] Test 2
I've created a cups printer with the name [aaaaaaaaaaaaaaaaaaaaaaä] and then assigned it a driver. rpcclient $> setdriver aaaaaaaaaaaaaaaaaaaaaaä "HP LaserJet Professional P 1102w]" Successfully set aaaaaaaaaaaaaaaaaaaaaaä to driver HP LaserJet Professional P 1102w]. I'm sorry but I can't reproduce your issue. I guess you get it working, if you remove the printer from Samba and the registry (see samba-regedit). And then apply the patch: https://bugzilla.samba.org/show_bug.cgi?id=12183 As soon as Samba starts up again it should create the registry values with the correct name and you should be able to set the printer driver.
Cleaning up the registry did not change anything. Also choosing a different printer name that was not used before patching samba did not help. It still breaks with (different) umlaut as 23rd character. I works on amd64. I also tested on another i386 production system and I could also reproduce the issue there. Kernel is always 64 bit if that matters. Next step for me would be to try a fresh Debian i386 installation. Are you testing and 32 or 64 Bit? Does anyone else have a Debian stable 32 bit system to test this issue?
I'm testing on Fedora 23 64bit. So it works on a 64bit system but fails on a 32bit system? If you can try with a clean 32bit system, that would be great.
no feedback from bug reporter, I assume it was a config error. Feel free to reopen and provide more new information