Mint 19 and Samba File Sharing Changes

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
altair4
Level 20
Level 20
Posts: 10228
Joined: Tue Feb 03, 2009 10:27 am

Mint 19 and Samba File Sharing Changes

Post by altair4 »

Mint 19 and Samba File Sharing Changes

The last few releases of Ubuntu introduced a number of changes to Samba itself, its Linux kernel component, and even how Ubuntu configured it.

Mint 19 as a Samba Client

[A] Are you trying to get a list of all the samba / smb servers on your network from your file manager?

EDIT: This issue has been fixed and setting "client max protocol = NT1" is no longer necessary as of this bug report: https://bugs.launchpad.net/ubuntu/+sour ... mments=all
Samba changed the maximum client smb dialect that it can use from SMB1 to SMB3 so that it could connect to servers that have disabled SMB1 like Win10. This inadvertently disables netbios host discovery so if you go to Network > Windows Network you will see something like Folder is Empty in Ubuntu and just a blank screen in Cinnamon, Xubuntu, etc,..

You can restore it's discovery ability by editing /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:

Code: Select all

client max protocol = NT1
And then reboot. Yes, reboot.
EDIT2 However, that fix created another issue if you try to browse to then connect to any server that has disabled SMBv1 like WIn10: https://bugs.launchpad.net/gvfs/+bug/1828107

You can still access it but you have to do so explicitly by name in your file manager ( smb://windows-host-name ), mDNS name ( smb://windows-host-name.local ), or ip address ( smb://192.168.0.100 ), or by using Connect to Server.

If you have a problem with that please see this: Samba Browsing Problems Checklist.

** If the other machine runs Win10 you can also use this method: Win10, Linux, mDNS, and Samba File Sharing

** This change to smb3 does not impact any machines that have registered mDNS for their samba / smb shares. So if the other machine runs Ubuntu 17.10 or newer, another Mint 19 machine, or macOS you will automatically see those machines under Network - but not under Windows Network since it's not using a Windows discovery protocol.

** If the other Linux machine is using an earlier Mint or Ubuntu I would suggest adding to those machines an avahi/samba service announcement:

[1] Create an avahi samba service file at /etc/avahi/services/samba.service

[2] Then copy and past the following into it:

Code: Select all

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
   <name replace-wildcards="yes">%h SMB</name> ## Display Name
   <service>
       <type>_smb._tcp</type>
       <port>445</port>
   </service>
</service-group>
[3] And just in case restart avahi:

Code: Select all

sudo service avahi-daemon restart
[ B] Are you using CIFS to mount your server?

The Linux kernel starting with 4.13 changed the default smb dialect that CIFS uses to SMB3 from SMB1. After 4.13.5 it's set to negotiate the version used with the server between 2.1 to 3.02 ( 3.11 in linux kernel 4.17 ). All modern SMB servers ( Win10, macOS, and Linux ) will accept SMB3 so this should not be an issue.

** What can be an issue is if you are running something with a very old version of samba like most NAS devices and there you would have to add an option to your cifs mount statement forcing it back to SMB1:

Code: Select all

vers=1.0
Mint 19 as a Server:

First: Remember Mint doesn't install the samba server package by default any longer so install it now:

Code: Select all

sudo apt install samba
[C1] Are the clients to this server running Linux or macOS?

Stating with Ubuntu 17.10 Samba has been configured correctly for mDNS. As soon as you install Samba your machine will become visible to all the other Linux and macOS machines by default. If you created shares on Mint19 those shares will also be visible. There is no need to make any other changes

[C2] Are the clients to this machine running Windows?

A Windows machine will have the same success or failure at discovering your machine that it did in earlier Mint versions. If you have problems see: Samba Browsing Problems Checklist.

If it is running Win10 it can always use \\mint-host-name.local or \\mint-ip-address.

** Special note if the clients to this server are running WinXP and possibly Win7. You are going to have to revert to a previous authentication protocol. You do that by adding these 2 lines - under the workgroup = WORKGROUP line:

Code: Select all

lanman auth = yes
ntlm auth = yes
Last edited by altair4 on Fri Aug 02, 2019 7:59 am, edited 4 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
boyherre
Level 3
Level 3
Posts: 112
Joined: Sun Jul 15, 2012 5:50 pm

Solved Re: Mint 19 and Samba File Sharing Changes

Post by boyherre »

Hello altair,
thanks for answering! Thanks a lot! You made my day!
Finally,
client max protocol = NT1
was the solution; this gave me back the access to network! Great job!
Best regards, Boy
Die letzte Stimme, die man hört, bevor die Welt explodiert, wird die Stimme eines Experten sein, der sagt:
"Das ist technisch unmöglich!" (Peter Ustinov)
acquanero
Level 1
Level 1
Posts: 2
Joined: Thu Jul 06, 2017 10:34 pm

Re: Mint 19 and Samba File Sharing Changes

Post by acquanero »

Thanks a lot! I had the same problem and now with this works perfect
deepakdeshp
Level 18
Level 18
Posts: 8357
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 and Samba File Sharing Changes

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB
sephula
Level 1
Level 1
Posts: 6
Joined: Sun Dec 23, 2018 5:26 am

Re: Mint 19 and Samba File Sharing Changes for Asus Routers

Post by sephula »

I was still having trouble logging into my samba share on an AC 68U Asus Router, until I found this advice: viewtopic.php?t=256728. :shock:

Apparently, Asus still uses an older logon protocol, and you should disable the NTLMv2 in your smb.conf. :roll: I tried all of the other advice, until I found that helpful tidbit, and so I figured I should save others the trouble and add the advice, here. :D

Note, I have to use the "Connect to Server" routine in Nemo in order to access my shares (Use "smb://192.168.1.1" or whatever you set as the server IP address, add your WORKGROUP name, user name, and password). However, you don't need to every time, since you are also able to save the login credentials, and create a "Bookmark" of the shared folder for quicker access. :D
davidlohr
Level 1
Level 1
Posts: 1
Joined: Wed Aug 21, 2019 10:08 am

Re: Mint 19 and Samba File Sharing Changes

Post by davidlohr »

Thanks!

Solved my Windows XP crisis for support of NASA Ace mission.

adding two lines fixed all sharing data.

lanman auth = yes
ntlm auth = yes

:D :D
User avatar
ibm450
Level 5
Level 5
Posts: 623
Joined: Sun Jan 11, 2009 6:56 am
Location: Hamilton Hill, Western Australia

Re: Mint 19 and Samba File Sharing Changes for Asus Routers

Post by ibm450 »

sephula wrote:
Sun Dec 23, 2018 5:41 am
I was still having trouble logging into my samba share on an AC 68U Asus Router, until I found this advice: viewtopic.php?t=256728. :shock:

Apparently, Asus still uses an older logon protocol, and you should disable the NTLMv2 in your smb.conf. :roll: I tried all of the other advice, until I found that helpful tidbit, and so I figured I should save others the trouble and add the advice, here. :D

Note, I have to use the "Connect to Server" routine in Nemo in order to access my shares (Use "smb://192.168.1.1" or whatever you set as the server IP address, add your WORKGROUP name, user name, and password). However, you don't need to every time, since you are also able to save the login credentials, and create a "Bookmark" of the shared folder for quicker access. :D
dosnt work all the time. if you have a dynamic ip addressed this method dosnt work even for smb printer. samba is very buggy. xp joined my w10 network without any hiccups. its a constant hack and cross your fingers with samba on mint. strange thing is, majority of all routers run on linux and they have zero issues detecting netbios or connecting to any device available on its network. andriod that is linux based constantly fails to connect or even see anything shared on my linux system, and yet has zero issues scanning and connecting to any windows network...

seriously have to trial mxlinux as ive heard samba works out of the box
Sony i3 - VPCEB13FG SSD 4GB laptop ~ MX-Linux XFCE - LMDE-4 Cinnamon - LM 20 Cinnamon - Win 10 ENT
Image
Post Reply

Return to “Tutorials”