Samba and Mint20

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and Mint20

Post by altair4 »

MX-Linux XFCE - LMDE-4 Cinnamon - LM 20 Cinnamon - Win 10 ENT
With the exception that you have no MacOS systems in your network yours looks like mine.

I don't do any of the things you have done to your machines. I don't change smb.conf on my Linux systems and I don't enable smb1 on my Win10 machines.

What I do instead is use something that bypasses all of the decades old crap that comes with NetBIOS and use mDNS instead.

Win10 cannot see and my Linux machines since SMB1 is disabled on Win10. Linux cannot see the Win10 machine for the same reason. Unlike Linux Win10 cannot announce or respond to client queries using mDNS broadcasts but they can connect to each other when asked for explicitly. That is what I have done.

I will use LMDE4 as an example. On Win10 I connect to my LMDE4 machine with a \\vlmde4.local in explorer. You will notice at the bottom left side I have also "pinned" that location in my Quick Access list in explorer so I don't have to do this again.
Win10-LMDE4.png
On LMDE4 I connect to my Win10 machines with a smb://vwin1064.local in nemo. You will notice at the bottom left side I have also "bookmarked" that location in nemo so I don't have to d this again.
LMDE4-Win10.png
In both cases these machines will access each other with SMB3 which allows for more security, faster response, and less ... um ... drama.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
ibm450
Level 5
Level 5
Posts: 650
Joined: Sun Jan 11, 2009 6:56 am
Location: Hamilton Hill, Western Australia

Re: Samba and Mint20

Post by ibm450 »

altair4 wrote: Sun Aug 16, 2020 9:06 am
In both cases these machines will access each other with SMB3 which allows for more security, faster response, and less ... um ... drama.
Yes I may have tried that already. For some reason I'm able to get all machines in the workgroup showing and connect as normal as you would via windows network browsing.

I will try bookmarking again when I do a fresh install of U20 and see whether the manual way will work without modifying the smb file.

Did u install samba and the ws-discovery service by any chance?

Also, u put a v in front of your mdns location, any reason why?

I didn't use netbios in this instance also. And I agree with u that it is a lot of drama involved getting SAMBA to work
HP EILITE FOLIO 9470M i7-3667u x 4
GitHub: tolgaerok
Image Image
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and Mint20

Post by altair4 »

There is no workgroup, master browser, and all of the other things associated with NetBIOS in WIn10 ... unless you enable SMB1 .. and I would argue there is no need to do that.
Did u install samba and the ws-discovery service by any chance?
I did install the samba package because I want to share things on this machine.

I did not enable WSD on this particular machine. Actually, the only machines I have presently that has WSD enabled are two Ubuntu servers. And that is mostly because I can - not because I really need to have it. MacOS has no idea what WSD is and there is no WSD client for Linux so it's only purpose is to allow some random Win10 machine to "discover" the server.
Also, u put a v in front of your mdns location, any reason why?

Nope, just the host name I gave the boxes.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
tel1jag

Re: Samba and Mint20

Post by tel1jag »

So I finally got around to taking my Linux Mint 18 box to 20. Hmmm...I should have definitely done a little more reading as I spent a lot longer fixing things than I expected to have to in order to get back certain functionality...

Anyway, this issue with LM20/Samba version/bug issue has me very confused.

I think my question is for altair4, but really if anyone can answer I would be appreciative...I have a few Windows 10 Desktop shortcuts that point to Mint samba shares...one I use for image backups of my Win10 box to the LM box and a couple of others that I use for other purposes. Those are currently broken now and as already stated above, I can't browse those shares anymore.

Most of the original posts were getting LM to connect elsewhere, i think.

What's the best way to have a desktop shortcut/folder on Win10 that connects to my LM20 box? It seems like getting both back to NT1 isn't the greatest way to do it...what would you recommend?

Thanks sincerely...

tel1jag
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and Mint20

Post by altair4 »

This is a HowTo so unless your question is related to this how to you should post a separate question.

This HowTo would be a better place for Win10 questions: Windows 10 and Samba File Sharing
See section [1a]

Or ... you can just see my post not 3 inches above this one where I stated the same thing:
altair4 wrote: Sun Aug 16, 2020 9:06 am
I don't do any of the things you have done to your machines. I don't change smb.conf on my Linux systems and I don't enable smb1 on my Win10 machines.

What I do instead is use something that bypasses all of the decades old crap that comes with NetBIOS and use mDNS instead.

Win10 cannot see and my Linux machines since SMB1 is disabled on Win10. Linux cannot see the Win10 machine for the same reason. Unlike Linux Win10 cannot announce or respond to client queries using mDNS broadcasts but they can connect to each other when asked for explicitly. That is what I have done.

I will use LMDE4 as an example. On Win10 I connect to my LMDE4 machine with a \\vlmde4.local in explorer. You will notice at the bottom left side I have also "pinned" that location in my Quick Access list in explorer so I don't have to do this again.
Win10-LMDE4.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ninecats
Level 1
Level 1
Posts: 6
Joined: Thu Sep 26, 2019 5:57 pm

Re: Samba and Mint20

Post by ninecats »

Many thanks for this write-up, I went with "[2a] Reinstate smb1 on the client side of Mint" to be able to connect to my Nvidia Shield player. Really I don't get it why they use SMB1 only when everyone else moves away from that.
Synthetase
Level 1
Level 1
Posts: 17
Joined: Wed May 20, 2020 8:22 am
Contact:

Re: Samba and Mint20

Post by Synthetase »

Thanks a lot for this, saved me hours of faffing around :)
Dare_you_say_darin

Re: Samba and Mint20

Post by Dare_you_say_darin »

Thanks so much! I went the CIFS route and found the Youtube tutorial https://youtu.be/hYRK5Ld8k7Y very helpful as a Linux novice.

Very much appreciate the solution(s) to this challenging problem.
nico059

Re: Samba and Mint20

Post by nico059 »

Thanks @altair4 !

I installed Mint XFCE for a first time on an old PC. Everything was very pleasant with Mint, I'm really impressed with this distro, R E A L L Y !!!!
Excepted .... I cannot access my old NAS Dlink DNS-320 (that apperantly support only Samba vers 1, with a guest access ......).
Thunar thrown me obscure errors ....

I finally find your tutorial, thanks altair4 , and chose the [2b] solution, with fstab (noauto) for a more user friendly solution.
Thunar show me the mount point on its left panel, and mount it when I need to access it.

I'm thrill to explore more Mint, also this make this old PC usable again, and by all family.

Regards,
Nicolas.
jowind
Level 1
Level 1
Posts: 17
Joined: Sun Apr 12, 2015 9:12 am

Re: Samba and Mint20

Post by jowind »

Thanks altair for the great tutorial!
I know we're not supposed to 'add' on 'tutorials', but I had further wifi speed snag which may help some people down the road with similar problem.
I was trying to use samba to connect my PC (LM20) to share a USB on a network router (TP-LINK A7), the only solution that worked was using 'client min protocol = NT1', as per your option [2a].
However, that would only work if wired connected to that network. If wireless, the speed would stall, turning NAS browsing almost impossible.
After googling for a couple of days and trying many different setups, adding the following (along with 'client min protocol = NT1') to my /etc/samba/smb.conf [global] did the trick:

Code: Select all

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535

So now I'm back with the same NAS browsing speed as I use to have on my old machine with LM18.
Dell 7060 micro I5-8500T Mint Cinnamon 20.0 5.4.0-48
Vorke V1 Plus (TV box) J3455 Mint Xfce 20.3 5.4.0-121
Acer T660 desktop Core 2 Q6700 Q4OS TDE 5.10.0-22
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and Mint20

Post by altair4 »

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535
I haven't seen that since the old Samba Version 3 days. We all added it to smb.conf back then although it didn't seem to have any affect on any of my networks.

If that works for you that's great but I will never add that to one of my HowTo's. The reason is that samba warns against it.

If you run the following command testparm -s the output contains a surprisingly long warning about the use of SO_SNDBUF and SO_RCVBUF since the Linux Kernel sets these parameters itself using an auto-tuning mechanism.

The TCP_NODELAY parameter is already set in the defaults - in fact it is the only default setting for "socket options". You can't access the defaults directly but you can use the testparm command again ( with different switches ) to verify that yourself if you want:

Code: Select all

testparm -sv /dev/null | grep 'socket options'
That leaves IPTOS_LOWDELAY which is the only one referenced as a "sensible" possibility in the man pages for the socket setting:
If you are on a local network then a sensible option might be:

socket options = IPTOS_LOWDELAY

If you have a local network then you could try:

socket options = IPTOS_LOWDELAY TCP_NODELAY
But in my case - and I'm only talking about the networks I have set up - it never made any difference.

EDIT: A mildly amusing response from one on the samba development team on this parameter: https://lists.samba.org/archive/samba-t ... 18375.html
Last edited by altair4 on Tue Nov 24, 2020 11:48 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
ibm450
Level 5
Level 5
Posts: 650
Joined: Sun Jan 11, 2009 6:56 am
Location: Hamilton Hill, Western Australia

Re: Samba and Mint20

Post by ibm450 »

Code: Select all

client min protocol = NT1
server min protocol = NT1
was my only option to get kubuntu to see my USB on my router.

LMDE4 and mx-linux worked out of the box to locate my smb1 router: smb://192.xxx.x.x

or in Nemo address bar type

Code: Select all

smb://<user>@192.xxx.x.x
HP EILITE FOLIO 9470M i7-3667u x 4
GitHub: tolgaerok
Image Image
jowind
Level 1
Level 1
Posts: 17
Joined: Sun Apr 12, 2015 9:12 am

Re: Samba and Mint20

Post by jowind »

altair4 wrote: Tue Nov 24, 2020 9:44 am
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535
I haven't seen that since the old Samba Version 3 days. We all added it to smb.conf back then although it didn't seem to have any affect on any of my networks.

If that works for you that's great but I will never add that to one of my HowTo's. The reason is that samba warns against it.

If you run the following command testparm -s the output contains a surprisingly long warning about the use of SO_SNDBUF and SO_RCVBUF since the Linux Kernel sets these parameters itself using an auto-tuning mechanism.

The TCP_NODELAY parameter is already set in the defaults - in fact it is the only default setting for "socket options". You can't access the defaults directly but you can use the testparm command again ( with different switches ) to verify that yourself if you want:

Code: Select all

testparm -sv /dev/null | grep 'socket options'
That leaves IPTOS_LOWDELAY which is the only one referenced as a "sensible" possibility in the man pages for the socket setting:
If you are on a local network then a sensible option might be:

socket options = IPTOS_LOWDELAY

If you have a local network then you could try:

socket options = IPTOS_LOWDELAY TCP_NODELAY
But in my case - and I'm only talking about the networks I have set up - it never made any difference.

EDIT: A mildly amusing response from one on the samba development team on this parameter: https://lists.samba.org/archive/samba-t ... 18375.htmltestparm -s
Hi altair, thanks for the heads up!
I've checked the 'long warning' with testparm -s, as well as the 'grep' cmd shows my default:
socket options = TCP_NODELAY
So I changed my socket setting to be:

Code: Select all

socket options = IPTOS_LOWDELAY
And after initial testing it's apparently keeping as fast wireless browsing speed as it was with that previous setting.
I'll keep an eye on it and report further if any speed decay.
Thanks
Dell 7060 micro I5-8500T Mint Cinnamon 20.0 5.4.0-48
Vorke V1 Plus (TV box) J3455 Mint Xfce 20.3 5.4.0-121
Acer T660 desktop Core 2 Q6700 Q4OS TDE 5.10.0-22
Newmint17
Level 2
Level 2
Posts: 61
Joined: Tue Aug 12, 2014 8:29 am

Re: Samba and Mint20

Post by Newmint17 »

This is a plea for help, please.

My desktop machine runs Windows 7 and I have no desire to move to Windows 10.

I have just bought a laptop upon which I have installed Mint MATE 20.1

Having read recent threads with advice about MATE 20 and Windows 10, could someone please advise on the steps I should take to enable filesharing between my two machines?
SteveR
Level 3
Level 3
Posts: 167
Joined: Fri May 24, 2019 12:02 pm
Location: Morehead City, NC
Contact:

Re: Samba, Mint20, and Windows

Post by SteveR »

I am adding this article for reference. Additionally, this article cites Fedora 33 and not MInt. So be cognizant of that. Share files between Linux and Windows computers. Hopefully, Mint users seeking to set-up a cross platform connection with Windows can find some relevance in this article.
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Samba and Mint20

Post by karlchen »

<mod> alternative approach split off from this tutorial, can be found here now: viewtopic.php?p=2009462#p2009462 </mod>
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Ray94520
Level 1
Level 1
Posts: 30
Joined: Thu Aug 12, 2021 4:17 pm

Re: Samba and Mint20

Post by Ray94520 »

I have a question
in my NAS Server which is MyCloudPR4100, The SMB is set to 3 That way I can save files back and forth from Windows 10 to MyCloudPR4100. So would I change NT1 to NT3?
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and Mint20

Post by altair4 »

The server allows only SMB3? Or it can go up to SMB3?

The samba client negotiates with the server to determine which smb dialect to use between two values:

client min protocol = SMB2_02
client max protocol = SMB3_11

As noted in my original post the problem isn't with samba it's with gnome that insists on initially connecting to the server using SMB1 ( NT1 ). In this situation it will fail.

Why not open nemo and enter the address and the share name explicitly to see if you can make the connection:

Code: Select all

smb://MyCloudPR4100.local/share-name
This will bypass the gnome bug.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Ray94520
Level 1
Level 1
Posts: 30
Joined: Thu Aug 12, 2021 4:17 pm

Re: Samba and Mint20

Post by Ray94520 »

altair4 wrote: Sat Aug 14, 2021 11:47 am The server allows only SMB3? Or it can go up to SMB3?

The samba client negotiates with the server to determine which smb dialect to use between two values:

client min protocol = SMB2_02
client max protocol = SMB3_11

As noted in my original post the problem isn't with samba it's with gnome that insists on initially connecting to the server using SMB1 ( NT1 ). In this situation it will fail.

Why not open nemo and enter the address and the share name explicitly to see if you can make the connection:

Code: Select all

smb://MyCloudPR4100.local/share-name
This will bypass the gnome bug.
Ray94520
Level 1
Level 1
Posts: 30
Joined: Thu Aug 12, 2021 4:17 pm

Re: Samba and Mint20

Post by Ray94520 »

altair4 wrote: Sat Aug 14, 2021 11:47 am The server allows only SMB3? Or it can go up to SMB3?

The samba client negotiates with the server to determine which smb dialect to use between two values:

client min protocol = SMB2_02
client max protocol = SMB3_11

As noted in my original post the problem isn't with samba it's with gnome that insists on initially connecting to the server using SMB1 ( NT1 ). In this situation it will fail.

Why not open nemo and enter the address and the share name explicitly to see if you can make the connection:

Code: Select all

smb://MyCloudPR4100.local/share-name
This will bypass the gnome bug.


It can go up to SMB3
Post Reply

Return to “Tutorials”