libsmbclient and SMB3
Jeremy Allison
jra at samba.org
Tue Aug 28 19:59:31 UTC 2018
On Tue, Aug 28, 2018 at 11:27:11AM +0200, Andreas Schneider wrote:
>
> Ok, I see smbclient reconnects using SMB1 for listing the shares. However it
> produces an error:
>
> bin/smbclient -L //earth.milkyway.site -UAdministrator%Secret007!
>
> Sharename Type Comment
> --------- ---- -------
> ADMIN$ Disk Remote Admin
> C$ Disk Default share
> IPC$ IPC Remote IPC
> NETLOGON Disk Logon server share
> SYSVOL Disk Logon server share
> Reconnecting with SMB1 for workgroup listing.
> Connection to earth.milkyway.site failed (Error
> NT_STATUS_RESOURCE_NAME_NOT_FOUND)
> Failed to connect with SMB1 -- no workgroup available
>
> libsmbclient doesn't do the reconnect and fails.
>
>
> How do you do share listing if SMB1 has been completely disabled, use
> dcerpc_srvsvc_NetShareEnumAll()?
>
>
> The reason is that I get a lot of bugs which complain about listing shares is
> broken with Nautilus (which uses a gvfs libsmbclient backend).
Inside libsmbclient it uses:
if (net_share_enum_rpc(
srv->cli,
list_fn,
(void *) dir) < 0 &&
cli_RNetShareEnum(
srv->cli,
list_fn,
(void *)dir) < 0) {
where net_share_enum_rpc() calls dcerpc_srvsvc_NetShareEnumAll(),
so we try the DCE call first, then fall back to the old SMB1 RAP
call if that fails.
More information about the samba-technical
mailing list