title: Can I prevent fabric from prompting me for a sudo password?
body: <p>I am using <a href="http://docs.fabfile.org/0.9.2/" rel="noreferrer">Fabric</a> to run commands on a remote server. The user with which I connect on that server has some sudo privileges, and does not require a password to use these privileges. When SSH'ing into the server, I can run <code>sudo blah</code> and the command executes without prompting for a password. When I try to run the same command via Fabric's <code>sudo</code> function, I get prompted for a password. This is because Fabric builds a command in the following manner when using <code>sudo</code>:</p>
  
  <pre><code>sudo -S -p &lt;sudo_prompt&gt; /bin/bash -l -c "&lt;command&gt;"
  </code></pre>
  
  <p>Obviously, my user does not have permission to execute <code>/bin/bash</code> without a password.</p>
  
  <p>I've worked around the problem by using <code>run("sudo blah")</code> instead of <code>sudo("blah")</code>, but I wondered if there is a better solution. Is there a workaround for this issue?</p>