After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 132933 - smb share access issues
smb share access issues
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: smb
2.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 129890 135699 142461 145248 145683 147036 147637 148295 153902 153925 157922 159544 167332 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-30 03:30 UTC by Sean Middleditch
Modified: 2005-05-23 22:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Patch which fixes share and browsing probs (6.84 KB, patch)
2004-11-17 23:32 UTC, Stef Walter
none Details | Review
Rewrite of SMB authentication (49.24 KB, patch)
2005-01-06 01:23 UTC, Stef Walter
none Details | Review
fix browse issues when username and/or domain is specified in URI (3.25 KB, patch)
2005-01-13 08:54 UTC, Narayana Pattipati
none Details | Review
Fixes user/domain in URI issues (2.75 KB, patch)
2005-01-16 00:25 UTC, Stef Walter
none Details | Review
Cache user/password info across shares (59.81 KB, patch)
2005-01-23 05:33 UTC, Stef Walter
none Details | Review
Cache User/Password across Shares (17.29 KB, patch)
2005-01-23 05:42 UTC, Stef Walter
none Details | Review
Cache User/Password across Shares [with fixes] (17.25 KB, patch)
2005-01-24 19:10 UTC, Stef Walter
none Details | Review
Wrong patch again. (18.93 KB, patch)
2005-01-24 19:20 UTC, Stef Walter
committed Details | Review

Description Sean Middleditch 2004-01-30 03:30:56 UTC
The SMB access method seems to only attempt authentication when connecting
to a share (folder) on a server, and not when connecting to the server
itself.  This means that shares/folders which require authentication to see
will never be shown.

The username field should default to the local username, since in most
cases that's what it'll be.  Should also perhaps find a way to set a
default DOMAIN.

And, once setting a username/password for a share, you cannot change it. 
So if I can access a share as two different users, only the first one I
pick is available.  It may just be that gnome-keyring doesn't have a UI for
this yet, but when it does, I should be able to get a context menu for a
share/server to change the current user.
Comment 1 Simon Watson 2004-02-27 18:39:07 UTC
I'm also having the same issues - I can see the servers, but when i
try and access them it just says "You do not have the permissions
necessary to view the contents of "Windows Network: machine"."

Interestingly though, the only ones it doesn't work for are windows
machines. Is this down to encrypted passwords?
Comment 2 Bryan Cole 2004-07-09 06:50:56 UTC
I get the same problem. Accessing explicitly names shares works quite well, but
I cannot browse the shares on machines which require authentication. This is on
a Windows-2000 domain-controlled network. Browsing Samba shares works because my
Samba shares don't require authentication for browsing.

Nautilus/gnome-vfs seems to detect when the shares require authentication, but
not when browsing requires it.
Comment 3 Mark Cooke 2004-10-14 01:18:46 UTC
I'm getting the same problem, trying to access the servers and shares on my
Company's Windows 2003 servers, also with referance to gnome-vfs assuming that
you will be using the same username and password as on the windows machine, this
is not the case, If I boot up into my XP workstation, my login name is: 'Mark
Cooke', yet on my debian box with gnome, it's 'mark', as I'm logging in locally,
as opposed to the domain.

But yes I get to see the servers, but as soon as I try to access or view any
shares on them (i.e I click the server name), I also get the "You do not have
the permissions necessary to view the contents of "Windows Network: machine".".


Comment 4 Sebastien Bacher 2004-10-14 20:37:57 UTC
*** Bug 153925 has been marked as a duplicate of this bug. ***
Comment 5 Stef Walter 2004-11-17 23:32:29 UTC
Created attachment 33894 [details] [review]
Patch which fixes share and browsing probs

Attached is a patch that fixes browsing on a domain. More specifically:

- Allows authentication against master browser
- Allows authentication against IPC$ shares 
  (while hiding the weird name from the user)
Comment 6 Stef Walter 2005-01-06 01:23:57 UTC
Created attachment 35520 [details] [review]
Rewrite of SMB authentication

This patch rewrites most of the gnome-vfs SMB authentication code. As discussed
on gnome-vfs-list@gnome.org the previous code deadlocks under circumstances and
isn't very robust.

The per server caching issue isn't tackled in this patch yet, but this should
increase stability greatly. It would be nice to get this into Gnome 2.10 before
the feature freeze on Jan 10th.
Comment 7 Alexander Larsson 2005-01-10 19:04:55 UTC
This patch with some fixes is in cvs.
Comment 8 Narayana Pattipati 2005-01-13 08:51:08 UTC
As discussed in the gnome-vfs mailing list, there are issues in smb:// browsing
if username and/or domain name is specified in the url. The mailing list thread is:
http://mail.gnome.org/archives/gnome-vfs-list/2005-January/msg00021.html

The problem will be there when smb uri  is in the following forms:
- smb://username machine
- smb://domain;username machine
- smb://domain;@machine

When url is like this, while processing the uri (initial_authentication()) and 
while prompting for authentication (prompt_authentication()), assumptions have 
been made about the availability of domain name.  Same is true while caching 
also.

Also, after invoking the authentication for say password only (username, domain 
are available through url), the return values from
gnome_vfs_module_callback_invoke() are filled into username and domain also, 
even though user is not prompted for them. User is just prompted for password. 
So, just fill in password.

The attached patch takes care of these issues and makes smb browsing work when 
url happens to be in the above forms.
Comment 9 Narayana Pattipati 2005-01-13 08:54:13 UTC
Created attachment 35933 [details] [review]
fix browse issues when username and/or domain is specified in URI
Comment 10 Stef Walter 2005-01-16 00:25:15 UTC
Created attachment 36079 [details] [review]
Fixes user/domain in URI issues

Committed your patch to cvs with fixes. See attached.
Comment 11 Stef Walter 2005-01-23 05:33:41 UTC
Created attachment 36406 [details] [review]
Cache user/password info across shares

This patch develops the SMB password caching further: 

- Cache password for the entire server in addition to per share. 
- If no password is cached for a share, look for the server cached password.
- Fix threading (had no lock) problems on the cache reaping callback.
- Keep an internal password cache in additon to the gnome keyring one.
- Merge default user and password cache.
Comment 12 Stef Walter 2005-01-23 05:42:48 UTC
Created attachment 36408 [details] [review]
Cache User/Password across Shares

Uploaded the wrong patch in previous attachment.
Comment 13 Stef Walter 2005-01-24 19:10:16 UTC
Created attachment 36478 [details] [review]
Cache User/Password across Shares [with fixes]

- Fixed memory leak in lookup_user_cache
- Check server cache before user cache so cached connections are used properly.

- Also cache when user name specified in uri (when possible)
Comment 14 Stef Walter 2005-01-24 19:20:40 UTC
Created attachment 36479 [details] [review]
Wrong patch again.

This deserves some kind of award :/
Comment 15 Kjartan Maraas 2005-02-11 18:58:53 UTC
*** Bug 147637 has been marked as a duplicate of this bug. ***
Comment 16 Martin Wehner 2005-02-12 08:21:15 UTC
*** Bug 147036 has been marked as a duplicate of this bug. ***
Comment 17 Martin Wehner 2005-02-12 08:26:11 UTC
*** Bug 129890 has been marked as a duplicate of this bug. ***
Comment 18 Martin Wehner 2005-02-12 08:28:33 UTC
*** Bug 135699 has been marked as a duplicate of this bug. ***
Comment 19 Martin Wehner 2005-02-12 09:05:47 UTC
*** Bug 145683 has been marked as a duplicate of this bug. ***
Comment 20 Martin Wehner 2005-02-12 13:26:03 UTC
*** Bug 145248 has been marked as a duplicate of this bug. ***
Comment 21 Martin Wehner 2005-02-12 20:53:10 UTC
*** Bug 153902 has been marked as a duplicate of this bug. ***
Comment 22 Christian Kellner 2005-02-13 00:42:00 UTC
*** Bug 148295 has been marked as a duplicate of this bug. ***
Comment 23 Christian Kellner 2005-02-13 00:49:18 UTC
*** Bug 159544 has been marked as a duplicate of this bug. ***
Comment 24 Christian Kellner 2005-02-13 01:13:40 UTC
*** Bug 157922 has been marked as a duplicate of this bug. ***
Comment 25 Christian Kellner 2005-02-14 09:36:20 UTC
*** Bug 167332 has been marked as a duplicate of this bug. ***
Comment 26 Martin Wehner 2005-02-26 15:44:52 UTC
*** Bug 142461 has been marked as a duplicate of this bug. ***
Comment 27 Stef Walter 2005-05-07 17:32:18 UTC
> And, once setting a username/password for a share, you cannot change it. 
> So if I can access a share as two different users, only the first one I
> pick is available.  It may just be that gnome-keyring doesn't have a UI for
> this yet, but when it does, I should be able to get a context menu for a
> share/server to change the current user.

I believe this is possible using 'Connect to Server'. This is where you can
force a user, domain, etc....
Comment 28 Kjartan Maraas 2005-05-16 12:43:30 UTC
What issues are still relevant here? I see all patches are marked as either
commited or obsolete?
Comment 29 Jaap A. Haitsma 2005-05-16 20:14:40 UTC
I'm still not able to see my smb shares when I go to smb:///

I can access the shares though when I type the address immediately
Comment 30 Matthew Lenz 2005-05-16 20:18:16 UTC
I've used ubuntu with gnome 2.10 and fedora core 4 test 3 with gnome 2.10.  Both
allow me to browse shares properly.
Comment 31 Jaap A. Haitsma 2005-05-16 20:20:16 UTC
I'm running Debian unstable with 2.10 experimental, and it doesn't work :-(
Comment 32 Matthew Lenz 2005-05-16 20:28:58 UTC
We've got a windows 2003 PCD here that I have an account on and i'm able to
properly authenticate to it when attemping to browse those machines.  The same
for most of the machines that are authenticated to the domain.  There are a
couple XP boxes that co-workers have that I cannot get to however.

At home I am able to authenticate and access my GFs XP Pro machine using the
username and password she created for me.  I think the reason why I'm able to
connect to some XP machines and not others probably depends on if they are using
simple shares or user based sharing on their XP system (there are a couple
different types of shares on XP from what I understand).

My suggestion would be to create a testuser on your box and see if you can
access the machines from a fresh gnome user config.  Maybe its something with
stale data in keyring manager on your current account.   That is just a complete
stab in the dark.
Comment 33 Stef Walter 2005-05-23 22:47:01 UTC
I've committed a fix which fills in the default username and domain. 
Comment 34 Stef Walter 2005-05-23 22:50:43 UTC
Finally closing this. All issues of the original poster and various other dups
seem to have been resolved. Please do not reopen this catch all bug. If you have
additional gnome-vfs SMB issues, please file new bugs.