Created attachment 11042 [details] smb.conf file Windows 7 fails in an attempt to send a print job to a share \\LYNX\rp with the error "The procedure number is out of range." The job originates in a simple batch script, and the printer share is defined in an smb.conf file on a machine recently upgraded to Debian Jessie. Things worked before the upgrade on Samba version 3.6.6 The samba log file reports connection to the printer with no error comment, then a subsequent disconnect. A zero-length print file is left in the /tmp directory used in definition of the print share. The system was also exhibiting behaviour described in bug 10604, but that problem was fixed by removing winbind which is not needed for a simple workgroup standalone server.
I'm sorry bug Samba 3.6 is EOL, see https://wiki.samba.org/index.php/Samba_Release_Planning
The bug exists in the latest version of Samba provided by the Debian Jessie i.e. release 4.1.17 Samba 3.6.6 worked OK.
I do not expect bugs to be fixed instantly, but I do find it somewhat frustrating that the only response to this bug report is a comment that Samba 3.6 is EOL. The bug has been introduced in Samba 4. In attempts to access a print share from Windows, I get the comment "The procedure number is out of range." Microsoft state categorically that this is due to changes in the application: "Contact the supplier of the running distributed application. There is a version control problem in the application that can only be fixed by the application supplier (procedures were added to an .IDL file without changing the version number)." Something has been changed in Samba 4, and I suspect there is a simple smb.conf file fix for it. I would appreciate beking told what it is.
I've tried reproducing the bug using a Win7 vm and a raw printer on my linux box. I'm using samba 4.1.18 with cups. The test printer was added like this: # lpadmin -p myrawprint -E -v file:///tmp/print_file On the win7 box I was able to add \\linuxbox\myrawprint (using Generic\Text driver) successfully and print the test page which appeared in /tmp/print_file. I'm using the default smb.conf with the generic printer share that automatically handles the system printers. Here are the global and printer related parts, maybe that can help you. In any case, logs from the samba server and/or a tcpdump could be really helpful. [global] workgroup = WORKGROUP passdb backend = tdbsam printing = cups printcap name = cups printcap cache time = 750 cups options = raw map to guest = Bad User include = /etc/samba/dhcp.conf logon path = \\%L\profiles\.msprofile logon home = \\%L\%U\.9xprofile logon drive = P: usershare allow guests = No netbios name = AAPTELPC wins server = wins support = No [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = Yes guest ok = Yes [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @ntadmin root force group = ntadmin create mask = 0664 directory mask = 0775
(In reply to Aurélien Aptel from comment #4) My printer works fine, but is old enough to need a parallel port connection, so I use a parallel port/usb adapter and connect it as /dev/usb/lp0 cups did not handle the connection properly (repeatedly disconnecting) so I reverted to much simpler bsd printing; that works well as I have only one printer. The printer rp on the linux box lynx is a share defined in the smb.conf file I attached to my original report for this bug. The simplest test from windows 7 is to use the command "copy testfile \\lynx\rp"; this works on a linux box that has not been upgraded to debian 8, but it does not work on debian 8. That upgrade moved from samba 3.6 to 4.1 At log level 3 there is little useful information, other than reporting the connection to service rp on lynx, but there are about 3000 lines if I go to log level 10; would it be useful to provide that?
Can you upload the verbose log file and a tcpdump of the exchange? You can use RawCap[1] on Windows. 1: http://www.netresec.com/?page=RawCap
I suggest to read: https://www.samba.org/~asn/reporting_samba_bugs.txt
Created attachment 11279 [details] samba log files
Created attachment 11280 [details] samba tdb files
Attached are samba logs and tdb files in compressed tar format. The system consists of a subnet with 3-bit address space and fixed IP addresses. The DNS records are maintained by the ISP who is connected by ADSL. The machine lynx runs completely up to date Debian jessie and is attached to the printer by a parallel port/usb adapter. The windows machine runs WIndows 7 professional, and when the command "copy testfile \\lynx\rp" is entered, responds with the message "The procedure number is out of range." No printing is done, but a zero-length file is left in /tmp, he directory specified by the print share rp. I have a second Debian machine which has not been updated from wheezy, as I can use it as an indirect route to the printer. The three machines share file systems using nfs and samba, and there is no problem with accessing samba shares on windows. Windows shares can be mounted on the linux machines without any problem, though the upgrade did require a syntax change in the mount command. All machines have the same users, with the same passwords; there is no "admin" user on Windows 7, and user roger has admin capabilities there.
The problem was the line "disable spoolss = yes" in smb.conf This line was originally included as a suggestion from a HOWTO, supposedly needed to prevent samba from loading all the printers listed in /etc/printcap; this was obviously wrong, but did not cause any problems with samba 3.6.6 and only showed up after the upgrade to samba 4.1 made in Debian jessie. In future I will not believe everything I read in HOWTO files.