Ubuntu 18.04 - Samba shares problem fix

Updated: May 5, 2018

Microsoft Windows makes up the vast majority of desktop systems in the world. Easily 90%. This means that if you're testing Linux or considering dual-booting Windows and Linux, you will most likely have a Windows machine in your setup, and you will want to share files. Samba is the easiest way to do things. In your Linux box, in a file manager, in the address bar, type smb://, followed by a host name or IP address, and you should be able to connect to your Windows shares. Well, in Ubuntu 18.04, not so anymore.

I've encountered this problem while testing Bionic Beta and then again when I took Kubuntu 18.04 for a spin. In both cases, I was not able to reach my Windows shares. Now, this is a stupid problem, because I can connect to Windows shares from EVERY other Linux system I have. Let me show you how you can fix this.

Problem in more detail

I've already talked about this in my Kubuntu review, but here's a recap. Security zealots are doing their best to make computer usage hard if not impossible. Restrictions that possibly make sense in the corporate world are copied blindly into the home environment (SELinux, Samba, etc), and you end up with unusable systems. Which defeats the purpose of these security mechanisms. Security is only good if it does not impede functionality.

Three years ago, you could connect to Samba shares anonymously, no problem. Then, there was some Samba issue in the enterprise world, and since, you have the Samba authentication bullshit in the desktop world, too. And then, in Ubuntu 17.10, initial Samba connectivity was slow - until they fixed it. Now, it does not work, at all. You get the following error:

Ubuntu, Samba does not work

Kubuntu, Samba does not work

On the command line, you get this (with smbclient):

Reconnecting with SMB1 for workgroup listing.
Connection to failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

This is pure and absolutely nonsense. Security for the sake of it. Anal-retentive OCD madness that ruins the desktop experience. The reason is, they changed the default protocol version and whatnot, and actually, who cares. People just want to be able to share things with their Windows boxes easily!


We will fix this by editing the default Samba configuration file. If one does not exist - it should - create it. Then, open the file (as root or sudo) in a text editor. The location of the Samba configuration is as follows:


And then add the following line anywhere in the file:

client max protocol = NT1

Save the file. If your file manager is open, close it. You should not need to log out or restart the system. Try connecting to your Windows shares now. You should see an authentication prompt, and everything ought to work like in the past. Issue solved. We can go back to sanity.


Disdain is probably the best word to describe my attitude toward this security madness. In general, the security card has always been overplayed, way way overplayed, and it makes even less sense in the Linux desktop world, and it makes absolutely zero sense when you talk about file sharing in the home environment.

Functionality is the most important thing. Everything else is secondary. If you cannot connect to your machines and share files, it does not matter what protocol you're using. The Linux desktop is on a long, steady decline from its peak around 2014, and the latest Samba crap is just the last instance in the neverending sadness saga. Hopefully, this tutorial will help you regain the necessary functionality. See you around.