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 691863 - Not asking for credentials when anonymous pass fails
Not asking for credentials when anonymous pass fails
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: smb backend
1.14.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-16 15:38 UTC by Tomas Bzatek
Modified: 2016-01-22 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomas Bzatek 2013-01-16 15:38:08 UTC
So I've been debugging samba login issues with user running Ubuntu 12.10 (gvfs-1.14.0, libsmbclient-3.6.6) connecting to a NAS box running Samba 3.0.32.

Going through Nautilus smb-browse, clicking the share icon (anonymous mode) will return an error "Failed to mount Windows share" without any credentials prompt. Manually specifying user in the URI works.

Log excerpt:
> Queued new job 0x1b92830 (GVfsJobMount)
> smbc_stat(smb://nas/homes)
> Connecting to 192.168.1.12 at port 445
>  session request ok
> Doing spnego session setup (blob length=58)
> SPNEGO login failed: Logon failure
>  session setup ok
> send_reply, failed: 1


Things to do:
 - add more debugging prints like we do in smb-browse to see what error codes are returned
 - return more specific error, fix /* TODO: Error from errno? */
 - try to reproduce locally
Comment 1 Tomas Bzatek 2013-02-08 15:46:12 UTC
commit 5ca4ebdac6bc5c6d87802ae527bb7880d81e823c
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Fri Feb 8 16:35:27 2013 +0100

    smb: More verbosity for easier debugging
    
    This adds more debugging output for both smb and smb-browse backends
    and also brings more verbosity for user-visible error messages.
    
    Changes made to be able to debug weird samba issues remotely:
    https://bugzilla.gnome.org/show_bug.cgi?id=691863


This will be included in the 1.15.4 release and hopefully we would be able to reveal more details.
Comment 2 Tomas Bzatek 2013-02-08 15:54:53 UTC
Also worth noting is an issue I've come across today. My system hostname didn't correspond with forward nor reverse DNS records and that made samba confused. Apparently resolving netbios name led to translation to a hostname that was then resolved through DNS, resulting in outdated IP address which libsmbclient then used for connecting to the server. That timed out eventually and led to an error while trying to list workgroup members (smb-browse mode).

Activating GVFS_SMB_DEBUG=99 brought more messages from libsmbclient that were repeatedly printed out until the timeout:

> s3_event: Added timed event "tevent_req_timedout": 0x7f5518009d90
> s3_event: Schedule immediate event "tevent_queue_immediate_trigger": 0x7f55180095f0
> s3_event: Run immediate event "tevent_queue_immediate_trigger": 0x7f55180095f0
> s3_event: Destroying timer event 0x7f5518009d90 "tevent_req_timedout"

This is samba-3.6.9, standalone smbclient failed with NT_STATUS_UNSUCCESSFUL.
Comment 3 Ross Lagerwall 2015-05-06 12:13:18 UTC
Any update on this Tomas, or can it be closed?
Comment 4 Ondrej Holy 2016-01-22 14:49:51 UTC
Let's close this as obsolete...