fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] sudo() problems


From: Don Jackson
Subject: Re: [Fab-user] sudo() problems
Date: Tue, 18 Jan 2011 08:32:07 -0800

On Jan 18, 2011, at 2:20 AM, Michael Gliwinski wrote:

>> Demonstrates that running sudo directly from fabric doesn't work.
> 
> Fabric doesn't execute sudo through full login shell and it looks to me like 
> the /opt/csw/bin directory may be added to PATH by some ksh startup script 
> (which it doesn't execute when non-interactive/non-login).
> 
> To confirm run (not via Fabric):
> 
>    ssh queue.likestream.net 'which sudo'
> 
> If I'm right this will fail to find sudo as well.

You are correct!  It wasn't found.

> Fabric does allow customizing the location of sudo (sudo_prefix) but only in 
>> = 1.0a, I don't think there are any workarounds you can use in 0.9 apart 
>> from 
> run('sudo ...').

I see a couple of workarounds, either:
        (sym)link from /usr/bin/sudo to /opt/csw/bin/sudo
or
        Add /opt/csw/bin to the PATH environment variable in /etc/default/login

I am currently leaning towards the symlink solution, far fewer side-effects.  

Between puppet and fabric, it won't take long to change this on all my servers 
:-)

Thank you Michael for the help!

Don





reply via email to

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