title: pymssql: How to use windows authentication when running on a non-windows box
body: <p>Is there a way for python to connect to MS SQL Server using <strong>Windows Authentication</strong>, <em>even when not running the python app on a windows box</em>?</p>
  
  <p>I'm trying to do this with pymssql, but the examples mostly seem to assume that you're running on windows.</p>
  
  <p>If there is a way to make this connection using some other library, please feel free to suggest, but I do like how pymssql is simple to install and deploy via pip.</p>
  
  <p>I want to connect to 2005/2008 databases, and I'm running Ubuntu 13.04 (but I can upgrade to a later Ubuntu if it makes a difference)</p>
  
  <p><strong>SOLUTION:</strong></p>
  
  <p>It turns out that pymssql can connect to my database via my windows username and password.  But to do so, I need to pass the actual username/password like this:</p>
  
  <pre><code>pymssql.connect(host, 'THEDOMAIN\\theusername', 'thepassword', db)
  </code></pre>
  
  <p>The solution EkoostikMartin provided is still good though (if you do not want to store a password somewhere, which is probably the point to windows auth anyway)</p>