title: jenkins fails while restarting my sql "sudo: no tty present and no askpass program specified Sorry, try again."
body: <p>I just configured jenkins and in the pre-build steps i am trying to restart jenkins but i end up with the following error</p>
  
  <pre><code>Commencing build of Revision c5b9f8daac092efc5396d80f568a2cf89ae8b697 (origin/HEAD, origin/master)
  Checking out Revision c5b9f8daac092efc5396d80f568a2cf89ae8b697 (origin/HEAD, origin/master)
  No change to record in branch origin/HEAD
  No change to record in branch origin/master
  [webapp] $ /bin/sh -xe /tmp/hudson5215632082686866774.sh
  + sudo /etc/init.d/mysql restart
  sudo: no tty present and no askpass program specified
  Sorry, try again.
  sudo: no tty present and no askpass program specified
  Sorry, try again.
  sudo: no tty present and no askpass program specified
  Sorry, try again.
  sudo: 3 incorrect password attempts
  Build step 'Execute shell' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>I googled and saw some answers at <a href="https://stackoverflow.com/questions/13263367/jenkins-out-of-nowhere-starts-failing-with-sudo-no-tty-present-and-no-askpass-p">Jenkins out of nowhere starts failing with sudo: no tty present and no askpass program specified</a> </p>
  
  <p>But unfortunately that didn't help me</p>
  
  <p>My /etc/sudoers looks like this</p>
  
  <pre><code>#
  # This file MUST be edited with the 'visudo' command as root.
  #
  # Please consider adding local content in /etc/sudoers.d/ instead of
  # directly modifying this file.
  #
  # See the man page for details on how to write a sudoers file.
  #
  Defaults        env_reset
  Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  
  # Host alias specification
  
  # User alias specification
  
  # Cmnd alias specification
  
  # User privilege specification
  root    ALL=(ALL:ALL) ALL
  
  # Members of the admin group may gain root privileges
  %admin ALL=(ALL) NOPASSWD: ALL
  
  # Allow members of group sudo to execute any command
  %sudo   ALL=(ALL:ALL) ALL
  
  # See sudoers(5) for more information on "#include" directives:
  
  #includedir /etc/sudoers.d
  </code></pre>