Manu Shamanna
2024-Oct-24 13:05 UTC
[Samba] Could not find a suitable mechtype in NEG_TOKEN_INIT error in libsmbclient 4.19.4
>>> Hi, >>> >>> >>> [global] >>> workgroup = SAMBA >>> security = user >>> passdb backend = tdbsam >>> client max protocol = SMB3 >>> >> >>I think this all down to Samba raising the default lowest SMB protocol >>to '2' at 4.11.0 >> >>As this is the client, libsmbclient will read /etc/samba/smb.conf and >>anything found there will override its defaults which on 4.10.x will >>have been these: >> >>client ipc max protocol = SMB3_11 >>client ipc min protocol = NT1 >>client max protocol = SMB3_11 >>client min protocol = CORE >On the 4.19 request, the server response is below. > > >Frame 372: 308 bytes on wire (2464 bits), 308 bytes captured (2464 >bits) on interface any, id 0I was looking at a different server. In 4.19, the response from the same server is below, which still does not work. And I dont see any different at all in server response between 4.10 vs 4.19 libsmb requests. Frame 197: 380 bytes on wire (3040 bits), 380 bytes captured (3040 bits) on interface any, id 0 Linux cooked capture v1 Internet Protocol Version 4, Src: 10.213.83.50, Dst: 192.168.1.135 Transmission Control Protocol, Src Port: 445, Dst Port: 49716, Seq: 1, Ack: 237, Len: 312 NetBIOS Session Service SMB2 (Server Message Block Protocol version 2) SMB2 Header Negotiate Protocol Response (0x00) [Preauth Hash: e3a0c4ad26291cf1362416fd3145e0548ae0202cc675ea09b14127d7253e887d60faa35d773f1e1308f930cf52e6cfd08e4a2ea855812c3ab0d5e378a74badb4] StructureSize: 0x0041 Security mode: 0x01, Signing enabled Dialect: SMB 3.1.1 (0x0311) NegotiateContextCount: 2 Server Guid: 1d1584b9-bf7c-4bc5-b11f-67c1bc1ef0cd Capabilities: 0x0000002f, DFS, LEASING, LARGE MTU, MULTI CHANNEL, DIRECTORY LEASING Max Transaction Size: 8388608 Max Read Size: 8388608 Max Write Size: 8388608 Current Time: Oct 24, 2024 19:12:57.532179700 India Standard Time Boot Time: Aug 7, 2023 10:11:38.342574400 India Standard Time Blob Offset: 0x00000080 Blob Length: 120 Security Blob [?]: 607606062b0601050502a06c306aa03c303a060a2b06010401823702021e06092a864882f71201020206092a864886f712010202060a2a864886f71201020203060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c GSS-API Generic Security Service Application Program Interface OID: 1.3.6.1.5.5.2 (SPNEGO - Simple Protected Negotiation) Simple Protected Negotiation negTokenInit mechTypes: 5 items MechType: 1.3.6.1.4.1.311.2.2.30 (NEGOEX - SPNEGO Extended Negotiation Security Mechanism) MechType: 1.2.840.48018.1.2.2 (MS KRB5 - Microsoft Kerberos 5) MechType: 1.2.840.113554.1.2.2 (KRB5 - Kerberos 5) MechType: 1.2.840.113554.1.2.2.3 (KRB5 - Kerberos 5 - User to User) MechType: 1.3.6.1.4.1.311.2.2.10 (NTLMSSP - Microsoft NTLM Security Support Provider) negHints hintName: not_defined_in_RFC4178 at please_ignore NegotiateContextOffset: 0x000000f8 Negotiate Context: SMB2_PREAUTH_INTEGRITY_CAPABILITIES Negotiate Context: SMB2_ENCRYPTION_CAPABILITIES Regards, Manu