I was able to connect a few months ago by my Ubuntu 16.04 to Windows shared server driver of my institute using the "connect to server" option on a desktop panel using smb:// and the server IP address.

Now when I try to connect again it give me this error message:

Unhandled error message: Failed to mount Windows share: Connection timed out

What could be happened/changed to give this error?

Does that have to do with updating software? The samba is already at the newest version!

  • 1
    Where are you trying to connect from? Publicly exposing services is not very secure. In my campus we must connect via VPN prior to accessing their services. Maybe they put in place recently a new security policy which forbids remote (off-site) connections. – CijcoSistems Jun 12 '17 at 12:03
  • I am trying to do it from my institute office, from the same place where I used to do it! I was trying to figure out what kind of reason it could be and I found that maybe updating the smbclient to version 4 leads to refusing mounting it! – Emad Jun 12 '17 at 12:56
  • The question is now how to downgrade my smbclient? – Emad Jun 12 '17 at 13:02
  • You can install a specific version with: apt-get install package_name=version. Check serverfault.com/questions/108080/… to find available versions of a package. Also keep in mind that smbclient AFAIK is a CLI tool, maybe you mean the one used by the desktop tool (probably gvfs-backends?). – CijcoSistems Jun 12 '17 at 14:28

Edit and add the below entries to /etc/samba/smb.conf, under [global] It should look like

client min protocol = SMB3
client max protocol = SMB3
| improve this answer | |
  • On my system setting both to SMB2 is what did the trick. I think @Emad complained about the newer version messing things up, as well. – Jonathan Y. Sep 19 '19 at 14:15

For me, I used to be able to connect to a corporate Windows share drive with Nautilus with Ubuntu 16.04, but no longer after switching to Ubuntu 18.04. Nautilus is supposed to prompt my username and password to connect to the Window share drive, but in Ubuntu 18.04, it just immediately gave the error Unable to access location. Failed to mount Windows share: Connection Timed Out. without even prompting for the username and password. I think the reason is because Ubuntu 18.04 defaults to using SMB3, which may not be compatible with the Windows share, depending on your situation.

I was able to fix it by editing sudo vi /etc/samba/smb.conf and adding client max protocol = SMB2 under the [global] section. (You could also add client min protocol = SMB2, but it wasn't necessary for me.)

Then it prompted for my username/password, and I was able to connect to the Windows share drive.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.