title: How to pass the password to su/sudo/ssh without overriding the TTY?
body: <p>I'm writing a C Shell program that will be doing <code>su</code> or <code>sudo</code> or <code>ssh</code>. They all want their passwords in console input (the TTY) rather than stdin or the command line.</p>
  
  <p>Does anybody know a solution?</p>
  
  <p>Setting up password-less <code>sudo</code> is not an option.</p>
  
  <p><a href="/questions/tagged/expect" class="post-tag" title="show questions tagged &#39;expect&#39;" rel="tag">expect</a> could be an option, but it's not present on my stripped-down system.</p>