If you want cap to detect and prompt for the password, use the sudo helper directly, instead of run "sudo", e.g.:

  sudo "chown -R apache:apache #{latest_release}"

- Jamis

On Jan 2, 2008, at 1:40 PM, halbertn wrote:


Hello,
I'm at my wits end here...
I'm using capistrano 2.1.
I'm overwriting the finalize_update task in my deploy script to run
sudo so that I can perform some misc linux calls. Here's a sample
call:

 task :finalize_update, :except => { :no_release => true } do
   # chown the new directory to apache:apache
   run "sudo -p 'sudo password:' chown -R apache:apache
#{latest_release}"
 end

I do see the 'sudo password:' prompt, however anything I type appears
on the terminal and hitting enter doesn't send my password over.
Prior to the sudo call, when I'm prompted for a password, I don't see
my character inputs on the screen, typical of entering passwords in
linux terminal,...so it appears that the sudo password prompt is
broken.  Is there a setting that I have not configured properly?

I've been searching google, and part of the new features for
capistraion 2.1 is that it recognizes the '-p' option on sudo. As
quoted:

Use sudo -p switch to set sudo password prompt to something
predictable.

I don't understand this statement. What password prompt is "something
predictable"?

Thanks for any help!

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to