I am NOT an expert!!!! But, from what I've been reading, the values in the Protocol version map (and that may be seen in some places as `ProtocolVersionMap` or `protocol_vers_map` depending where you're looking/reading) is NOT a 1 for 1 value. At least for MacOS.
Instead it is a map. Done by each "bit" in the number being a flag, and for programmers, more commonly known as a bitmask.
Bit 1 is to enable/disable V1
Bit 2 is to enable/disable V2
Bit 3 is to enable/disable V3
And so, the values you have are
0 = In theory, support no version.
1 = Support ONLY V1
2 = Support ONLY V2
3 = Support V1 AND V2
4 = Support ONLY V3
5 = Support V1 AND V3
6 = Support V2 AND V3
7 = Support V1, V2, AND V3
That's the theory!
If you run the following ...
$ sudo scutil --prefs com.apple.smb.server.plist
Password:
> get /
> d.show
<dictionary> {
DOSCodePage : 437
LocalKerberosRealm : LKDC:SHA1.192345B0DB15F0814DDDA2A2AB4D3DE5983D84D8
NetBIOSName : ArrayQueue-MBP
ProtocolVersionMap : 255
ServerDescription : ArrayQueue MPB
SigningRequired : false
protocolVersionMap : 2
}
> quit
(You can type "help" if you want to see what you can do).
Now, with that, you'll see I've got mine set to 2, which, in theory, would be ONLY supporting v2.
But, if I run
$ nmap -p445 --script smb-protocols 192.168.0.101
Starting Nmap 7.95 ( https://nmap.org ) at 2024-06-17 13:12 BST
Nmap scan report for 192.168.0.101
Host is up (0.00018s latency).
PORT STATE SERVICE
445/tcp open microsoft-ds
Host script results:
| smb-protocols:
| dialects:
| 2:0:2
| 2:1:0
| 3:0:0
|_ 3:0:2
Nmap done: 1 IP address (1 host up) scanned in 5.16 seconds
Even after turning off/on SMB support and a reboot, the "dialects" are STILL exactly as they were when I started.
I've tried setting the version to 1, 7, 127, and 255 ... all common values to select everything (programming brain on this).
But no matter what I do, I can't get a Windows VM to see the shares from my Mac. But weirdly, I can quite happily see the shares from Windows on my Mac.
Also, the /etc/nsmb.conf file got completely wiped when I rebooted. So no idea on that either!
Like I said, not an expert on this and I'm as frustrated as anyone else would be. This ALL used to work. Need to try and get the old Intel MacBook Pro out of storage!
I think (pure opinion now on a decade of using MacBooks), Apple do not really think "developers" are their use case for MacBooks. This sort of "low level" (it really is NOT low level!!! I promise you that!!!) is "outside" of their target audience.
We all get used to detailed blogs, version controlled open sourced software with everything documented that when we come to something from Apple, it's almost like the idea of us asking questions like this is because we want to rip them off and steal all their IP ... or something like that!!!
Whilst there IS protectionism (and in cases, rightly so), the responses I've read really shows that no one has a clue! Some poor developer deep within Apple rights the code, and never gets to see the light of day in terms of the actual issues it is dealing with. Again, counterargument, we are a VERY small number of people who would have this issue, and so why focus so much energy on it.
Back and forth, swings and roundabouts.
I just wish it was more "open" so rather than us all finding bits and pieces all over the 'net, it would actually be handled via a decent Wiki of some sort. Something that knows how to organise information in a constructive manner.
And I bet you, there's probably an app for all of that that I've never heard of!
Rant over.