Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm new with Rundeck and completely amazed with it and I'm trying to execute a job and my scenario is detailed below:

  • Rundeck is configured with ssh passwordless authentication for user master between node Server (rundeck server) and node Target (remote Solaris host) for user "master"
  • In node Target I want to execute a script /app/acme/stopApp.sh with a user appmanager
  • Normally and manually, when I need to run script above I proceed with

    ssh master@server 
    sudo su - appmanager
    

    or simply

    ssh -t master@server 'sudo su - appmanager'
    

    works without password and finally run (as appmanager)

    /app/acme/stopApp.sh
    

But I'm not sure how can I reproduce these steps using Rundeck. I read in some previous messages that for each job line rundeck use a new ssh connection, so the workflow below always fails for me with the messages:

sudo: no tty present and no askpass program specified
Remote command failed with exit status 1

Please someone could help me with some information to solve this issue.

Without this functionality I wouldn't be able to introduce a little DevOps in my department.

I read the user guide and admin guide but I couldn't find an easy example, neither in this forum, to follow.

share|improve this question
add comment

1 Answer 1

Since I don't know anything about rundeck, take my advice with a large grain of salt, but if you are getting a no tty present message from sudo, most probably, sudo'ing into this account from which ever account you are coming from, is not allowed with a NOPASSWORD directive in the sudoers file and it is expecting you to enter a password. And since you are establishing a headless connection (i.e. notty), it is failing after finding no place to read this password from.

Scan your sudoers file and see if you can find a relevant line regarding this sudo/login combination and play with it.

On a less likely scenario, rundeck might have its override of sudo in some way but I don't count on it too much.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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