Ubuntu: Diagnosing Samba



Question:

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)


Solution:1

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.


Solution: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)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »