November 22nd, 2012, 02:21 AM
Join Date: Nov 2012
Time spent in forums: 30 m 22 sec
Reputation Power: 0
Need help in using pysmb module
I am trying to print a file over smb in python. I have used the module pysmb.
This is the code:
from smb import SMBConnection
server_name = ‘server1’ //remote server name
server_ip = '10.210.x.x ' //remote server ip
server_port = '445'
client_name =‘server2’ //client from where I am running my program
user = 'user' //username of my client
password = 'pwd' //password of my client
conn = SMBConnection.SMBConnection(user,password,client_name,server_name,use_ntlm_v2=True)
conn.connect(server_ip,445) //fails when server is windows & passes when server is linux
What is the command to send a file to remote server?
Thanks in advance