Fail to mount windows share

Failed to mount Windows share: Software caused connection abort

Affects Status Importance Assigned to Milestone
samba (Ubuntu) Edit

Bug Description

Since upgrading from 19.10 to 20.04 I cannot access folders on my NAS.

In Nautilus (1:3.36.2-0ubuntu1) I do the following

1. Go to Other Locations
2. Click on Windows Network
3. Double Click on WORKGROUP
4. Double Click on DYLAN (the NAS at 192.168.1.5)
5. Double Click on public (a folder that does not require a password)

I get the error message ‘Unable to access location. Failed to mount windows share: Software caused connection abort’.

What should happen:

Following the above steps the public folder opens and shows the files and folders in it.

My backups using Deja Dup also get this error.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: nautilus 1:3.36.2-0ubuntu1
ProcVersionSign ature: Ubuntu 5.4.0-31.35-generic 5.4.34
Uname: Linux 5.4.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR esult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sat May 23 14:13:33 2020
InstallationDate: Installed on 2015-06-21 (1797 days ago)
InstallationMedia: Ubuntu 15.04 «Vivid Vervet» — Release amd64 (20150422)
SourcePackage: nautilus
UpgradeStatus: Upgraded to focal on 2020-05-15 (7 days ago)
usr_lib_nautilus:

Failed to mount Windows share: Connection timed out

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:

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!

3 Answers 3

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

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

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

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

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.

Linux Mint Forums

Welcome to the Linux Mint forums!

Samba | Failed to mount Windows share: Permission denied

Samba | Failed to mount Windows share: Permission denied

Post by Boarnads » Wed Feb 18, 2015 1:29 am

I’ve been trying to setup samba via webmin and have run into several permission problems. I’m trying to setup several shares that require no authentication.
Below are the current problematic shared folders and their status:

‘/media/username/My Book’
Visible in network but get the following when trying to access it

‘/home/username/Videos’
I can access this from the network but I cannot access any of the individual files, I can only browse through the folders.

‘ls -l’ gives me the following
drwx—— 1 username username 8192 Feb 17 02:18 My Book
drwxr-xr-x 9 username username 4096 Feb 18 04:48 Videos

I also tried chmod 777 for My Book prior to ls -l command, it appeared to complete successfully although the permissions dont seem to have changed.

Any help in resolving this issus would be greatly appreciated
Regards,
Boarnads

Re: Samba | Failed to mount Windows share: Permission denied

Post by Pjotr » Wed Feb 18, 2015 5:26 am

Works flawlessly with my own NAS.

Re: Samba | Failed to mount Windows share: Permission denied

Post by altair4 » Wed Feb 18, 2015 7:19 am

You might be able to fix both problems by forcing the remote quest to appear to be you — at least for your samba shares anyway:

Edit smb.conf and under the workgroup = workgroup line add this line:

I’m using your reference to «username» so change that to whatever your real user name is.

Then restart smbd:

Re: Samba | Failed to mount Windows share: Permission denied

Post by kwisher » Wed Feb 18, 2015 2:36 pm

Is the MyBook formatted as NTFS? This could be the problem as NTFS doesn’t work with Linux permissions, iirc.

altair, please correct me if I am all wet.

Re: Samba | Failed to mount Windows share: Permission denied

Post by altair4 » Wed Feb 18, 2015 3:31 pm

Re: Samba | Failed to mount Windows share: Permission denied

Post by Aristotelian » Wed Feb 18, 2015 5:28 pm

Re: Samba | Failed to mount Windows share: Permission denied

Post by Boarnads » Wed Feb 18, 2015 9:45 pm

The hdd is NTFS but Ive gotten the shares to work before with NTFS drives without the ‘force user’, I just cant remember what I did.
However I’m now using ‘force user = username’ which seems to have fixed the problem, I’m just wondering are there any negatives to ‘force user’, would I be better off getting the permissions working, especially for the ‘Videos’ share?

Thank you all very much for your help.

Re: Samba | Failed to mount Windows share: Permission denied

Post by altair4 » Thu Feb 19, 2015 7:47 am

Warning: This is going to be an unbelievably long answer

Let’s take the worst case scenario and assume the client machine is running Windows and that the user on that machine is named «bob».

When bob tries to access your Mint machine Windows automatically passes his user name to Samba. If there is no match in the samba password database for «bob» the «map to guest = Bad User» parameter is invoked and changes «bob» to the default guest user in Mint which is literally «nobody».

«nobody» doesn’t have access to «/media/username/My Book» at all ( actually no one has access to that folder except «username» ) and only has read access to /home/username/Videos. «force user» makes «nobody» «username» so he now does have access to both. Depending on how you create the samba share definition it still has a gatekeeper function in that if you set it up to be read only the Windows client cannot write even though he is now «username».

If however the user name on the Windows machine is also «username» and his name does appear in the samba password database then he is no longer a «Bad User» and he comes across as «username» and the situation is resolved. If this is the case then you could add yourself ( username ) to the samba password database:

Now the Windows user is also the Linux user and he has access to both shares without the need for «force user». But this will only work for the Windows user «username». You would still need the «force user» if you have many windows clients.

If however the client machine is running Linux the situation changes.

The Linux samba client doesn’t pass a user name when it tries to access the Mint machine because . well . Linux thinks that’s goofy. The Linux client will always come across as «nobody» unless the share requires credentials. In this scenario — for a guest share — «force user» is the easiest way to resolve the situation without changing the guest share to a private share requiring credentials.

Either way «force user» doesn’t give the remote user full access to your entire box only to the samba shares and only within the parameters set in the share definition for those shares.

Edited for spelling — I just can’t spell

Ubuntu Local Network Share — Failed to mount Windows share: Permission denied

I’ve just set up a home server running Ubuntu 19.04 with a dedicated hard drive for file sharing (Ubuntu is installed on a separate drive). Both drives are formatted with ext4.

On the dedicated hard drive I’ve created a share, which looks like this.

On my workstation I can see the share listed. I’ve tried to access it using both Anonymous and Registered User methods.

. but no such luck.

1 Answer 1

The two most common causes of your error message are:

[1] You are not passing the samba password when asked for the «registered user» credentials.

You create that password by adding the user to the samba password database — and I will use my own as an example:

[2] Since the share that was created allows guest access the more likely case is the path to the shared directory does not allow access to the shared folder. The shared folder itself may allow access to guest but the path to that folder may not. For example if the folder is mounted to /media/morbius/Media then only morbius will have access to Media.

I would suggest that you edit your original question and add to it the output of the following command so the folks here can see where the folder is located:

Вручную примонтировать шару win 10

Здравствуйте не могу, по сети, примонтировать шару win10 (win 7,на другом комп-ре монтируется без ошибок), win 10 еще не включал smb 1.0(можно ли не включать) пробовал так:

Помнится там в user= нужно указывать . Попробуй для начала подключится к шаре через smbclient.

Win 7 видится, win 10 нет

1. Не //192.168.1.37/, а //192.168.1.37/sh

2. Каталог /home/user/shdsk/ существует?

3. Юзер first существует и на сервере, и на хосте?

4. В /etc/samba/smb.conf в секции [global]:

1. Пробовал и так, и эдак. 2. /home/user/shdsk существует, win7 туда монтировал и проверял, //192.168.1.37/sh существует с другой win10 доступно по паролю. 3. Пользователь одноименный с одинаковыми паролями на сервере и на хосте. 4. Этого не было, добавил, перезапустил службу smbd, статус зелененький. Но ни чего не изменилось.

Couldn’t chdir to uid=1006,: No such file or directory

Пробел между запятой и следующей опцией не нужен.

То есть не «username=first, uid=1006», а «username=first,uid=1006» и так везде

Читайте также:  Фаервол windows что это
Оцените статью