title: failure to map drive on remote machine through winexe
body: <p>I'm trying to map a network share on a remote windows xp machine using winexe program from ubuntu and the command fails with the errors as below .</p>
  
  <p>Command:</p>
  
  <pre><code>./bin/winexe -U Domain1/Administrator%paswrd123 //192.168.4.38 'cmd /c net use Q: \\192.168.4.16\Mydrive pwd123 /USER:user /P:yes'
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>System error 1312 has occurred.
  
  A specified logon session does not exist. It may already have been terminated.
  </code></pre>
  
  <p>i went to the remote system logged in and ran net use command locally and the share drive got mapped successfully .</p>
  
  <p>Command used :</p>
  
  <pre><code>net use Q: \\192.168.4.16\Mydrive pwd123 /USER:user /P:yes
  </code></pre>
  
  <p>i have googled and people have given suggestions on checking the syntax of the command , the syntax of the command is fine and it works fine when run locally on the windows system. Help on this would be appreciated .</p>
  
  <p><strong>EDIT</strong>:I entered the domain name in the username section as below and the command worked successfully but i'm unable to find the share drive on the remote machine.</p>
  
  <pre><code>./bin/winexe -U Domain1/Administrator%paswrd123 //192.168.4.38 'cmd /c net use Q:\\192.168.4.16\Mydrive pwd123 /USER:MUM\user /P:yes`' 
  The command completed successfully.
  </code></pre>