0

I am using fabric to restart tomcat and even though it says tomcat restarted successfully it does not. So, as per the FAQ, I set pty=False and tried again. But, now, I get this error:

sudo: /etc/init.d/tomcat restart
out: sudo: sorry, you must have a tty to run sudo

Any ideas around this problem?

1
  • Not sure if it makes a difference, but did you do it like sudo(...) or like run('sudo ...)?
    – tshepang
    Nov 19, 2012 at 15:50

1 Answer 1

1

To anyone reading this, this is not a problem with fabric but with the way sudo accounts have been set up. This property in /etc/sudoers file controls this;

Defaults requiretty

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.