3

I have set up network shares on three Ubuntu computers in my LAN using system-config-samba. For a while were were able to browse each others network-shared directories, but now it is not working.

How do I go about diagnosing the problem? It would be good to have an easy-to-use GUI.

Navigating in Thunar and clicking one of the computers gives "Failed to retrieve share list from server: Connection refused."

(Answer below.)

Here is smbtree output from one of the machines, showing that it recognizes two others machines.

WORKGROUP
    \\APOLLO        apollo server (Samba, Ubuntu)
    \\ATHENA                athena server (Samba, Ubuntu)
        \\ATHENA\Canon-MP280-series Canon MP280 series
        \\ATHENA\iP1800-series      Canon iP1800 series
        \\ATHENA\print$             Printer Drivers
        \\ATHENA\Shared             
        \\ATHENA\IPC$               IPC Service (athena server (Samba, Ubuntu))

/etc/samba/smb.conf

[global]
    workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
    dns proxy = no
    ...

(Answer: I needed to add name resolve order = bcast host after the Workgroup line in /etc/samba/smb.conf)

7
  • There is more information needed before providing a correct answer. Like how the samba was configured in general, what's the output of smbtree, permissions and more. Oct 14, 2014 at 20:26
  • I added smbtree output and permission info into the question.
    – Joshua Fox
    Oct 15, 2014 at 7:36
  • Thanks Fox, what about the smb.conf, for the look of smbtree, there are only 2 computers on the workgroup "workgroup" and one of them is sharing 5 things (well 3 things actually) and the other is not. What version of ubuntu are you using (I am guessing Xubuntu because of Thunar), what else have you tried. The more information you provide the easier is to answer. Oct 15, 2014 at 14:22
  • @LuisAlvado Thank you. Yes, it is Xubuntu. I have attached smb.conf. There are 2-3 computers on the network, but these are laptops so they are sometimes removed. Of course, before testing smb.conf I make sure that the relevant computers are on the network and that they have shared directories (configured with system-config-samba). In the sample output, there were 2 computers in addition to the local computer.
    – Joshua Fox
    Oct 16, 2014 at 17:14
  • Can you add to the global section the force option for testing. eg: force = joshua. And then restart the smbd service to test. Also, if you want them to "see" the networkshare resource, remove the ; in front of the browseable option. Let me know if it goes well. Oct 16, 2014 at 18:08

2 Answers 2

3

If you followed the steps I mentioned, as your answer says, you problem then is how the naming service is handled as mentioned in How can I connect to a Samba server using its hostname instead of the IP? (Step 4)

In the /etc/samba/smb.conf file, look for the line that says the following:

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

Uncomment the line that says name resolve order and make sure that bcast is the first on in the list, should look like this afterwards:

name resolve order = bcast lmhosts host wins

Then restart the Samba service sudo service smbd restart.

I recommend reading the link provided because it includes other case scenarios that could happen. If they do, then at least you have a way of solving them quickly.

2
  • I was having the same issue in 16.04 added name resolve order = bcast lmhosts host wins to smb.conf as it was completely missing fixed the timeout error I was receiving.
    – kleeman7
    Dec 30, 2016 at 14:38
  • this bulshit never works Mar 23, 2020 at 18:41
2

Answer: I needed to add

name resolve order = bcast host

after the Workgroup line in /etc/samba/smb.conf

(But see the more complete answer from @LuisAlvado)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .