5

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!

4
  • 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. Jun 12, 2017 at 12:03
  • 1
    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, 2017 at 12:56
  • The question is now how to downgrade my smbclient?
    – Emad
    Jun 12, 2017 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?). Jun 12, 2017 at 14:28

3 Answers 3

7

The suggestions here work i.e. add in the [Global] section of the smb.conf file

client min protocol = SMB2
client max protocol = SMB2

Most of the computers on my network run Ubuntu 16.04 and the problem was getting the error message.

Unable to access location. Failed to mount Windows share: Connection Timed Out.

when connecting to a newer machine running Ubuntu 20.04. The new machine could see the network and connect to any machine on it, but not the other way around, i.e. the older machines running Ubuntu 16.04 could not access the Ubuntu 20.04 machine and responded with

Unable to access location. Failed to mount Windows share: Connection Timed Out.  
4

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

[global]
client min protocol = SMB3
client max protocol = SMB3
2
  • 1
    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. Sep 19, 2019 at 14:15
  • For me too... SMB2 works for connecting to another Ubuntu samba share. Has this samba implementation ever worked for anyone out of the box without constant and painful tweaking with it, restarting machines etc?... Oct 15, 2020 at 9:29
-1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .