libsmbclient and SMB3

Stefan Metzmacher metze at samba.org
Tue Aug 28 09:31:00 UTC 2018


Am 28.08.2018 um 11:27 schrieb Andreas Schneider via samba-technical:
> On Tuesday, 28 August 2018 01:06:26 CEST Jeremy Allison wrote:
>> On Mon, Aug 27, 2018 at 07:08:29PM +0200, Andreas Schneider via samba-
> technical wrote:
>>> Hi,
>>>
>>> how can you tell libsmbclient to use SMB3 and why doesn libsmbclient
>>> default to SMB1?
>>>
>>>
>>> ./bin/smbtorture //addc/tmp -UAdministrator
>>> --option=torture:smburl="smb://
>>> earth.milkyway.site" libsmbclient.list_shares
>>>
>>>
>>> fails with the following error:
>>>
>>>
>>> smb1cli_req_writev_submit: called for dialect[SMB3_11]
>>> server[earth.milkyway.site]
>>>
>>> Which is from libcli/smb/smbXcli_base.c +1681
>>>
>>> if (state->conn->protocol > PROTOCOL_NT1) {
>>>
>>>    return NT_STATUS_REVISION_MISMATCH;
>>>
>>> }
>>>
>>>
>>> smbclient -L //earth.milkyway.site -U Administrator
>>>
>>> works just fine.
>>
>> OK, I'm confused as to what you're expecting here.
>>
>> libsmbclient uses the "client max protocol"/"client min protocol"
>> settings in the smb.conf, I think it tries to use the max
>> protocol selected.
>>
>> Are you looking for a command line / smburl method of
>> selecting protocol level ?
> 
> 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()?

Don't we use that for SMB1 too?

The thing that can't work is the workgroup listing of servers.

That would need WSD and LLMNR support.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180828/a44bf698/signature.sig>


More information about the samba-technical mailing list