Comment 50 for bug 1778322

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

I don't know if it's related, it probably isn't, but I'll mention it just in case.. I noticed a regression in smbclient and I'm wondering if that's affecting gvfs as well.

After setting up an open share (RW access to everyone, no password) on the Windows 10 box, I can access it with Ubuntu 16.04 (samba 4.3.11):

$ smbclient -L 192.168.0.104 -N
WARNING: The "syslog" option is deprecated
OS=[Windows 10 Home 17134] Server=[Windows 10 Home 6.3]

 Sharename Type Comment
 --------- ---- -------
 ADMIN$ Disk Remote Admin
 C$ Disk Default share
 IPC$ IPC Remote IPC
 MySharedFolder Disk
 print$ Disk Printer Drivers
 Users Disk
Connection to 192.168.0.104 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled -- no workgroup available

I get that successful result also if I set the min protocol to NT1, SMB2 or SMB3 using the -m argument.

But if I try to access it in Ubuntu 18.04 (samba 4.7.6), I get an ACCESS_DENIED error:

$ smbclient -L 192.168.0.104 -N
WARNING: The "syslog" option is deprecated
session setup failed: NT_STATUS_ACCESS_DENIED

Specifying the protocol to SMB2 or SMB3 doesn't change anything:

$ smbclient -L 192.168.0.104 -N -m SMB2
WARNING: The "syslog" option is deprecated
session setup failed: NT_STATUS_ACCESS_DENIED

Interestingly enough, changing it to NT1 doesn't solve the issue but note how smbclient reports a successful anonymous login:

$ smbclient -L 192.168.0.104 -N -m NT1
WARNING: The "syslog" option is deprecated
Anonymous login successful

 Sharename Type Comment
 --------- ---- -------
Error returning browse list: NT_STATUS_ACCESS_DENIED
Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.0.104 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

And finally, what solves the issue is to set a username to something, anything. In the example below I use the string "dummy", which doesn't correspond to any username in the Windows or in the Linux box:

smbclient -L 192.168.0.104 -N -U dummy
WARNING: The "syslog" option is deprecated

 Sharename Type Comment
 --------- ---- -------
 ADMIN$ Disk Remote Admin
 C$ Disk Default share
 IPC$ IPC Remote IPC
 MySharedFolder Disk
 print$ Disk Printer Drivers
 Users Disk
Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.0.104 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

If you think this regression is specific to smbclient, please ignore this, we can open a new bug report. The reason I mention it is that I'm wondering if gvfs isn't failing in a similar manner.