Questions tagged [pysmb]

24 questions
0
votes
0 answers

Does pysmb support copying .zip files

I am trying to copy .zip files from a shared network folder to a unix environment using pysmb. The process will copy the .zip file names, but not the contents of the files smbFolder = "networkdrive" conn = SMBConnection('username', 'password',…
danny
  • 1
0
votes
0 answers

How to connect to Windows domain controller using pysmb as user from different domain?

I am able to connect to a W2019 domain controller using python smb modules on Linux using the following type of code: from smb.SMBConnection import SMBConnection conn = SMBConnection('administrator', 'p@ssw0rd', 'anything',…
Rahul
  • 963
  • 9
  • 14
0
votes
0 answers

SMB2 TREE_CONNECT response MaximalAccess: file or directory access mask?

I have hacked impacket a bit to provide access to the MaximalAccess field in the SMB2 TREE_CONNECT Response. However, I am wondering how to interpret this field. The docs say Contains the maximal access for the user that establishes the tree…
0
votes
1 answer

Error open file after saving it with storeFile of pysmb

I am reading an Excel file (.xlsx) with pysmb. import tempfile from smb.SMBConnection import SMBConnection conn = SMBConnection(userID, password, client_machine_name, server_name, use_ntlm_v2 = True) conn.connect(server_ip, 139) file_obj =…
Mael_Jourdain
  • 446
  • 4
  • 4
0
votes
0 answers

SMBConnection fails with "[Errno 104] Connection reset by peer"

I have a python script to copy a file from an Ubuntu 22.04 host (ip 10.1.1.2) to a Windows host (member server on a domain, version 10.0.14393, ip 10.1.1.1) using pysmb. I have verified that the Windows host is available and that firewall rules are…
0
votes
0 answers

Read an xlsx file from a NAS (smbConnection)

I'm trying to read an xlsx file stored in a NAS, using smb.SMBConnection. I did this : from smb.SMBConnection import SMBConnection import tempfile conn = SMBConnection('username', 'password', 'name', 'name') conn.connect('10.111.111.111') results =…
mathilde
  • 194
  • 1
  • 11
0
votes
1 answer

Pysmb SMBConnection listPath function - Can I use Regex in the pattern parameter?

Regarding the listpath() method of SMBConnection class in pysmb and following on from this thread. Using the SMBConnect listPath function pattern parameter, is it possible to specify more than one pattern? Example: This code only returns files from…
FlexMcMurphy
  • 420
  • 5
  • 21
0
votes
0 answers

Python: converting dictionaries into objects with read/write methods

I need to be able to read/write files using samba connection in Python. For this purpose I use pysmb. However, I am cannot make storeFile function work: storeFile(service_name, path, file_obj, timeout=30) Where file_obj – A file-like object that…
Mikhail Genkin
  • 3,247
  • 4
  • 27
  • 47
-1
votes
0 answers

How to query remote host time using pysmb?

I need to query a bunch of Windows machines' local clocks from a Linux host. Those machines are not synchronized to anything for reasons that are outside of my control. Currently I use a call to "net time" using Python's subprocess module; however,…
musbur
  • 567
  • 4
  • 16
1
2