Score:0

How to access encrypted samba share?

mx flag

I have a home file and print server running samba on Ubuntu 20.04 Server.

I would like to encrypt traffic between clients and the server. My understanding from man smb.conf is that this is done by setting [global] smb encrypt = required in /etc/samba/smb.conf.

However, when I do this I cannot access my shares from a client on the local network running Ubuntu 20.04.3 Desktop. The error it returns is "Oops! Something went wrong. Don't have permission to access the requested location." In addition, if I try to use smbclient on the client it returns the following error:

~$ smbclient -L ip.of.server -U my_user_name
Enter WORKGROUP\my_user_name's password:
session setup failed: NT_STATUS_ACCESS_DENIED

Commenting out the line and restarting samba fixes both problems.

What additional configuration is needed (server or client side) to be able to access an encrypted samba share?

Thank you.

======

To capture the solution here: I had set max protocol = SMB2 on the server. Commenting out that line fixed the problem.

Score:3
cn flag

SMB encryption requires SMB protocol version 3. (*) Try adding the option --max-protocol=SMB3_11 to your smbclient command to see whether that is the cause of the problem. Also add the option --debuglevel=1 to make smbclient tell you a bit more about what it is doing and where it goes wrong.

(*) Neglecting Samba SMBv1 encryption which shouldn't be relevant here.

Bolio avatar
mx flag
Thank you. That explains it. I had set max protocol = SMB2 on the server. My note says this is to be nice to Windows clients, though I cannot now remember what the problem was. Commenting out that line fixed it. Now I may have a Windows access issue to troubleshoot, but that is a separate question.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.