unable to mount or browse samba networks

Bug #356022 reported by Dick Thomas
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

this is happening on my i386 notebook and my amd64 desktop

I can mount samba shares with
# mount -t cifs //192.168.1.100/Music /media/Music
and navigate them with nautilus

but if use the network:// option in nautilus
i get a list of samba shares
but when i try to use one of them i get a
" Failed to retrieve share list from server" error on both machines
I can't even mount shares on the machine it self

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia ath_hal
Package: nautilus 1:2.26.1-0ubuntu1
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: nautilus
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, can you run "/usr/lib/gvfs/gvfsd -r" on a command and then try to browse "smb://192.168.1.100" in nautilus and copy the log there? can you also run smbtree and copy the log to the bug?

affects: nautilus (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Changed in nautilus (Ubuntu):
assignee: nobody → desktop-bugs
Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :

hiya
i wasn't 100% sure what you wanted me to do
I ran
/usr/lib/gvfs/gvfsd -r
in a terminal and used nautilus to navigate to smb://192.168.1.100
and the it found the shares no problem and mounted them

nothing was dislpayed in the terminal
where i had typed /usr/lib/gvfs/gvfsd -r

sorry if i've done this wrong

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you describe again what is your issue then?

Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :

using my mouse i press places in the menu at the top of the screen then select network
this shows my network shares on the other machines in the network and on the nas
when i click one of the places in the network:/// nautilus window

i get a dialog saying
"unable to mount location failed to retrieve share list from sever"

Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :

oh i forgot to say the shares can be mounted on a windows machine connected to the same network

Revision history for this message
Sebastien Bacher (seb128) wrote :

does "nautilus smb://Music" works correctly or give the same error?

Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :

i did nautilus smb://Music and it also failed
Later on i was playing with the live cd and found that it worked on that
so i reinstalled and applied the updates again
and it works on the notebook
so i will reinstall the desktop later tonight

i don't know why it did this, i've not altered any samba /gnome settings and only applied the updates as they have come to me.

so this bug can be marked as fixed or what ever
sorry for kinda wasting your time

Revision history for this message
Sebastien Bacher (seb128) wrote :

closing the bug since that works correctly on a stock jaunty, upgrades are probably not the cause for this issue but rather a configuration change, you can reopen if you figure what setting trigger the bug

Changed in gvfs (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
amanderge (serge-benard) wrote :
Download full text (6.4 KiB)

I have the very same problem - Recently unable to browse the network via Nautilus -> Places -> Network -> Windows Network, but making a direct connection using Samba worked. When attempting to browse the network, I get the same error as OP. I just installed new updates on the morning of Friday July 16.

I don't remember which updates were applied, and I am not sure how I can verify which updates were last applied. However, I have run the /usr/lib/gvfs/gvfsd -r command in Terminal. It seemed like nothing was happening in the Terminal window, and I let it run while I attempted to browse the network via Nautilus -> Places -> Network -> Windows Network. While attempting to connect to Windows shares, this is what was dumped in the Terminal window:

### SMB-BROWSE: g_vfs_backend_smb_browse_class_init - default workgroup = '(null)'
lp_load_ex: refreshing parameters
Initialising global parameters
params.c:OpenConfFile() - Unable to open configuration file "/home/amanderge/.smb/smb.conf":
 No such file or directory
pm_process() returned No
lp_load_ex: refreshing parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter server string = %h server (Samba, Ubuntu)
doing parameter dns proxy = no
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter syslog = 0
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter encrypt passwords = true
doing parameter passdb backend = tdbsam
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
lp_load_ex: refreshing parameters
params.c:OpenConfFile() - Unable to open configuration file "/home/amanderge/.smb/smb.conf.append":
 No such file or directory
pm_process() returned No
added interface wlan0 ip=fe80::214:a4ff:fe12:67c2%wlan0 bcast=fe80::ffff:ffff:ffff:ffff%wlan0 netmask=ffff:ffff:ffff:ffff::
added interface wlan0 ip=10.10.10.101 bcast=10.10.11.255 netmask=255.255.252.0
Using netbios name AMANDERGE-LAPTOP.
Using workgroup WORKGROUP.
### SMB-BROWSE: do_mount - URI = smb://
### SMB-BROWSE: do_mount - try #0
parsed path: fname='smb://' server='' share='' path='' options=''
SMBC_check_options(): server='' share='' path='' options=''
name_resolve_bcast: Attempting broadcast lookup for name __MSBROWSE__<0x1>
tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No such file or directory
tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No such file or directory
tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No such file or directory
tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No such file or directory
tdb(unnamed): tdb_open_ex: could not open file /var/run/samb...

Read more...

Revision history for this message
Vipul (vipulgolchha-gmail) wrote :

have u got any solution for the above problem because i am facing the same problem as described above

plz plz reply soon

Revision history for this message
Vipul (vipulgolchha-gmail) wrote :

soory got the solution

it was my firewall that was causing the whole mess

Revision history for this message
Dick Thomas (xpd259-deactivatedaccount) wrote :

this bug is still valid . the one user had firewall issues not the other two

Revision history for this message
Michael DePaulo (mikedep333) wrote :

I have had issues like this for the last few releases. I am running nightly Lucid 64-bit live ATM on a homogeneous (engineering fraternity) network. I can view the names of workgroups, and access machines by ip address in nautilus (generally) but nautilus can neither browse a workgroup nor a machine by name.

/usr/lib/gvfs/gvfsd -r does not show any text at all.I have had issues like this for the last few releases. I am running nightly Lucid 64-bit ATM on a homogeneous (engineering fraternity) network. I can view the names of workgroups, and access machines by ip address in nautilus (generally) but nautilus can neither browse a workgroup nor a machine by name.

/usr/lib/gvfs/gvfsd -r does not show any text at all. Neither does smbtree .

Changed in gvfs (Ubuntu):
status: Invalid → New
Revision history for this message
Michael DePaulo (mikedep333) wrote :

smbtree worked on my desktop (lucid beta2 x86-64 with updates as of this moment.) BTW, ORPHEUS and MORPHEUS are indeed separate computers.
mike@telescreen:~$ smbtree --user=guest --no-pass
WORKGROUP
 \\VERSIFICATOR MP560 series
cli_start_connection: failed to connect to VERSIFICATOR<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\SECONDMATE
cli_start_connection: failed to connect to SECONDMATE<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\MORPHEUS
cli_start_connection: failed to connect to MORPHEUS<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\JOHNDECKER-PC
cli_start_connection: failed to connect to JOHNDECKER-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\JIMMYBOY
cli_start_connection: failed to connect to JIMMYBOY<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\DAVE
cli_start_connection: failed to connect to DAVE<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
TRIANGLE
 \\TURBO
cli_start_connection: failed to connect to TURBO<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\SUMMERS Summers
cli_start_connection: failed to connect to SUMMERS<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\STUDYROOMMSD
cli_start_connection: failed to connect to STUDYROOMMSD<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\STUDYROOM2
cli_start_connection: failed to connect to STUDYROOM2<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\ORPHEUS
cli_start_connection: failed to connect to ORPHEUS<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\MINITRUE minitrue server (Samba, Ubuntu)
cli_start_connection: failed to connect to MINITRUE<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\KEWLPUTER
cli_start_connection: failed to connect to KEWLPUTER<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\JERSEYMIKE
cli_start_connection: failed to connect to JERSEYMIKE<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\INCARVITED DommyDomDomDom
cli_start_connection: failed to connect to INCARVITED<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
MSHOME
 \\PHILTHY-COMP
cli_start_connection: failed to connect to PHILTHY-COMP<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
 \\PAVILON01
cli_start_connection: failed to connect to PAVILON01<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
mike@telescreen:~$

Revision history for this message
Michael DePaulo (mikedep333) wrote :

I figured out what the problem was!

We are customer's of Comcast, a large American ISP, in State College, Pennsylvania, USA.

They have DNS search redirection or whatever. EVERY hostname name is resolved by them. If it isn't one on the public internet, they redirect you to their web server with a search result for whatever the hostname is.

Eg. if I were to enter "adgagsfaa" or "minitrue" as the address bar in firefox, comcast's search results for those terms would come up because it resolved those random/local addresses to their web server. Similarly if I enter those terms as an address in nautilus, comcast DNS resolves them to their web server as well. In other words, Comcast's DNS results are superseding all of the SMB/WINS/NMB/whatever results for the local network.

I just tried "ping telescreen" from minitrue, and it resolved it to 208.68.139.38 .

I believe this may be a problem with OpenDNS as well.

I fixed the problem by using Google's DNS servers (8.8.8.8 & 8.8.4.4). Immediately everything started working.

Windows does not have this problem because they have SMB/WINS/NMB/whatever to resolve hostnames before they try DNS results.

One possible workaround, other than using a real DNS service, is to implement windows' behavior with /etc/nsswitch.conf.

Whether or not Ubuntu's software should be patched to avoid this problem, I don't know. I doubt using either of these workarounds could be made user friendly.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the detailed comments, right names resolution and nsswitch order is a known "issue", not really a bug though...

Revision history for this message
Gotit (sca957) wrote :

Thanks for your Google DNS work-a-round.
However, this problem doesn't seem to exist in my JJ 9.04 machine but I experienced it in both of my LL 10.04 machines.

In my LL 10.04 machines I found simply changing Network Manager to use Google's DNS wasn't sufficient and I still had the problem of not being able to browse my local network locations. So, I changed my router to use Google's DNS and that resolved my problem on both of my LL 10.04 machines.

So, it seems the older JJ 9.04 was able to handle Concast's DNS but the new LL 10.04 lost the recipe!!

Revision history for this message
Gotit (sca957) wrote :

Oh, there's another work-a-round here: http://ubuntuforums.org/showthread.php?p=9442639#post9442639 and that worked for me too.

Revision history for this message
Dimitrios Ntoulas (ntoulasd) wrote :

Using 10.10 and I had the same problem.

I use dhcp on client.

Revision history for this message
Gotit (sca957) wrote :

I haven't had much need for connecting to shared locations since my last post, but that has changed. Again, I found myself fighting this problem and it was proving to be a real bugger trying to connect to local shares. However, I did find the following combination to work very well for me:

1. In etc/smba/smb.conf uncomment this line and make it read:
        name resolve order = lmhosts wins bcast host
    Notice "host" is last in the order.
    I have switched from Google DNS to OpenDNS and I needed this to help resolve behind my firewall.

2. In etc/smba/smb.conf make this line read with the name of your workgroup:
        workgroup = <your workgroup name here>

3. In Firestarter (firewall config tool):
       Edit > Preferences > Advanced Options un-check "Block broadcasts from external network"
    This was key in my case. After making changes #1 & 2 above I was still have a difficult time connecting to shared locations. So then in Firestarter I added a rule to the firewall to open Samba port ranges of 137-139 and 445 and gave it my internal network range, but that didn't seem to make any difference and have since removed that rule . Only when I unchecked "Block broadcasts from external network" was I able to easily connect to local shares (initial connection may take 2 attempts sometimes).
Note: Firestarter defaults to "Block broadcasts from external network" as checked and "Block broadcasts from internal network" as un-checked. So I now have both of these un-checked.

Is this a big security risk outside of my home network?

I don't know if there is a bug with the firewall, Firestarter or I'm just flat missing something.

Revision history for this message
mlaverdiere (mlaverdiere) wrote :

I'm on Precise 12.04 and was somewhat experiencing the same issue, i.e getting the "failed to retrieve shares list from server" when trying to reach SAMBA shares on my NAS (WD MyBook World Edition).

I've read and try a lot of things on this issue (among others, rearranging the order of the "name resolve" string in smb.conf), but nothing worked. Even the smbtree command was unsuccessful, as it was not retrieving any shares list. But, I was able to connect to a share by issuing the nautilus smb:// command. A the end of the day, the only thing that solved all this was to install the samba package, which was not installed by default. Since then, retrieving and connecting SAMBA shares through Nautilus work without a glitch.

Shouldn't the SAMBA package be installed by default then?

Revision history for this message
Michael DePaulo (mikedep333) wrote :

Mlaverdiere,

Yes, you do need to have the "samba" package installed because it contains nmbd, the netbios P2P name lookup daemon. Otherwise, your system tries only DNS for the name lookups, which fail for the aforementioned reason.

I've become more experienced with Linux, and my recommended complete workaround to this issue is as follows:
1. Install the "samba" package.
2. Edit the line for "hosts" in /etc/nsswitch.conf so that "wins" is inserted right after "files".
e.g., if your nsswitch.conf has this "hosts" line:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
change it to:
hosts: files wins mdns4_minimal [NOTFOUND=return] dns mdns4
Do this even if "wins" was not on the original line, still add it after "files". As a standard precaution, you should backup your original /etc/nsswitch.conf also.

What this does basically, is it makes linux to both lookup hostnames via netbios (wins) in general, and prioritize those name lookups over DNS name lookups. This mimics the default behavior of Windows.
(Step 2 may not be necessary for many users like Mlaverdiere because the samba suite uses its own name resolve order by default (the "name resolve order" line in smb.conf.), rather than the global /etc/nsswitch.conf file for all Linux programs.)

Also, some newer home wireless routers both:
A. Tell DHCP clients (your computers) to use it as the DNS server. E.g., it will tell them to use 192.168.1.1.
B. Automatically create DNS records for those DHCP clients.
This feature resolves the issue completely, and making my workaround unnecessary.

Revision history for this message
mlaverdiere (mlaverdiere) wrote :

Thanks Michael for your input. As my own problem is already fixed, my question was in relation with the purpose of this bug report, i.e. to fix things for the future and for other users.

So here's my proposition: if we want users to have a no-fuss experience when trying to access SAMBA shares (as everyone knows, SAMBA is quite common on various NAS, etc.) that may mean that the samba package should be installed by default (so, available on installation media, or at least, be installed upon first update). From my experience, that doesn't seem to be the case right now. See the default package listing fro 12.04 - samba package is not there (while other related samba package are present): http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-i386.manifest

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
mlaverdiere (mlaverdiere) wrote :

Like mentioned earlier, it seems that the "failed to retrieve shares list from server" problem may me related to the lack of samba package on an out of the box Ubuntu installation. Having the samba package installed appears to fix the problem or, at least, in more complex situation, be one of the steps involved in fixing it. See the default package listing fro 12.04 where there is no samba package, while other related samba package are present: http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-i386.manifest

affects: gvfs (Ubuntu) → samba (Ubuntu)
Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

browsing seems to work by default in 13.04

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, according to this report, you are not using the most recent version of this package for your Ubuntu release. Please upgrade to the most recent version and let us know if you are still having this issue. Thanks in advance.

Changed in samba (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.