Yeah, this is my bad. I was trying to be clever, to make it so that the sudo helper would work as many people expect when you try to chain multiple commands together in a single sudo call, e.g.:

  sudo("cd /path/to/something && do_something")

In cap 2.2 and earlier that wouldn't work, because only the first command would execute as sudo, but not the latter. Cap 2.3 silently wraps your command in an sh -e "..." invocation...which (duh) breaks when you've got sudo configured to only execute certain commands. I'll be rolling this back in the next release, but this also means that deploy:setup won't use sudo (again), because it currently does "umask 0220 && mkdir", which breaks with the older sudo model.

I'm open to suggestions on this. These kinds of regressions are really demotivating for me. :(

- Jamis

On May 20, 2008, at 9:18 AM, gobigdave wrote:


Strange, I had the opposite effect. I upgraded to 2.3.0, and now I
have to enter my sudo password.  I have the following in my sudoers
file:

dave ALL = NOPASSWD: /usr/local/bin/god

dave is the user I'm using for this example.  Run "sudo god status" on
the remote box, and there is no prompt for a password. However, when
cap runs "sudo("god restart mongrels")", I get prompted for a
password.

My deploy setup worked perfectly for a while, and the only thing that
changed was capistrano (2.2 -> 2.3).

On May 13, 4:53 pm, Chuck <[EMAIL PROTECTED]> wrote:
Ok, that was strange. I updated capistrano (2.2.0 to 2.3.0) to the
latest version and it started working...

Go figure.

On May 13, 2:41 pm, Chuck <[EMAIL PROTECTED]> wrote:

I have that set up exactly in the sudoers file as specified and if I'm
logged into the machine, I cansudoat will with no  password prompt.
However, the capistrano script still prompts me for a password.

On May 13, 2:32 pm, Jochen Kaechelin <[EMAIL PROTECTED]> wrote:

Am 13.05.2008 um 22:26 schrieb Chuck:

Last week, I successfully deployed with Capistrano with no password prompts. I set up a cron job to run a script that went to the right
directory and then did a 'cap deploy'. Since then, it has been
prompting me for asudopassword. Is there a way to avoid this?

You can edit /etc/sudoers on your linux box and add:

deploy_username ALL=(ALL) NOPASSWD: ALL

--
Jochen
--~--~---------~--~----~------------~-------~--~----~
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