So, trying to modify a python script that when invoked copies a local file to a remote host.<br><br>Previously this was done with only needing to pass a username.<br><br><code><br>    try:<br>        ret = subprocess.call("smbclient //metricsmachine/reports/; put %s\" -U metrics%%" % (fileName), shell=True)<br>
        if ret < 0:<br>                print >>sys.stderr, "Child was terminated by signal", -ret<br>        else:<br>            os.unlink(path+fileName)<br>    except OSError, e:<br>            print >>sys.stderr, "Execution failed:", e<br>
<code><br><br>Now, I'm having to change the remote host and pass both the username and pass but cannot get it to work.<br><br>Changing it to <br><br>    try:<br>        ret = subprocess.call("smbclient //reportingmachine/Dashboard/; put %s\" -U Username%Password" % (fileName), shell=True)<br>
        if ret < 0:<br>                print >>sys.stderr, "Child was terminated by signal", -ret<br>        else:<br>            os.unlink(path+fileName)<br>    except OSError, e:<br>            print >>sys.stderr, "Execution failed:", e<br>
<br>Any help would be appreciated.<br clear="all"><br>-- <br>Mike of Many Stories, Ideas, and Ramblings<br>Game Chef 2009, 2010<br>NaNoWriMo 2008, 2009<br><br><a href="http://mikeofmanystories.blogspot.com/" target="_blank">http://mikeofmanystories.blogspot.com/</a> - writings<br>
<a href="http://mikeofmany.wordpress.com/" target="_blank">http://mikeofmany.wordpress.com/</a> - personal bloggery<br>