It sounds like you need every command to run via sudo, which is not supported by the default deployment recipes. In that case, you'll need to write your own, using sudo() instead of run(). Whether sudo prompts for a password or not isn't really relevant, since if it does, Capistrano will cache the password after the first time and reuse it on subsequent prompts.
If you come up some deployment recipes for your scenario, I'm sure others will be interested. It doesn't come up often, but when it does it is quite frustrating. - Jamis On Jul 8, 2008, at 11:24 PM, Artur Matos wrote: > > Dear all, > > To deploy programs in my environment, I need to be able to change to a > specific user first - by running "sudo su <user>", and typing my > password. > > I would like to automate my deployment tasks with Capistrano, but > Capistrano does not allow me to run sudo. "run "sudo su <user>"" will > not work, because sudo always start an interactive shell, and this > will make Capistrano block forever waiting for it to close. > > I am aware this was already discussed before on this thread: > > http://groups.google.com/group/capistrano/browse_thread/thread/138db74cbf904765/ff5d65e991ac222a) > > . > > However, none of the solutions proposed at that time really work for > me. For instance, I cannot set up my sudo so that it doesn't prompt > for passwords (I don't have access to the sudoers file and I cannot > change it - company policy). Does anyone had a similar problem? Any > workarounds? > > Thanks in advance, > > Artur > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
