HowTo: Samba Browsing Problems Checklist

Write tutorials here
There are more tutorials here
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
Level 19
Level 19
Posts: 9128
Joined: Tue Feb 03, 2009 10:27 am

HowTo: Samba Browsing Problems Checklist

Post by altair4 » Wed Dec 07, 2011 8:09 am

HowTo: Samba Browsing Problems Checklist

NOTE: If you are in a Linux only or a Linux / macOS network there is a more modern method to resolve host names: Samba Browsing in an all Linux or Linux/OSX network

NOTE: If you are using Mint 18 replace "gedit" references with "xed" below.

[1] Samba Browsing depends on all hosts being members of the same subnet.

If all your machines are connected to and get their IP address from the same router this happens automatically ( all of my machines are in the range with the same subnet mask of ). But if you have set up static IP addresses yourself you need to make sure that they are in the same ip range and have the same subnet mask. Running the command: ifconfig on Linux and ipconfig on Windows should provide this information.

[2] Services not starting at boot.

Check to see that the following services are running:

Code: Select all

sudo service smbd status
sudo service nmbd status
If they are not running start them:

Code: Select all

sudo service smbd start
sudo service nmbd start
[3] Hostname

By default Samba will use the host name as the name it uses to identify itself to others on the network. But it can only be 15 characters or less in length. That's a requirement of Samba not Linux. So to see if you are in compliance run the following command and count the number of characters:

Code: Select all

If it's more that 15 characters long you could change the hostname but an easier way for samba purposes is to use a samba configuration file:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section - right under the "workgroup" line is where I would put it:

Code: Select all

netbios name = some-name
Just make sure "some-name" is 15 characters or less in length.

Then restart samba:

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
[4] Name Resolution

Actual Samba communication is done by ip address not name. If you want to browse the LAN by name some mechanism must be provided to convert the name to an ip address. Windows machines use "node" specifications to determine the how and order of how this is done and Samba does as well with this line in the default settings:
name resolve order = lmhosts wins host bcast
* "lmhosts" and "host" are basically lookup tables that specify that this ip address belongs to this name - This is not set up by default.
* "wins" refers to a wins server that maintains a list - This too is not set up by default.
* The only default working system is bcast ( broadcast ) which Windows also uses but it appears last in order in Samba.

Rearrange the order to make bcast first by adding a line to the [global] section of /etc/samba/smb.conf - right under the "workgroup" line:

Code: Select all

name resolve order = bcast host lmhosts wins
And restart samba

[5] Firewalls

[5a] Disable the firewall on both of the machines that are trying to communicate and see if you can browse the LAN.

If you are using the built in firewall configurator then issue the following command to disable it:

Code: Select all

sudo ufw disable
[5b] To make sure that the required samba ports are open on both server and client install the following utility:

Code: Select all

sudo apt-get install nmap
And run the following command substituting with the ip address of the machine you are on and again with the other machine on the lan:

Code: Select all

sudo nmap -sS -sU -T4
In a typical Linux setup the following ports should be open for Samba to work:
Interesting ports on
Not shown: 1993 closed ports
139/tcp open netbios-ssn
445/tcp open microsoft-ds
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm
[5c] ( This is no longer an issue with the latest Mint ) If you do decide to use a firewall and think you have the right ports open you may find that browsing still doesn't work. That's because there may be an error ( omission ) in the base configuration of the firewall itself :

Edit the firewall configuration:

Code: Select all

gksu gedit /etc/default/ufw
Find this at the bottom:
# extra connection tracking modules to load
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc"
And change the last line to this:

Code: Select all

IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns"
Then restart the firewall service:

Code: Select all

sudo service ufw restart


This isn't necessary if you have a normal home network where everyone is connected to the same router despite some samba howto's insisting that it "must" be done. I have multiple "workgroups" in my LAN and it is not an issue. I'm adding it here because invariably someone will post that it won't work unless you make all the workgroups the same:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Find the line:
workgroup = workgroup
And change it to whatever you want as long as it's not greater than 15 characters in length then restart samba.

The other problem the Samba user usually faces are permissions issues and that's unique to the user's situation and is not covered here.

Other HowTo's concerning setting up or accessing shares that you might find amusing:

### Installing Samba in Mint 18: viewtopic.php?f=42&t=224391
### Mint 19 and Samba File Sharing Changes: viewtopic.php?f=42&t=270442

Simple File Sharing in Mint:
Using the [homes] Share in Samba: ... 3&p=448039
Create Samba Shares Directly from Thunar: viewtopic.php?t=235248

Avahi Networking:
Samba Browsing in an all Linux or Linux/OSX network: ... 10#p960482
Samba and Windows 10:
Samba Without SMB1: viewtopic.php?f=42&t=249758

On Demand CIFS Mounting of Shares: viewtopic.php?f=42&t=222087
Using Gigolo GUI to Mount Remote Samba Shares:
Auto Mount Samba Shares on Boot ( GVFS Method ):
Using AutoFS to Mount Remote Samba Shares:

HTTP for Fast Large File Transfers on Local Network :
Another HTTP method using "woof": viewtopic.php?f=150&t=217786#p1140084
And another one using "droopy": viewtopic.php?f=150&t=223787&p=1178942#p1178942

Multi User Shared Local Directory: viewtopic.php?f=42&t=69834?f=42&t=69834
Using Bind to Remount Part of a Partition: viewtopic.php?f=42&t=74321
Fixing the Default umask in Mint: viewtopic.php?f=42&t=192794?f=42&t=192794
Last edited by altair4 on Sat Jun 16, 2018 5:46 pm, edited 8 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Level 1
Level 1
Posts: 11
Joined: Sun Jul 20, 2014 3:45 am

Re: HowTo: Samba Browsing Problems Checklist

Post by kb5050 » Tue Oct 25, 2016 3:53 pm

See that this topic is well aged, so I suspect a lot of the tweaks you suggest here, have been made.

My question, has anyone done a GUI application that works, and is maintained for Linux Mint? One that can guide you thru all of this rather than having to check out all the .conf files and so forth to bring your network in line.
YES I do want it to be as simple as Windows and Windows friendly at the same time because inevitably your Linux will likely be sharing its network with many devices but mostly Windows. And when I say this its to the end users benefit.
We like in a click happy world, so a terminal based world is far too dangerous and scary to any new computer user, not just Windows users.

Before I say much else, I happen to use Rosa 17.3 XFCE.

Now the persistent things I see in OOB fresh installs are thus.

By default it just cannot find network shares on a consistent basis. In other words in the File Manager you should be able to click on Network and instanly well somewhat, see all the Windows Computers, and Android, and Ios, and Mac, and NAS drives. But instead you typically get Timeout.
Now what is odd is that after 30 seconds sometimes, it will display Shares and Devices. I found that 1 change in smb.conf file seems to fix all of that.
Changing the search order. I just looked for that line and it does not appear in Rosa, so I assume they may have hard coded around it.
Suggestion, when you click on Network, an indicator should come up to say seeking network shares. This way you at least know something is going on or nothing is going on. The second issue that remains even in Sarah 18 is credentials are lost. While passwords are cool, they are not cool when it comes to Windows Public shares, NAS shares, and other shares. Despite ticking the remember forever it never remembers forever. This seems to only happen with WORKGROUP windows based shares. So that needs fixing. Also if the share your accessing, is to be a temporary share it probably should not have an option for forget password. Instead the radio button should say Delete Stored Password.
Then there is the age old issue of having to put a password on your password storage, which should be a Settings Manager thing to reset it, in a GUI that works like Windows Vault. Truthfully even Windows needs to make that easier to get to.

You can however get around this by using afp instead which does not exhibit the username/password and DOES remember forever.
I use that a lot, because Thunar allows Bookmarks, and once you create a bookmark, makes it easy to gain access. Just wish Thunar had the option to make a desktop and/or panel shortcut to a bookmark. Which brings me to the last suggestion, to fix Sarah to allow all or most applications to access Network and bookmarks from the application when you wish to open things. I feel you should also have an right click option on any listed folder to create a bookmark, create a panel shortcut etc.

Level 1
Level 1
Posts: 4
Joined: Wed Jul 04, 2018 11:25 am

Re: HowTo: Samba Browsing Problems Checklist

Post by A_J_Jackson » Wed Jul 04, 2018 3:49 pm

Yes, have followed that. Why does the full tree of samba shares display in the terminal with command smbtree but I can't access them in file manager or printer set up? It has only happened with Mint 19, prior versions have always been file. None of the network machines are running Win10, only XP to Win 7, plus 1 that is Mint 18. The shares on the (new) Mint 19 are accessible to the machine with Mint 18 - directly in Network connections without opening 'Windows Network'. The Mint 19 shares also show on the Mint 18 'Windows Network/XXGROUP folder. So my Mint 19 is sharing to the outside network but no applications on Mint 19 can see the outside network. Firewall on Mint 19 is disabled. Remember that smbtree does display, accurately, the network shares.

Thank you

Level 2
Level 2
Posts: 63
Joined: Wed May 22, 2013 3:11 pm

Re: HowTo: Samba Browsing Problems Checklist

Post by rambo919 » Fri Jul 06, 2018 3:49 pm

Just a bit of feedback

After a bit of leaving linux aside and going back to win7 to stop struggling with the OS itself and just get on with my life.... Linux started tempting me back. Running a LM19 in a VM in bridged mode I again attempted to get samba actually working, something that simply refused to happen in LM18. This time using this and the viewtopic.php?f=42&t=270442 guide together with a bit of googling I managed to get it working properly. In the end other than installing samba and adding a few test shares it took adding the quoted block to my smb.conf file and magically everything worked properly... note the last three lines that were needed for samba to access windows (win7, death to win10 {spits to the side}) shares as a guest. After that my only problem accessing samba shares from windows was due to me forgetting linux does not automatically remove trailing spaces the way I had gotten used to in windows and windows cannot access shares with a trailing space... after a headslap I fixed that.
#mirror in /etc/hostname, must be 15 characters or less with no spaces
netbios name = test-vm
# for win10 browsing remove this line
client max protocol = NT1
# next three lines seem needed
security = user
client use spnego = no
name resolve order = bcast host lmhosts wins

Post Reply

Return to “Tutorials”