fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] open_shell as root?


From: Jeff Forcier
Subject: Re: [Fab-user] open_shell as root?
Date: Thu, 28 Apr 2011 10:25:28 -0700

Hi Mohamed,

On Tue, Apr 26, 2011 at 6:07 AM, Mohamed Lrhazi <address@hidden> wrote:

> I tried something like command="sudo su -", which works, but I am
> prompted for the password, can that propmt be handled by fabric?
> I tried: something like command="sudo -p '%s' su -"%env.sudo_promopt
> but that did not seem to help.

Right now, open_shell does not receive the extra help that normal
run/sudo commands do. It may be possible to add it at some point, but
it's not a priority right now.

One potential workaround, depending on your remote server's sudo
configuration, is to simply preface your call to open_shell with a
no-op sudo() call, e.g. sudo("true") or similar. This would cache your
sudo password remotely and thus might let you call sudo within
open_shell without another sudo prompt popping up.

Again, this will only work if your server's sudo config is set to
cache for a few minutes. However that's a common default so it may
work :)

Hope that helps,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]