Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant connect w/ smb on mac os, python 3.8 #193

Open
davebeiler opened this issue Feb 11, 2022 · 6 comments
Open

Cant connect w/ smb on mac os, python 3.8 #193

davebeiler opened this issue Feb 11, 2022 · 6 comments

Comments

@davebeiler
Copy link

Successfully installed pysmb-1.2.7
(venv) s153152@MB20OXDHQ60774 ssd_dashboard % python3 smb2-connect-windows.py
Traceback (most recent call last):
File "smb2-connect-windows.py", line 16, in
assert conn.connect(server_name, 139)
AssertionError


import SmbClient, SMBConnection

class SmbClient(object):
        def __init__(self,ip,username,password,sharename):
                self.ip = 10.28.7.249
                self.username = 'username'
                self.password = 'password$'
                self.sharename = 'Tableau Output'
        def connect(self):
                self.server = SMBConnection(self.username,
                                self.password,client,netbios_name,use_ntlm_v2=True)
                self.server.connect(self.ip,139)

        def list(self):
                ' list files of remote share '
            filelist = self.server.listPath(self.sharename,'/')
            for f in filelist:
                    print f.filename
@davebeiler
Copy link
Author

davebeiler commented Feb 11, 2022

same error on python 3.9

doesnt work either


        def connect(self):
                self.server = SMBConnection(self.username,
                self.password,client,netbios_name,use_ntlm_v2=True)
                assert self.server.connect(self.ip,139)
        def list(self):
                ' list files of remote share '
                filelist = self.server.listPath(self.sharename,'/')
                for f in filelist:
                        print f.filename

@miketeo
Copy link
Owner

miketeo commented Feb 12, 2022

@davebeiler : The netbios name might be incorrect or port 139 is behind firewall.

@davebeiler
Copy link
Author

davebeiler commented Feb 12, 2022 via email

@miketeo
Copy link
Owner

miketeo commented Feb 14, 2022

No the documentation isn’t correct

Can you point out where the documentation is not correct? It could help others in using pysmb.

@praveen-elastic
Copy link

praveen-elastic commented Jun 24, 2022

Hey @davebeiler, would you mind sharing the example you've used for connecting to your smb share on MacOS ?

@zentarim
Copy link

zentarim commented Jul 7, 2022

Try the version 1.2.8.

It MIGHT help if you, in fact, encountered the OpenSSL-related problem described here: #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants