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 19
Level 19
Posts: 9275
Joined: Tue Feb 03, 2009 10:27 am

Mint 19 and Samba File Sharing Changes

Post by altair4 » Sat Jun 02, 2018 7:52 am

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?

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.

But: If you set the max back to NT1 you will be able to see a server that has disabled SMB1 ( Win10 ) but you will not be able to access it through the file manager.

** With the default setting of SMB3 you can however still access it but you have to do so explicitly by name in your file manager ( smb://windows-host-name ) 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 Sun Oct 14, 2018 4:10 pm, edited 3 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 1
Level 1
Posts: 43
Joined: Sun Jul 15, 2012 5:50 pm

Solved Re: Mint 19 and Samba File Sharing Changes

Post by boyherre » Mon Sep 10, 2018 12:50 pm

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
AS-Rock FM2A75M-DGS, AMD A8-5600K APU, Radeon HD7560D, 3 TB Hds, 8 GB RAM, DualBoot MBR Linux-Mint Cinnamon (18.3 – 19 im Test auf Samsung-Intel-Laptop R730 -), immer aktuell/WIN10 immer aktuell/ beides 64 Bit.

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 » Tue Oct 30, 2018 11:15 am

Thanks a lot! I had the same problem and now with this works perfect

deepakdeshp
Level 11
Level 11
Posts: 3852
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 and Samba File Sharing Changes

Post by deepakdeshp » Sat Nov 03, 2018 7:25 am

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.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

Post Reply

Return to “Tutorials”