eduardok / libsmbclient-php

smbclient's extension for PHP
Other
99 stars 21 forks source link

Is there a way to force php smbclient to use SMv2.0 #61

Closed kevphcc closed 3 years ago

kevphcc commented 6 years ago

Our organization has disabled SMB 1.0 due to vulnarebilities. However, for some reason owncloud wont connect to the shares if SMBv1 is disabled. Is there a way to force php smbclient to use SMv2.0?

I have already changed the smb.conf file to look like:

    max open files = 32808
    server string = %h univention corporate server
    ntlm auth       = yes
    machine password timeout        = 0
    acl allow execute always = True
    min protocol = SMB2
    max protocol = SMB3
    client ipc min protocol = SMB2
    client ipc max protocol = SMB3

Please help as I cannot keep the SMBv1 enabled for long.

mstrucken commented 6 years ago

We managed to connect with SMB3_10 by setting the following in smb.conf:

client min protocol = SMB2
client max protocol = SMB3_10

client max protocol = SMB3 or client max protocol = SMB3_11 did not work for us.

Did you try to use tcpdump and have a look at the negotiation?

kevphcc commented 6 years ago

Changed smb.conf to reflect client max protocol = SMB3_10 and restarted the smb deamon. But no luck. Yes, I have done the network traffic analysis and normal traffic is through SMBv2 but the owncloud traffic still goes through SMBv1. I spmehow need a way to ask owncloud to use SMBv2.

eduardok commented 3 years ago

There is now, use smbclient_client_protocols() with release 1.0.2 or greater. Closing.