GNOME Bugzilla – Bug 167020
Guest authentication demands a username/password.
Last modified: 2005-03-25 22:30:16 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.
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
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.
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.
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
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
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.
Created attachment 37363 [details] Same actions but with the DEBUG statement in it
<-- 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
Btw, Sebastian and I are hanging out in #nautilus on irc.gimp.org most of the time. I think that would be more efficient! :)
Created attachment 37365 [details] [review] Possible patch
3.0.10 I think. The latest from ubuntu's Hoary repositories.
*** Bug 152590 has been marked as a duplicate of this bug. ***
Created attachment 37377 [details] [review] Another patch for testing
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.
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.
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
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.
Could you produce a debug log as outlined above and attach it to this bug? Thanks.
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.
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)
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.
Created attachment 37680 [details] [review] New source file for Eugenia
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
Assuming this was fixed in Gnome 2.10. If still an issue, please reopen with further details.
it's fixed indeed. :)