0

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', 'm1')
conn.connect(ip_address)

However, the following doesn't work:

from smb.SMBConnection import SMBConnection
conn = SMBConnection('mydomain\\administrator', 'p@ssw0rd', 'anything', 'm1')
conn.connect(ip_address)

I want to use this interface to connect to a Windows domain controller as a user from a different domain. How can I do that ?

PS1: 'mydomain' is the domain netbios name

PS2: I have also tried passing the 'domain' argument to the constructor. Apparently it is ignored. Authentication succeeds with any value passed in.

Rahul
  • 963
  • 9
  • 14

0 Answers0