fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Changing user with sudo and running commands as new user


From: Jeff Forcier
Subject: Re: [Fab-user] Changing user with sudo and running commands as new user
Date: Mon, 22 Oct 2012 10:43:08 -0700

Hi all,

Rahul has it:

On Mon, Oct 22, 2012 at 8:31 AM, Rahul Menon <address@hidden> wrote:

> And so on, as i dont believe session info persists across each 'run' call.

This is actually in the FAQ:

    
http://docs.fabfile.org/en/1.4.3/faq.html#my-cd-workon-export-etc-calls-don-t-seem-to-work

Also as Rahul mentions, one way to solve this is to find one-off
invocations like su <username> -c 'command here' (or the myriad other
possibilities available via sudo or su or combining the two --
depending on your environment.)

It's unfortunate that tasks done by hand don't always translate into
an easy script, but that's the nature of trying to do things
programmatically. Unix is flexible, though -- there are almost always
workarounds.

Best,
Jeff

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



reply via email to

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