OrdinaryButt Posted September 1, 2022 Share Posted September 1, 2022 (edited) I am trying to connect a stupid printer scanner, that supposedly supports SMBv2 but it simply fails to connect to the share (tried with hostname, IP, public or private share, all lower case). The device doesn't tell me what fails, the Unraid general log doesn't list attempted connection. I am hoping I can find a log that tells me what is wrong. Edited September 1, 2022 by OrdinaryButt Quote Link to comment
JorgeB Posted September 1, 2022 Share Posted September 1, 2022 Go to Settings -> SMB -> SMB Extras and add: log level = 3 logging = syslog Then check the syslog, note that Samba will get very chatty so it can fill it up after a few hours. Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 3 hours ago, JorgeB said: Go to Settings -> SMB -> SMB Extras and add: log level = 3 logging = syslog Then check the syslog, note that Samba will get very chatty so it can fill it up after a few hours. Thank you, that did it. It looks like the printer is requesting SMB v2.002 but Unraid is rejecting it as "no protocol supported". I have "min protocol = SMB2" in the config. Any idea how to proceed with this or who to ask? Sep 1 07:10:33 QVC smbd[26867]: Allowed connection from 192.168.9.223 (192.168.9.223) Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.933008, 3] ../../source3/smbd/oplock.c:1429(init_oplocks) Sep 1 07:10:33 QVC smbd[26867]: init_oplocks: initializing messages. Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.933058, 3] ../../source3/smbd/process.c:1957(process_smb) Sep 1 07:10:33 QVC smbd[26867]: Transaction 0 of length 62 (0 toread) Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.933080, 3] ../../source3/smbd/process.c:1549(switch_message) Sep 1 07:10:33 QVC smbd[26867]: switch message SMBnegprot (pid 26867) conn 0x0 Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.935118, 3] ../../source3/smbd/negprot.c:636(reply_negprot) Sep 1 07:10:33 QVC smbd[26867]: Requested protocol [NT LM 0.12] Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.935145, 3] ../../source3/smbd/negprot.c:636(reply_negprot) Sep 1 07:10:33 QVC smbd[26867]: Requested protocol [SMB 2.002] Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.935217, 3] ../../source3/smbd/negprot.c:757(reply_negprot) Sep 1 07:10:33 QVC smbd[26867]: reply_negprot: No protocol supported ! Sep 1 07:10:33 QVC smbd[26867]: [2022/09/01 07:10:33.935388, 3] ../../source3/smbd/server_exit.c:249(exit_server_common) Sep 1 07:10:33 QVC smbd[26867]: Server exit (no protocol supporte Quote Link to comment
Frank1940 Posted September 1, 2022 Share Posted September 1, 2022 (edited) From smb.conf Quote # we don't do printers show add printer wizard = No disable spoolss = Yes load printers = No printing = bsd printcap name = /dev/null You will find this file in /etc/samba directory. It can not be changed as it generated when Linux is unpacked and installed during the boot process. (Well, that is not completely true as you could use sed in an executable shell file to modify it--- not a task for the faint at heart!) You should be able to override these settings by adding the proper settings commands in the smb-extra.conf file. (But don't ask me what commands will be required to set things up properly. You will have to read the samba documentation to find that out. You can find this by googling for it.) EDIT: I was looking at what was turned off. It may be that the 'add printer wizard' was not compiled with samba for inclusion in Unraid--- You will have to check that out... Edited September 1, 2022 by Frank1940 Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 13 minutes ago, Frank1940 said: From smb.conf You will find this file in /etc/samba directory. It can not be changed as it generated when Linux is unpacked and installed during the boot process. (Well, that is not completely true as you could use sed in an executable shell file to modify it--- not a task for the faint at heart!) You should be able to override these settings by adding the proper settings commands in the smb-extra.conf file. (But don't ask me what commands will be required to set things up properly. You will have to read the samba documentation to find that out. You can find this by googling for it.) EDIT: I was looking at what was turned off. It may be that the 'add printer wizard' was not compiled with samba for inclusion in Unraid--- You will have to check that out... Sorry, I should have been more clear. It is a Mulfti Function Printer, scan to SMB network folder is what I am trying to achieve. Quote Link to comment
Frank1940 Posted September 1, 2022 Share Posted September 1, 2022 Try googling the printer model Linux SMB setup or problems and see what you can find. You also try the support pages of the printer manufacturer and see if they have any help. I assume that you can make it work on, say, a Windows PC. Does it require that you have a driver setup on that computer for it to do what you want it to do? Can you setup for storage on an Unraid share from that device? Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 1 minute ago, Frank1940 said: Try googling the printer model Linux SMB setup or problems and see what you can find. You also try the support pages of the printer manufacturer and see if they have any help. I assume that you can make it work on, say, a Windows PC. Does it require that you have a driver setup on that computer for it to do what you want it to do? Can you setup for storage on an Unraid share from that device? Nothing to do with drivers. It looks to me like the SMB handshake fails. Scanner is requesting SMB v2.002 and Unraid is responding with "no protocol supported". Quote Link to comment
JorgeB Posted September 1, 2022 Share Posted September 1, 2022 If I'm not mistaken the minimum SMB2 version supported by Samba is 2.02, you might need to use SMB1 1 Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 10 minutes ago, JorgeB said: If I'm not mistaken the minimum SMB2 version supported by Samba is 2.02, you might need to use SMB1 Oh crap. I hope you wrong. I will research it later. Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 (edited) 7 hours ago, JorgeB said: If I'm not mistaken the minimum SMB2 version supported by Samba is 2.02, you might need to use SMB1 I couldn't find any references to this 2.02 version. I tried enabling v1 on unRAID with this line in the SAMBA extra config but it seems wrong: "min protocol = SMB1" EDIT: Removing the whole line seems like opening up SAMBA to lower SMB version and the scanner now works. I really do not like the idea of keeping v1 open. Any idea who can help with this? Edited September 1, 2022 by OrdinaryButt Quote Link to comment
dlandon Posted September 1, 2022 Share Posted September 1, 2022 10 minutes ago, OrdinaryButt said: I couldn't find any references to this 2.02 version. I tried enabling v1 on unRAID with this line in the SAMBA extra config but it seems wrong: "min protocol = SMB1" EDIT: Removing the whole line seems like opening up SAMBA to lower SMB version and the scanner now works. I really do not like the idea of keeping v1 open. Any idea who can help with this? SMBv1 is controlled with the "Enable NetBIOS" setting. If set to "Yes" SMBv1 is enabled. If it is set to "No" it is disabled. Quote Link to comment
OrdinaryButt Posted September 1, 2022 Author Share Posted September 1, 2022 (edited) 12 minutes ago, dlandon said: SMBv1 is controlled with the "Enable NetBIOS" setting. If set to "Yes" SMBv1 is enabled. If it is set to "No" it is disabled. So in the "Samba Extra Config" I had this line: min protocol = SMB2 I deleted it, and the scanner got access. How can I check for sure SMBv1 is off? Edited September 1, 2022 by OrdinaryButt Quote Link to comment
Frank1940 Posted September 1, 2022 Share Posted September 1, 2022 (edited) 46 minutes ago, OrdinaryButt said: How can I check for sure SMBv1 is off? 58 minutes ago, dlandon said: SMBv1 is controlled with the "Enable NetBIOS" setting. If set to "Yes" SMBv1 is enabled. If it is set to "No" it is disabled. Settings >>>> Network Services >>> SMB EDIT: I had some Media boxes from the 2010 period that required SMBv1. When the abve setting was "No", they did not work. I suspect that the "min protocol = SMB2" restricts SMB2 to SMB-2.02 and higher! Edited September 1, 2022 by Frank1940 Quote Link to comment
OrdinaryButt Posted September 2, 2022 Author Share Posted September 2, 2022 1 hour ago, Frank1940 said: Settings >>>> Network Services >>> SMB EDIT: I had some Media boxes from the 2010 period that required SMBv1. When the abve setting was "No", they did not work. I suspect that the "min protocol = SMB2" restricts SMB2 to SMB-2.02 and higher! Ok, so it seems like "min protocol = SMB2" does the same thing as "NetBIOS=NO" or at least it has the same effect for me. With the line removed from Extra config, once I set NetBIOS=NO, the scanner lost access and I confirmed with older Windows 7 machine with SMBv2 disabled that does not want to connect. So I am back at square zero. Need a way to allow SMB v2.002 to be allowed. Quote Link to comment
dlandon Posted September 2, 2022 Share Posted September 2, 2022 1 hour ago, OrdinaryButt said: Need a way to allow SMB v2.002 to be allowed. I don't think you'll get that. Ceck this link: http://www.infotinks.com/correlating-versions-samba-smbcifs/ Scroll down a bit abnd you'll see samba supports 2.02 and above. Quote Link to comment
JorgeB Posted September 2, 2022 Share Posted September 2, 2022 10 hours ago, OrdinaryButt said: I couldn't find any references to this 2.02 version. Quote SMB2: Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available. SMB2_02: The earliest SMB2 version. SMB2_10: Windows 7 SMB2 version. By default SMB2 selects the SMB2_10 variant https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Quote Link to comment
Frank1940 Posted September 2, 2022 Share Posted September 2, 2022 @OrdinaryButt, this may be a stupid question at this point, but I will ask it anyway. Have you checked to see if there is a firmware/software update for that printer? I tend to suspect that the SMB version that is installed on that device is a propriety version that was proposed but never accepted beyond the developers of that 'version'. As it is probably behaves typically for SMB implementations when negotiating for a common SMB protocol, it would fall back to using an earlier version of the SMB protocol. In this case, it would be SMBv1. (I would suspect that this prototype SMB version had the updated instruction set of SMBv2 but had the same security 'features' as SMBv1.) Quote Link to comment
OrdinaryButt Posted September 6, 2022 Author Share Posted September 6, 2022 On 9/2/2022 at 1:19 AM, dlandon said: I don't think you'll get that. Ceck this link: http://www.infotinks.com/correlating-versions-samba-smbcifs/ Scroll down a bit abnd you'll see samba supports 2.02 and above. On 9/2/2022 at 8:10 AM, JorgeB said: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html On 9/2/2022 at 1:15 PM, Frank1940 said: @OrdinaryButt, this may be a stupid question at this point, but I will ask it anyway. Have you checked to see if there is a firmware/software update for that printer? I tend to suspect that the SMB version that is installed on that device is a propriety version that was proposed but never accepted beyond the developers of that 'version'. As it is probably behaves typically for SMB implementations when negotiating for a common SMB protocol, it would fall back to using an earlier version of the SMB protocol. In this case, it would be SMBv1. (I would suspect that this prototype SMB version had the updated instruction set of SMBv2 but had the same security 'features' as SMBv1.) I did more tests. With NetBIOS enabled (allegedly unRAID opened for SMB v1, The scanner connects and server responds with "selected protocol SMB 2.02" (see attached screenshot). Further more, I powered up my dusty Windows 7 machine, DISABLED SMB v1, confirmed it got disabled after reboot, and the scanner has no issue connecting to the Windows 7 share. So I don't know exactly what is going on here but it isn't as black and white as it was thought thus far. I opened a support ticket and was told the forum was the best place to get support (I didn't quiet like this answer). Is any one of you unRAID developer? Quote Link to comment
Frank1940 Posted September 7, 2022 Share Posted September 7, 2022 Basically, With SMB, all devices with a certain version (whether 2.02. 2.2 or 3.0) of SMB installed will automatically negotiate any version of SMB below that version. So if the server and the scanner are communicating using SMBv1. When you disable version 1 on the server, it will not communicate at any version below 2.02. Quote Link to comment
OrdinaryButt Posted September 7, 2022 Author Share Posted September 7, 2022 Just now, Frank1940 said: Basically, With SMB, all devices with a certain version (whether 2.02. 2.2 or 3.0) of SMB installed will automatically negotiate any version of SMB below that version. So if the server and the scanner are communicating using SMBv1. When you disable version 1 on the server, it will not communicate at any version below 2.02. Look the screenshot above. Scanner is requesting 2.002, server replies with protocol 2_02 selected, not v1. 1 Quote Link to comment
Frank1940 Posted September 7, 2022 Share Posted September 7, 2022 1 hour ago, OrdinaryButt said: Look the screenshot above. Scanner is requesting 2.002, server replies with protocol 2_02 selected, not v1. You now know what will work. You will have to deal with the facts of the situation. You have a decision to make. Either have a single server setup to allow SMBv1 or replace the printer/scanner. (I have maintained for years that SMB is a Kludge and when you find something that does not work the way you want to, you have to find some hack that will allow you to work around it. I doubt if anyone in the Linux Samba group would even consider addressing this problem. You do know that the most common variant of the SMB protocol is actually controlled by Microsoft. Everyone attempts to emulate its functionality. See here: https://docs.microsoft.com/en-us/windows/win32/fileio/microsoft-smb-protocol-and-cifs-protocol-overview and https://en.wikipedia.org/wiki/Server_Message_Block ) Quote Link to comment
OrdinaryButt Posted September 7, 2022 Author Share Posted September 7, 2022 (edited) 8 hours ago, Frank1940 said: You now know what will work. This makes no sense. I have clearly discovered a bug. With NetBIOS enabled (allegedly means SMB v1 allowed), if the log had said SMB v1 protocol is selected, I would be done by now. By the log says 2_02 is selected. Also, scanner works fine with Windows 7 and SMB v1 disabled (allegedly 2.02 min version) The bug could be simply erroneous log report print (which will not solve my problem), but it is still a bug and should be addressed. Hopefully a decent developer will pick this up and look into it. Edited September 7, 2022 by OrdinaryButt Quote Link to comment
dlandon Posted September 7, 2022 Share Posted September 7, 2022 18 minutes ago, OrdinaryButt said: This makes no sense. I have clearly discovered a bug. With NetBIOS enabled (allegedly means SMB v1 allowed), if the log had said SMB v1 protocol is selected, I would be done by now. By the log says 2_02 is selected. Also, scanner works fine with Windows 7 and SMB v1 disabled (allegedly 2.02 min version) The bug could be simply erroneous log report print (which will not solve my problem), but it is still a bug and should be addressed. Hopefully a decent developer will pick this up and look into it. I've done a bit of research into this along with several other people here on the forum. The conclusion is that this isn't anything LT will be interested in working on for the following reasons: You are using a printer that needs a firmware update. SMB is not written by LT. LT configures samba, but has no control over it's operation. You appear to be the only user experiencing this issue. You have several options here: Enable SMBv1 and live with that. Lobby your printer manufacturer to provide a firmware update. Take your issue to the samba development team for a resolution. A future release of samba may resolve this issue, but I doubt it. 1 1 Quote Link to comment
Solution OrdinaryButt Posted September 7, 2022 Author Solution Share Posted September 7, 2022 (edited) I found a single line config solution: "min protocol = SMBv2_02" This specifically enables 2.02 (I am going to assume that 2.002 is either a bug in the syslog print or something similar). "...=SMB2" or skipping the line forces minimum ver2.10 I have confirmed SMBv1 is down with a SMBv1 client. Thanks to those who tried to help, not to those that suggested buying a new printer or giving up on this. Edited September 8, 2022 by OrdinaryButt Quote Link to comment
JorgeB Posted September 8, 2022 Share Posted September 8, 2022 8 hours ago, OrdinaryButt said: =SMB2" or skipping the line forces minimum ver2.10 I posted above that using just SMB2 enables 2.10 On 9/2/2022 at 9:10 AM, JorgeB said: SMB2_02: The earliest SMB2 version. SMB2_10: Windows 7 SMB2 version. By default SMB2 selects the SMB2_10 variant Though because of the 2.002 issue or bug I didn't think 2.02 would work, but glad it does. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.