Bug 76253 - Can't access smb:// shares with browseable = no (ie homes)
Summary: Can't access smb:// shares with browseable = no (ie homes)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gnome-vfs2-extras
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
: 70873 74821 75623 (view as bug list)
Depends On:
Blocks: 79579 CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2002-10-18 18:56 UTC by Need Real Name
Modified: 2007-04-18 16:47 UTC (History)
4 users (show)

Fixed In Version: 2.14.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-04-22 20:30:56 UTC
Embargoed:


Attachments (Terms of Use)
URI username and password used on server. Ask for username and password for server. (3.34 KB, patch)
2002-11-08 21:57 UTC, Thomas Dodd
no flags Details | Diff

Description Need Real Name 2002-10-18 18:56:11 UTC
Description of Problem:

You can't use nautilus to access [homes] shares on a samba server.
Presumably this applies to any browseable = no share without guest
access?  Even when you type smb://server/homes you can't access
the share (it appears from the logs that nautilus/libsmb.so tries
to do an anonymous login first to verify the share name is valid
or broweable and fails it when it can't do so - it does this even when
you use the form smb://user@server/homes which seems definitely wrong...)

Probably it should try to have you login first and only try to login
in anonymously if that fails, rather than the reverse it does now?

If you change the share to browseable = yes it lets you connect to
it (after typing in the correct username and passwd of course.)

Version-Release number of selected component (if applicable):

0.99.5-1

Comment 1 Alexander Larsson 2002-11-06 08:17:24 UTC
Yes. This is a known bug.


Comment 2 Alexander Larsson 2002-11-06 08:19:43 UTC
*** Bug 75623 has been marked as a duplicate of this bug. ***

Comment 3 Alexander Larsson 2002-11-06 08:22:48 UTC
*** Bug 70873 has been marked as a duplicate of this bug. ***

Comment 4 Alexander Larsson 2002-11-06 08:23:32 UTC
*** Bug 74821 has been marked as a duplicate of this bug. ***

Comment 5 Thomas Dodd 2002-11-06 19:33:31 UTC
Any ideas how to fix this?
Perhaps a debug version?
Is there a gnome bug on this?
I grabbed gnome-vfs2-extras-0.99.6.1 form gnome.org but it doesn't help.

What can we do to get this going?



Comment 6 Alexander Larsson 2002-11-07 12:12:34 UTC
The code just has to be fixed to not think it managed to log in anonymously when
it has no read access. Its a small matter of experimenting and coding.
Unfortunately I have other higher prioritized issues to work on first, so unless
someone else wants to write a patch there is not much you can do at the moment.


Comment 7 Alexander Larsson 2002-11-07 12:13:51 UTC
(I'm also the upstream maintainer and author)

Comment 8 Thomas Dodd 2002-11-07 15:31:53 UTC
Is this just in the vfs-extras code or somewhere else?
Any pointers to which files/functions to look at?

Also I'm not sure the browsable option matters.

smb.conf

[build]


Comment 9 Thomas Dodd 2002-11-07 15:37:46 UTC
Is this just in the vfs-extras code or somewhere else?
Any pointers to which files/functions to look at?

Also I'm not sure the browsable option matters.
See Bug#75623, marked as a dup of this one.
(Odd since it's a week older...)

smb.conf

[build]
  comment = Public Stuff
  path = /build
  guest ok = yes
  browsable = ues

But I cannot access smb://foo/build
"Cannot find "smb" ... check the spelling and try again."




Comment 10 Thomas Dodd 2002-11-07 17:19:13 UTC
I found the DEBUG_SMB_ENABLE in smb-method.c and rebuilt/installed
libsmb.so but I cannot find any output from it.

It calls g_print() but I don't know where that's supposed to go. I saw in the
change log you changed the g_print() debug statements, to be based on
DEBUG_SMB_ENABLE. Where/how am I to get the output from g_print()?

I also see some DEBUG stuff in samba/lib that's based on DEBUGLEVEL but again
I don't see how to set it or where to find it's output.

Any hints? 


Comment 11 Alexander Larsson 2002-11-08 11:57:55 UTC
run killall -9 nautilus repeatedly until it stops respawning (or alternatively,
use the ui to remove it from the session), then start nautilus from a shell and
you'll get the output on standard out.


Comment 12 Alexander Larsson 2002-11-08 12:00:48 UTC
I'm not an expert in samba setups in any way, but i think the problem is when
the server allows anonymous to log in, but then not read anything. This means we
think that the loging succeded, so we won't ask for user+passwd, but nothing
actually works.

Of course, there is also the problem that you may want to log in as a user even
though anonymous login works. You might want to e.g. write something, and anon
user only has write access. I don't know the best solution to this.

Comment 13 Need Real Name 2002-11-08 15:44:32 UTC
> I'm not an expert in samba setups in any way, but i think the problem is when
> the server allows anonymous to log in, but then not read anything. This means we
> think that the loging succeded, so we won't ask for user+passwd, but nothing
> actually works.

I hate to be the one to say "why don't you do it like windows does" but since
the people who need to get the shares this way are mostly coming from windows
I'm going to.  I think all that needs doing to get the semantics right is
try to login first with user and pass and iff that doesn't work then try the
anonymous login.  That is, if I recall, the way windows does it.  And yes that
can screw you up in some circumstances too, but not in a way that windows
people aren't used to it being screwed up...

> Of course, there is also the problem that you may want to log in as a user even
> though anonymous login works. You might want to e.g. write something, and anon
> user only has write access.

That's a problem, the bigger though is there is no way to login to browseable =
no shares (or servers where you can't get the share list without logging in
first - which is how win2k is these days I think) with nautilus.  Period.  Even
when you explicitly put user:pass and share name - libsmb.so still does
some sort of verification that the share exists *as an anonymous user* and
won't even try the user login if it fails.  That is _totally_ counterintuitive
and basically useless in a lot of setups.

I think sending user:pass or at least user and prompt for pass first solves
all of those problems - what am I missing?

Comment 14 Thomas Dodd 2002-11-08 21:53:49 UTC
One problem is that in build_server_tree() the password entered in the URI isn't
being used to get the list of shares. Once you have the list, it gets some stats
on each share, and it does ask for the share passwords. Problem is, If you no't
connect to the server with a usename, you don't get the HOMES shares.
Infact, lookup_uri() doesn't pass that to build_server_tree() because
built_server_tree() doesn't have input args for them, and lookup_uri() doesn't
add the to the SmbAuthInfo hash for the server.

I've added the SmbAuthInfo has lookup/add to lookup_uri(). Now I can pass
username and password in the uri, and see the listing for HOMES. I also figured
out how to get nautilus to ask for the username and password if one wasn't given
in the uri and one isn't stored in the SmbAuthInfo hash.




Comment 15 Thomas Dodd 2002-11-08 21:57:17 UTC
Created attachment 84304 [details]
URI username and password used on server. Ask for username and password for server.

Comment 16 Alexander Larsson 2003-01-14 14:22:47 UTC
I think this is fixed now, can you try the latest RAWHIDE package?


Comment 17 Thomas Dodd 2003-01-14 17:23:32 UTC
I'd like too, but gnome-vfs2-extras needs a new gnome-vfs2, which needs a new
versions of libbonobo and gnome-mime-data.

Any chance if Red Hat 8.0 versions of the requirements? The ones in rawhide are
for Phoebe+. I'll be that the new libbonobo will require other new versions.
Building GNOME is nopt something I've been able to do. Too many packages, and
figuring out the correct order to build/install them is beyond me. I tried it
before.

I also tried using the new smb-method.c from gnome-vfs2-extras-0.99.8.1 but
there are errors, probably fixed in the newer gnome-vfs2.



Comment 18 Thomas Dodd 2003-01-14 17:42:30 UTC
In function smb_root_connection: GNOME_VFS_ERROR_NO_MASTER_BROWSER undeclared.
Looking at the old smb-method.c, i replaced it with
GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE which was use for that error. 

Installed the modules, and started X.
Browsing smb:// and smb://<workgroup> is very slow.
Selecting a machine in the workgroup fails, ''Couldn't display
"smb://<workgroup>/<machine>", because no host "<workgroup>" could be found.''
That's because <machine> has a different samba name versus unix/HOSTS/DNS name.

Using the DNS name for the machine prompted for user/pass, but then doesn't show
shares from that machine. I'll try shares from a SunPCI+Win98 system after lunch.



Comment 19 Thomas Dodd 2003-01-14 19:13:29 UTC
OK. I still cannot access our main server, but I can get to a protected share
from Win98.

The it's not using lmhosts like Windoze does. I added the server to my local
/etc/samba/lmhosts file and smbclient can connect correctly, but not the smb://
vfs module.

I also cannot connect to my samba server, it reports login failure, but I can
connect to it from Win98.

And smb://username:password@/server/service doesn't appear to work yet. I
haven't checked, but I bet it's the same problem as before, and that info is not
 getting passed (see comment #14 and patch in #15).

I'll try to get Phoebe installed to test with the current/rawhide gnome-vfs2 and
gnome-vfs2-extras.


Comment 20 Marius Andreiana 2005-11-03 10:03:05 UTC
Is this still an issue in FC4 / rawhide?

Comment 21 John Thacker 2006-04-22 20:30:56 UTC
This works with recent gnome-vfs2-smb, at least for me.  
Has for some time, as earlier comments state, but I'm not sure exactly 
when it started working.  Closing.

Not going to be fixed on RH8, which isn't even supported by Legacy now.


Note You need to log in before you can comment on or make changes to this bug.