Reputation: 101
I have java code that writes data to remote destination using smb2 (using java smbj 11.0.5). When destination is Windows shared folder, everything is working, and the messages are encrypted.
When destination is Linux (with samba smbd version 4.15.13) the messages are passed without encryption. If I try to force smbd encryption (by using: "smb encrypt = mandatory" in smb.conf), the client receive STATUS_ACCESS_DENIED
Dialect SMB 3.1.1 (0x0311) exist in smb Negotiate Protocol Request message and is selected by Negotiate Protocol Response
My question: What do I need to install or configure in the Linux machine, so that the encryption will work?
Thanks in advance
Upvotes: 0
Views: 555
Reputation: 101
I found the problem in the smb client side: The "Negotiate Protocol Request" message, did not contain "ENCRYPTION" (0x40) capability.
The windows share probably ignores it and use encryption anyway, but samba server does not use encryption without it.
In Java smbj (as smb client), I added smbConfig.withEncryptedData(true) and it solved the problem.
Upvotes: 0