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 167020 - Guest authentication demands a username/password.
Guest authentication demands a username/password.
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: smb
2.9.x
Other All
: Normal major
: ---
Assigned To: Stef Walter
Stef Walter
: 152590 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-02-11 03:38 UTC by Eugenia Loli-Queru
Modified: 2005-03-25 22:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Trace of smb://schaaf (6.20 KB, text/plain)
2005-02-11 18:28 UTC, Christian Kellner
  Details
Same actions but with the DEBUG statement in it (6.90 KB, text/plain)
2005-02-11 18:38 UTC, Christian Kellner
  Details
Possible patch (2.56 KB, patch)
2005-02-11 19:02 UTC, Stef Walter
none Details | Review
Another patch for testing (1.29 KB, patch)
2005-02-11 22:57 UTC, Stef Walter
committed Details | Review
Source file for Eugenia (67.50 KB, text/plain)
2005-02-17 19:07 UTC, Stef Walter
  Details
New source file for Eugenia (67.48 KB, patch)
2005-02-19 16:03 UTC, Stef Walter
none Details | Review

Description Eugenia Loli-Queru 2005-02-11 03:38:59 UTC
Please describe the problem:
Since the new work on gnome-vfs for gnome 2.10, I can't login to my network's
SMB, because gnome-vfs does not let me continue and mount the share if I first
won't insert a login/password. Problem is, the samba server is open and free to
all on my network, so it should automatically either understand that no password
is required (Mac OS X does that), or simply, try to connect when I click "ok" or
"cancel" on the dialog.

Please note that previous versions worked FINE, I was just clicking "cancel" on
the dialog and it would connect.

After supplying a login/pass (I had to ask for one), nautilus connects just
fine. However, please fix this new problem, because not always there is a
password on a closed network environment. 

Steps to reproduce:
1. connect to smb://10.0.0.10
2. asks for login/pass.
3.  Says "ok" or "cancel" but it doesn't let you go through, even if there is no
login/pass required.


Actual results:
doesn't mount the share

Expected results:
mount the share and not ask me for a password if none is required

Does this happen every time?
yes

Other information:
please fix it, it's annoying to have this working almost fine, and then go to a
newer version of gnome and have it not working properly.
Comment 1 Sebastien Bacher 2005-02-11 11:30:40 UTC
Ccing Nate Nielsen since he rewrote the smb authentification and maybe has an
idea on this.

I've the same issue here with the current version when connecting a windows XP box
Comment 2 Stef Walter 2005-02-11 17:04:40 UTC
Sorry bout that. Looking into the problem. I have a feeling it may be a
libsmbclient problem that we're agravating. What version of samba (or
samba-client) do you have installed? 

I realize that you upgraded GNOME and that's when this problem started, not
samba. However the new gnome-vfs SMB method uses a new flag in samba, so for
this reason it would be interesting to see which exact samba version you have
installed.
Comment 3 Stef Walter 2005-02-11 17:44:11 UTC
I've tried to reproduce the problem, but it doesn't seem to be happening for me.
I just set up a new Samba server with guest level access and I don't get
prompted at all. Very strange. 

Either I'll need some help to reproduce the problem, or I'll need some debug
logs. I'd prefer the later, but it means recompiling gnome-vfs from source.
Here's some pointers in case you are willing to help.

 - Before rebuilding gnome-vfs add the following lines 
   to the top of modules/smb-method.c:

#define DEBUG_SMB_ENABLE
#define DEBUG_SMB_LOCKS

 - Now configure, make and install (of course, include 
   options specific to your system).
 - Next run the following commands to get gnome-vfs-daemon 
   running in a terminal:

$ gnome-session-remove nautilus
$ killall nautilus
$ killall gnome-vfs-daemon; /usr/libexec/gnome-vfs-daemon

 - If the last command returns you to a prompt, try it
   again. Or close all apps that could be using gnome-vfs.
 - Start nautilus elsewhere. 
 - You should see lots of nice insightful debug output, 
   which when attached to this bug should help me solve 
   the problem.

Thank you.
Comment 4 Sebastien Bacher 2005-02-11 18:07:23 UTC
samba 3.0.10 (from hoary, which is basically the debian version) here.

output of nautilus smb://ip and cancel on the authentification dialog:

** (nautilus:2281): WARNING **: Hit unhandled case 31 (Operation cancelled) in
fm_report_error_loading_directory


<-- smb module init called -->
LOCK
UNLOCK
do_get_file_info() smb://192.168.1.25
update_workgroup_cache: enumerating workgroups
LOCK
[auth] Initializing Authentication
[auth] perform_authentication called.
[auth] First authentication pass
[auth] auth_callback called: server: 192.168.1.25 share: IPC$
[auth] Initial authentication lookups
[auth] No credentials, returning null values
add_cached_server: server: 192.168.1.25, share: IPC$, domain: , user:
[auth] perform_authentication called.
[auth] Non-authentication error. Leaving auth loop.
[auth] Cleaning up Authentication
UNLOCK
do_open_directory() smb://192.168.1.25
do_open_directory() path smb://192.168.1.25
LOCK
[auth] Initializing Authentication
[auth] perform_authentication called.
[auth] First authentication pass
[auth] auth_callback called: server: 192.168.1.25 share: IPC$
[auth] Initial authentication lookups
[auth] No credentials, returning null values
add_cached_server: server: 192.168.1.25, share: IPC$, domain: , user:
[auth] perform_authentication called.
UNLOCK
[auth] Trying to prefill credentials for: smb://192.168.1.25
[auth] Trying to prefill server credentials for: smb://192.168.1.25/
[auth] Prompting credentials for: smb://192.168.1.25
do_get_file_info() smb://192.168.1.25
[auth] Prompted credentials: (null)@(null):(null)
LOCK
[auth] Authentication cancelled by user.
[auth] Cleaning up Authentication
UNLOCK


smbclient works fine on the same box
Comment 5 Christian Kellner 2005-02-11 18:28:24 UTC
Created attachment 37362 [details]
Trace of smb://schaaf

schaaf is my roomies windows xp pc.
I got the dialog and first I didn't enter anything -> repromt
I filled in some bugs u/p foo/bar -> worked
Comment 6 Stef Walter 2005-02-11 18:31:30 UTC
Thanks Sebastian.

It seems that access to 192.168.1.25 on the share IPC$ is somehow failing for a
guest login (which gnome-vfs-smb tries automatically initially, similar to
windows). 

Could you make another change to smb-method.c? Could you add the following line
near the top of the perform_authentication function (right by the other DEBUG
line is perfect)?

	DEBUG_SMB(("[auth] result code: %d\n", actx->res));

Could you send me the debug output again with that change, and perhaps press
'ok' once this time around, so we get a complete picture. 
Comment 7 Christian Kellner 2005-02-11 18:38:38 UTC
Created attachment 37363 [details]
Same actions but with the DEBUG statement in it
Comment 8 Sebastien Bacher 2005-02-11 18:44:13 UTC
<-- smb module init called -->
LOCK
UNLOCK
do_get_file_info() smb://192.168.1.25
update_workgroup_cache: enumerating workgroups
LOCK
[auth] Initializing Authentication
[auth] perform_authentication called.
[auth] result code: 0
[auth] First authentication pass
[auth] auth_callback called: server: 192.168.1.25 share: IPC$
[auth] Initial authentication lookups
[auth] No credentials, returning null values
add_cached_server: server: 192.168.1.25, share: IPC$, domain: , user:
[auth] perform_authentication called.
[auth] result code: 2
[auth] Non-authentication error. Leaving auth loop.
[auth] Cleaning up Authentication
UNLOCK
do_open_directory() smb://192.168.1.25
do_open_directory() path smb://192.168.1.25
LOCK
[auth] Initializing Authentication
[auth] perform_authentication called.
[auth] result code: 0
[auth] First authentication pass
[auth] auth_callback called: server: 192.168.1.25 share: IPC$
[auth] Initial authentication lookups
[auth] No credentials, returning null values
do_get_file_info() smb://192.168.1.25
add_cached_server: server: 192.168.1.25, share: IPC$, domain: , user:
[auth] perform_authentication called.
[auth] result code: 16
UNLOCK
[auth] Trying to prefill credentials for: smb://192.168.1.25
[auth] Trying to prefill server credentials for: smb://192.168.1.25/
[auth] Prompting credentials for: smb://192.168.1.25
[auth] Prompted credentials: (null)@(null):(null)
LOCK
[auth] Authentication cancelled by user.
[auth] Cleaning up Authentication
UNLOCK
Comment 9 Christian Kellner 2005-02-11 18:46:38 UTC
Btw, Sebastian and I are hanging out in #nautilus on irc.gimp.org most of the
time. I think that would be more efficient! :)
Comment 10 Stef Walter 2005-02-11 19:02:40 UTC
Created attachment 37365 [details] [review]
Possible patch
Comment 11 Eugenia Loli-Queru 2005-02-11 21:31:00 UTC
3.0.10 I think. The latest from ubuntu's Hoary repositories.
Comment 12 Sebastien Bacher 2005-02-11 22:33:10 UTC
*** Bug 152590 has been marked as a duplicate of this bug. ***
Comment 13 Stef Walter 2005-02-11 22:57:40 UTC
Created attachment 37377 [details] [review]
Another patch for testing
Comment 14 Stef Walter 2005-02-11 23:35:19 UTC
Patches committed, although the testers didn't have the same setup as the
reporter. If you (Eugenia) have the time and ability, testing the resulting
fixes on your network would be much appreciated. 
Comment 15 Eugenia Loli-Queru 2005-02-11 23:37:35 UTC
I will have to wait for Ubuntu to compile Gnome RC-1 for me so I can test this
(I assume that the next release of gnome after beta-2 will be RC-1 and that your
patch will appear on that release).

If not, please create a gnome-vfs/nautilus tarball for me, and I will compile it
myself so I can test it.
Comment 16 Stef Walter 2005-02-17 19:07:52 UTC
Created attachment 37611 [details]
Source file for Eugenia

Eugenia, attached is the smb-method.c file. To compile, untar the sources your
version of gnome-vfs, and replace modules/smb-method.c with this file. Then
rebuild as normal. This should work with any version of gnome-vfs 2.9.x
Comment 17 Eugenia Loli-Queru 2005-02-18 05:03:46 UTC
No, the new file did not fix it. The dialog keeps asking me over and over for a
login/pass. It *does* let me in to the samba share if I provide a phony
login/pass but it doesn't let me in if I don't provide any. Maybe you should
create a button called "Anonymous Login" and try to mount the share without
sending any login/pass over.
Comment 18 Stef Walter 2005-02-18 15:05:43 UTC
Could you produce a debug log as outlined above and attach it to this bug? Thanks.
Comment 19 Stef Walter 2005-02-18 18:00:46 UTC
As far as the "Anonymous Login" button, that's a good idea. But since we're in
UI freeze we can't really make that change for GNOME 2.10.

I'm going to be away tommorrow till the 24th, so any additional insight into
your setup and debug logs (important) today would be a real help. Otherwise
they'll have to wait until the 24th which is 3 days before hard code freeze.
Comment 20 Eugenia Loli-Queru 2005-02-19 03:51:28 UTC
eugenia@ubuntu ~ $  killall gnome-vfs-daemon; /usr/libexec/gnome-vfs-daemon

libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/computer
libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/ide_1_1
libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/ide_1_0

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=sysfs

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=none

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=usbfs

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=proc

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=tmpfs

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=devpts

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=none

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=rootfs

(process:10495): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=/dev2/root2

(process:10495): libgnomevfs-WARNING **: Failed to create factory


eugenia@ubuntu ~ $ nautilus
Bonobo accessibility support initialized
GTK Accessibility Module initialized
** (nautilus:10459): WARNING **: Failed to add file monitor for
file:///home/eugenia/.gtk-bookmarks: Unsupported operation
** (nautilus:10459): WARNING **: Hit unhandled case 31 (Operation cancelled) in
fm_report_error_loading_directory

(this is when I pressed "cancel" on the login/pass dialog)
Comment 21 Stef Walter 2005-02-19 16:02:26 UTC
That's odd your trace doesn't seem to be from the file i posted (the new one
doesn't return 'Operation Cancelled' anymore). In addition those two DEBUG_XXX
#defines i described in the instructions above don't seem to be active in the
file. I'm posting a new file with these defines. Replace modules/smb-method.c
with the new file before doing: 

make clean && make && sudo make install

Then proceed with the other debug log steps. Thanks. Much appreciated.
Comment 22 Stef Walter 2005-02-19 16:03:14 UTC
Created attachment 37680 [details] [review]
New source file for Eugenia
Comment 23 Eugenia Loli-Queru 2005-02-23 00:12:54 UTC
The latest file you sent me does not work at all with Samba! Nautilus now can
not see the samba shares at all !! :(

eugenia@ubuntu ~ $ gnome-session-remove nautilus
Bonobo accessibility support initialized
GTK Accessibility Module initialized
Removing 'nautilus' from the session
application finalize called
eugenia@ubuntu ~ $ killall nautilus
nautilus: no process killed
eugenia@ubuntu ~ $ killall gnome-vfs-daemon; /usr/libexec/gnome-vfs-daemon
libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/computer
libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/ide_1_1
libhal.c 911 : Error sending msg: No property info.category on device with id
/org/freedesktop/Hal/devices/ide_1_0

(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=sysfs
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=none
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=usbfs
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=proc
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=tmpfs
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=devpts
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=none
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=rootfs
(process:15183): libgnomevfs-WARNING **: _gnome_vfs_hal_mounts_modify_volume: no
hal drive for device=/dev2/root2


eugenia@ubuntu ~ $ nautilus
Bonobo accessibility support initialized
GTK Accessibility Module initialized

** (nautilus:15192): WARNING **: Failed to add file monitor for
file:///home/eugenia/.gtk-bookmarks: Unsupported operation
[assert] error: 111 (Connection refused)
[assert] where: "socket.c", "sw_socket_tcp_connect", line: 720
(nautilus:15192): libgnomevfs-WARNING **: get_global_howl_session - howl init failed
[assert] error: 111 (Connection refused)
[assert] where: "socket.c", "sw_socket_tcp_connect", line: 720
(nautilus:15192): libgnomevfs-WARNING **: get_global_howl_session - howl init failed
[assert] error: 111 (Connection refused)
[assert] where: "socket.c", "sw_socket_tcp_connect", line: 720
(nautilus:15192): libgnomevfs-WARNING **: get_global_howl_session - howl init failed
[assert] error: 111 (Connection refused)
[assert] where: "socket.c", "sw_socket_tcp_connect", line: 720
(nautilus:15192): gnome-vfs-modules-WARNING **: dns-sd: howl init failed: 111
Comment 24 Stef Walter 2005-03-25 22:25:54 UTC
Assuming this was fixed in Gnome 2.10. If still an issue, please reopen with
further details.
Comment 25 Eugenia Loli-Queru 2005-03-25 22:30:16 UTC
it's fixed indeed. :)