- Ruby - 1.8.7
   - Capistrano - 2.6.0
   - Rake / Rails / etc


   - Working on....CentOS
   - Deploying to... CentOS


Even though "deployuser" has the rights to switch to "admin" user without 
entering password, cap script is expecting password to be entered. 

-bash-4.1$ cap -f /tmp/captest-user.cap deploy
  * executing `deploy'
  * executing "whoami"
    servers: ["host1"]
    [host1] executing command
 ** [out :: host1] deployuser
    command finished in 69ms
*  * executing "sudo -p 'sudo password: ' -u admin 
/data/myapplication/ stop"*
*    servers: ["host1"]*
*    [host1] executing command*


   - Capfile
      - default_run_options[:pty] = true
      - role :app, "host1"
      - task :deploy, roles => :app do
      - run "whoami"
      - *run "/data/myapplication/ stop", :shell => "sudo su - 
      - run "tail -f /home/apache-tomcat-7.0.67/logs/catalina.out | sed 
      '/^INFO: Stopping ProtocolHandler/ q'"
      - run "sudo puppet agent --confdir=/home/puppet --waitforcert 60 
      --test; true"
      - end
In 2.6 is there a way i can execute commands on behalf of another user 
("admin" in my case)? If so how? I understand that this is possible with 
the help of 
in Cap 3.0. But i would like to know if it is achievable using 2.6 or 
should i have to upgrade it? 

Any pointers will help me a lot. Thanks!

You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web, visit
For more options, visit

Reply via email to