Trouble browsing windows network or mounting shares

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Trouble browsing windows network or mounting shares

Post by fung0 »

I'm more or less a Linux beginner - but I have installed Mint no less than a half-dozen times, on at least 4 different desktops and laptops. EACH and EVERY time, I've had trouble accessing my Windows network devices.

The symptoms are just a little different each time. However, they inevitably include the inability to browse the "Windows Network" from Caja. I've fixed the problem twice - without knowing exactly how. The process involved (re)installing various Samba components (which should already have been included in the Mint install), editing (and un-editing) the smb.conf file, and browsing dozens, if not hundreds, of threads like this one.

I deliberately started my networking tests almost immediately after a clean install of the latest Mint (20.3). I've tried most of the fixes I could find online, starting with the simplest and most obvious. No luck at all. I'm unable to access my brand-new Synology server - or any of the other devices I've been happily using for years under (ugh!) Windows. Most of the diagnostics come back with results that don't match any of those I'm seeing in these threads! After many hours of frustration, I am still trying, and will gladly post diagnostics here if anyone wants to see them.

Can anyone explain why this is happening? Linux is such a hugely impressive creation. So why doesn't basic Windows networking 'just work,' right out of the box, first time every time?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
RowlandP
Level 4
Level 4
Posts: 238
Joined: Tue Jan 26, 2021 7:30 am

Re: Trouble browsing windows network or mounting shares

Post by RowlandP »

Your problem is compounded by the purchase of the synology device, this uses a version of Samba that synology has mangled to suit their purposes and (as far as I am aware) has never supplied the code for their changes. The problem is further compounded by the fact that Samba (along with Windows) is trying to move away from SMBv1 and the various gui tools (which have nothing to do with Samba) do not seem to have cottoned on to this fact yet.
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

RowlandP wrote: Wed May 25, 2022 1:37 pm Your problem is compounded by the purchase of the synology device, this uses a version of Samba that synology has mangled to suit their purposes and (as far as I am aware) has never supplied the code for their changes. The problem is further compounded by the fact that Samba (along with Windows) is trying to move away from SMBv1 and the various gui tools (which have nothing to do with Samba) do not seem to have cottoned on to this fact yet.
There's no point blaming Synology. I have had exactly zero problems connecting to the Synology NAS from any of my Windows systems - or from my older Mint PC. (Unfortunately, getting that machine to connect took so many tries that I have no idea what ultimately worked.) Synology supports all current versions of SMB, so you'd think it could match whatever Mint is looking for.

And, of course, it isn't just a Synology problem. None of my Windows PCs show up in Caja, either. Nor does the older Mint PC - you'd think that, at least, might work.

At this point, I have three problems:

1. I'd like to connect to my network devices - all of them, if it's not too much to ask of 21st Century technology.

2. I'd like to understand what the problem is, so that I can reliably fix it in future (while avoiding unhelpful alterations that might create other problems with my Mint installation).

3. I'd like to know why this problem keeps coming up every time I do a fresh Mint install. If we can put a man on the moon (occasionally), surely we can get PCs to talk to each other.

At this point, I'm stuck. Running various diagnostic commands gives me responses that don't match what others have documented in these (and other) forums. I'll try to post a few of my efforts tomorrow, see if they make any sense to anyone.
RowlandP
Level 4
Level 4
Posts: 238
Joined: Tue Jan 26, 2021 7:30 am

Re: Trouble browsing windows network or mounting shares

Post by RowlandP »

fung0 wrote: Thu May 26, 2022 2:16 am
There's no point blaming Synology.
Not really blaming synology, just stating a fact, they take Samba, change it substantially and do not release their code changes.
fung0 wrote: Thu May 26, 2022 2:16 am 1. I'd like to connect to my network devices - all of them, if it's not too much to ask of 21st Century technology.
No it isn't, but it isn't really a Samba problem.
fung0 wrote: Thu May 26, 2022 2:16 am 2. I'd like to understand what the problem is, so that I can reliably fix it in future (while avoiding unhelpful alterations that might create other problems with my Mint installation).
The problem is that the various GUI's (which have nothing to do with Samba) haven't woken up to the fact that 'Network Browsing' (which needs SMBv1) is going away and has been replaced by 'Network Discovery', which doesn't use SMBv1. it uses WSDD instead.
fung0 wrote: Thu May 26, 2022 2:16 am 3. I'd like to know why this problem keeps coming up every time I do a fresh Mint install. If we can put a man on the moon (occasionally), surely we can get PCs to talk to each other.
See the answer to '2'
nielo
Level 3
Level 3
Posts: 167
Joined: Tue Mar 22, 2011 7:44 pm

Re: Trouble browsing windows network or mounting shares

Post by nielo »

It sounds to me as if you might be on LM Mate. I am on LM 20.3 Cinnamon and I also run a Synology Diskstation but have no problem connecting to it. This is what I did:

Edit the copies of "smb.conf" held in \etc\samba and in \usr\share\samba so that the [global] section reads as follows:

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = OURHOUSE
name resolve order = host lmhosts wins bcast
min protocol = SMB2
max protocol = SMB3

socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192


Log on to your Synology Diskstation in a browser and go to Control Panel - File Services - SMB
Ensure SMB is enabled
Make sure "Workgroup" name is the same as the one set in your smb.conf e.g. "OURHOUSE"
In 'Advanced Settings' - set Maximum SMB protocol to: SMB3 and set Minimum SMB protocol to: SMB2

In your file manager (it works in Nemo, but I'm not sure why it wouldn't work in Caja) toggle location entry and enter the location of your Diskstation - in my case it is:
smb://192.168.0.249/diskstation/

You'll then probably have to enter a username and password. I then bookmark that address and proceed to bookmark all of those folders sitting below that I require regular quick and easy access to.

I dare say others might find fault with my approach but, what the heck, life is short and it works for me across all PCs and laptops in our house. 8)
RowlandP
Level 4
Level 4
Posts: 238
Joined: Tue Jan 26, 2021 7:30 am

Re: Trouble browsing windows network or mounting shares

Post by RowlandP »

nielo wrote: Thu May 26, 2022 4:17 am It sounds to me as if you might be on LM Mate. I am on LM 20.3 Cinnamon and I also run a Synology Diskstation but have no problem connecting to it. This is what I did:

Edit the copies of "smb.conf" held in \etc\samba and in \usr\share\samba so that the [global] section reads as follows:

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = OURHOUSE
name resolve order = host lmhosts wins bcast
min protocol = SMB2
max protocol = SMB3

socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
'min protocol' is a synonym for 'server min protocol' and 'max protocol' is a synonym for 'server max protocol'. You are setting the defaults for both. You are also not using SMBv1 because the defaults for 'client min protocol' and 'client max protocol' are the same. I will be glad when Samba finally removes SMBv1
nielo
Level 3
Level 3
Posts: 167
Joined: Tue Mar 22, 2011 7:44 pm

Re: Trouble browsing windows network or mounting shares

Post by nielo »

> You are also not using SMBv1

Exactly. On our home network I used to have a single Win10 machine on which I did enable SMBv1 but that was to enable connection to an older NAS that only supported SMBv1. I no longer use Windows anywhere and the "old" NAS passed away in an unfortunate power surge that led to investment in the Synology Diskstation. So, no more SMBv1 around here.... :P
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

nielo wrote: Thu May 26, 2022 4:17 am It sounds to me as if you might be on LM Mate. I am on LM 20.3 Cinnamon and I also run a Synology Diskstation but have no problem connecting to it. This is what I did:
.
.
.

I dare say others might find fault with my approach but, what the heck, life is short and it works for me across all PCs and laptops in our house. 8)
Thanks, nielo - I'll try all this as soon as I can. Just one point: my other Linux Mint system (an old Pentium Dual-Core) has absolutely no problem accessing the Synology NAS. So there doesn't seem to be any roadblock on the NAS itself.

Meanwhile, here's what I have tried so far:

1. When I try to browse the network from Caja, I can see and access my D-Link NAS, no problems. I also see an entry "Windows Network." Attempts to open this give me the following message:

Code: Select all

Failed to retrieve share list from server: No such file or directory.
2. When I enter sudo service smbd status or sudo service nmbd status, the response is

Code: Select all

Unit smbd.service could not be found.
Unit nmbd.service could not be found.
3. hostname is xxxxxMINT (with slightly different letters instead of x's).

4. Entering sudo service smbd restart gives this message:

Code: Select all

Failed to restart smbd.service: Unit smbd.service not found.
After some suggested modifications, my smb.conf includes the following:

Code: Select all

workgroup = WORKGROUP
name resolve order = bcast host lmhosts wins
netbios name = xxxxxMINT

client min protocol = NT1
server min protocol = NT1

security = user
client use spnego = no
name resolve order = bcast host lmhosts wins
I find it strange that the smbd and nmbd services don't seem to be recognized. And yet, the standard install did leave me with an smb.conf file. And I can see some devices on the network, not others. I'm holding off installing things, so as not to compound the problem. I'm still hoping that some simple setting is all that's needed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Trouble browsing windows network or mounting shares

Post by AndyMH »

I have zero issues with mint and my synology NAS. My entry in fstab:

Code: Select all

//diskstation.local/home/	/media/synology	cifs	credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail	0	0
When I upgraded from LM19 to LM20 I had to add:

Code: Select all

   client min protocol = NT1
   server min protocol = NT1
to smb.conf (these are the only changes I've made to the default smb.conf) and in the synology min/max protocols are set SMB1/SMB3. Mint stopped support for SMB1 with LM20, which is probably why you had no problems with an older version of mint.

More detail here:
viewtopic.php?f=42&t=322404&p=1831297&h ... 0#p1831297

Alternatively, I could have set the synology to SMB2 and added vers=2.0 to the fstab options. As currently setup, they negotiate and settle on SMB2.

Note, credentials is a two line text file:

Code: Select all

username=xxxx
password=yyyy
The uname and pwd are for the user on the NAS.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

This is interesting... I entered:

Code: Select all

sudo mount.cifs //192.168.1.132/Sharedfolder /mnt/synology -o username=(myusername),password=(mypassword)
This lets me browse the files in Caja, as if they were located in the /mnt folder. Useful, but not a total solution. I'm not sure if the NAS should show up along with other mounted Devices, but it doesn't. I've bookmarked it, of course, but in my experience Caja frequently forgets all its bookmarks.

I'll try to do an fstab entry next. But I'm wondering if it wouldn't be more appropriate to mount under /home, rather than mixing in with system files (which are actually on a separate partition from Home)...

By the way, my browser can log in to the Synology admin desktop with no problem. So cifs sees it, my browser sees it, but Caja refuses to see it. I did try entering the LAN location in Caja, and it actually asked me for username and password. But the login failed upon numerous attempts. Fun!

I checked, and SMB on the Synology is set up to minimum SMB2, max SMB3. Workgroup is set to "WORKGROUP". (I discovered long ago that many products have trouble if you change the name of the workgroup.) I haven't touched any of the many other SMB options.

My smb.conf currently includes the following custom section:

Code: Select all

   workgroup = WORKGROUP
   name resolve order = hosts lmhosts wins bcast
   netbios name = xxxxxMINT

   min protocol = SMB2
   max protocol = SMB3

   client min protocol = NT1
   server min protocol = NT1

   socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Trouble browsing windows network or mounting shares

Post by AndyMH »

fung0 wrote: Sun Jun 05, 2022 1:58 am I checked, and SMB on the Synology is set up to minimum SMB2, max SMB3.
Set min to SMB1 on the synology or put vers=2.0 into your mount/fstab options. Can't comment on caja, cinnamon user so nemo. But just tried in nemo, network > windows network and I got "Failed to retrieve share list from server: No such file or directory". Doesn't bother me as the synology shows up under network anyway.
Screenshot from 2022-06-05 11-13-57.png
If you add -v into the mount command, e.g.

Code: Select all

sudo mount.cifs -vvvv //192.168.1.132/Sharedfolder /mnt/synology -o username=(myusername),password=(mypassword)
You will get more useful output, as I said, pretty sure that mint negotiates with the NAS on what protocol to use, with -v it will tell you what it is doing.

Where you mount it is your choice, I chose media, if you mount in home be careful to exclude the mount point from any backup software you use. I use backintime. You wouldn't really want your backup backing up the NAS as well as the local machine.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

AndyMH wrote: Sun Jun 05, 2022 6:09 am

Code: Select all

sudo mount.cifs -vvvv //192.168.1.132/Sharedfolder /mnt/synology -o username=(myusername),password=(mypassword)
Thanks - I'll try that fstab shortly...
Where you mount it is your choice, I chose media, if you mount in home be careful to exclude the mount point from any backup software you use. I use backintime. You wouldn't really want your backup backing up the NAS as well as the local machine.
It seems a bit odd to be browsing data files in my system partition... I thought there might be some Linux tradition about where to put the mount. But I'll definitely keep my backup strategy in mind.

It's been quite a learning experience. Apart from networking, I'm trying to figure out why my audio won't play louder than a whisper - a whole other set of threads. And last night I discovered that enabling the latest Nvidia graphics driver makes it impossible to log in! For a while I thought I was going to have to start over from scratch, but fortunately I was able to boot into a safer setup and undo the change.
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

Long side-trip to real life, but I'm back on the case now, still trying to solve the same Samba problem.

I do have some new info. I ran a complete system update, and noticed that the Samba packages were not updating properly. Software Manager is showing Samba-libs as installed, so I tried to un-install it, figuring a re-install might fix something. Unfortunately, the un-install failed, with the following error report:
Package operation Failed

The installation or removal of a software package failed.

Details

Code: Select all

installArchives() failed: Setting up libc-bin (2.31-0ubuntu9.9) ...
Bus error (core dumped)
/sbin/ldconfig.real: Can't stat /usr/local/lib/i386-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/i386-linux-gnu' given more than once
/sbin/ldconfig.real: Can't stat /usr/local/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib' given more than once
/usr/lib/x86_64-linux-gnu/libfakeroot:
	libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu:
Bus error (core dumped)
dpkg: error processing package libc-bin (--configure):
 installed libc-bin package post-installation script subprocess returned error exit status 135
Errors were encountered while processing:
 libc-bin
Setting up libc-bin (2.31-0ubuntu9.9) ...
Bus error (core dumped)
/sbin/ldconfig.real: Can't stat /usr/local/lib/i386-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/i386-linux-gnu' given more than once
/sbin/ldconfig.real: Can't stat /usr/local/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib' given more than once
/usr/lib/x86_64-linux-gnu/libfakeroot:
	libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu:
Bus error (core dumped)
dpkg: error processing package libc-bin (--configure):
 installed libc-bin package post-installation script subprocess returned error exit status 135
Setting up samba-common-bin (2:4.13.17~dfsg-0ubuntu1.20.04.1) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
handle_name_resolve_order: WARNING: Ignoring invalid list value 'hosts' for parameter 'name resolve order'
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 1
Any idea how to cure this? Again, this is a near-virgin install of Mint, I've installed nothing, modified nothing.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Trouble browsing windows network or mounting shares

Post by AndyMH »

fung0 wrote: Wed Nov 09, 2022 11:41 pm Long side-trip to real life, but I'm back on the case now, still trying to solve the same Samba problem.
I wouldn't bother, just do a cifs mount in fstab.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

Thanks, Andy, but I'm still sort of hoping to prove to myself that Linux really is a complete one-step substitute for Windows. Or am I expecting too much?

Secondly, I'd really like to understand what's gone wrong. I did a vanilla install of Mint, on a bog-standard Core i7 PC, ASUS motherboard, Nvidia graphics, etc. Nothing quirky or kinky. So why the heck can't I browse my network? And if SMB is broken, is there anything else that's going to fail (probably when I need it most)?

Thirdly, I've tried cifs and it is working, so it's certainly a fall-back. But I have multiple NAS servers and various other devices I need to connect to. I'd really like to know I can just plug things into the LAN and be able to access them.
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

I've tried several Linux install CDs. The problem seems to be unique to Mint/Mate. Kubuntu connects without even going through the "Windows Network" step. Mint/Cinnamon seems to work. But even a fresh install/trial CD of Mint/Mate gives me an error - "Failed to mount Windows share: software caused connection abort."

Clearly, this is a solved problem... in other distros. Which makes it doubly frustrating. Outside of this crippling problem, I have to say I vastly prefer Mint/Mate over any other Linux desktop.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Trouble browsing windows network or mounting shares

Post by AndyMH »

Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
fung0
Level 1
Level 1
Posts: 9
Joined: Wed May 25, 2022 11:51 am

Re: Trouble browsing windows network or mounting shares

Post by fung0 »

Okay, I think I've solved it. :D :D :D :D

I installed Mint 21 from scratch, on a fresh SSD. Networking still didn't work, so I know for sure it's not something I screwed up. I did the usual insertions to the samba.conf file (min and max protocols). That didn't help before, and it didn't help this time either.

Then I installed full Samba via Software Manager. That seemed to do the trick. Caja takes a bizarrely long time to open the Windows Network, but once I'm in, it all works. I've created desktop launchers for all my main NAS folders, and (so far!) I'm a happy camper.

When I log in to my Synology NAS, I do get this weird warning about my password not matching my keychain. It's true, my Linux password and my Synology password are different - I believe they should be. However, I can just click Cancel, and all is well. So, a problem for another day.

Big thanks to everyone who helped me get this far...!
HJaala
Level 1
Level 1
Posts: 3
Joined: Wed Oct 12, 2022 4:41 am

Re: Trouble browsing windows network or mounting shares

Post by HJaala »

I have Toshiba copier, where is windows network share, where I can scan papers. I used linux mint 18 and I could connect the files with Nemo "Connect to Server". Now I changed Mint 21 and this connection does not work any more, although it works well on Windows 7. The reason is that the new version of Samba client does not work with windows share:s without password. I tried to mount it manually "sudo mount -t cifs //192.168.7.161/file_share /media/Share -o guest,uid=1000", but got message "The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.". I tried also using "vers=1.0" without any success. I hope that some update could fix the problem so that connecting to windows share without password could be possible with Nemo again. I have no possibility to put password on the copier.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Trouble browsing windows network or mounting shares

Post by AndyMH »

When I log in to my Synology NAS, I do get this weird warning about my password not matching my keychain. It's true, my Linux password and my Synology password are different - I believe they should be. However, I can just click Cancel, and all is well. So, a problem for another day.
I mount my synology via entries in fstab:

Code: Select all

#synology mounts
//diskstation.local/home/	/media/synology	cifs	credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail	0	0
//diskstation.local/music/	/media/music	cifs	credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail	0	0
You could also mount your other network shares via fstab
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Networking”