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: Mohamed Lrhazi
Subject: Re: [Fab-user] open_shell as root?
Date: Thu, 28 Apr 2011 17:50:32 -0400

Excellent idea.. Thanks so much.

Jeff,
I 've been writing my own little script on top of fabric, to fit our
own internal needs... was thinking about sharing it on github or
similar. do you think there would be some interest in such thing?
Was hoping maybe I'd get some help from people improving it? Never
shared anything, that's why am asking :)

Thanks.
Mohamed.


On Thu, Apr 28, 2011 at 1:25 PM, Jeff Forcier <address@hidden> wrote:
> 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]