It is installed and loaded in the path via .profile. The puzzling to me piece is why it's not in the path when I access the box via fabric (with shell=True).
user1 @ server1 [/export/home/user01]:> which sudo /usr/local/bin/sudo If I link /usr/local/bin/sudo to /usr/bin/sudo, it works fine. But I didn't want to do that on hundreds of servers just for fabric. On Wed, Mar 6, 2013 at 1:40 PM, Christopher Malek <[email protected]>wrote: > Is sudo installed on your Solaris box? When I used to do Solaris work, > sudo did not come with the OS. > > Chris > > On Mar 6, 2013, at 10:58 AM, Justin Palmer wrote: > > > Trying a simple test fabfile to run a sudo command on Solaris. Gives > the results below. The sudo path is set via .profile which I assume would > be read with shell=True. What am I missing? > > > > > > $ fab -V > > Fabric 1.6.0 > > Paramiko 1.10.0 > > > > > > > > $ cat fabfile.py > > > > #!/usr/bin/env python > > from fabric.api import local, env, run, sudo, put > > > > def test_sudo(): > > sudo(‘ls /root’, shell=True) > > > > > > > > $ fab -H server1 test_sudo > > [server1] Executing task 'test_sudo' > > [server1] sudo: ls /root > > [server1] Login password for 'user1': > > [server1] out: ksh: sudo: not found > > [server1] out: > > > > > > Fatal error: sudo() received nonzero return code 127 while executing! > > > > Requested: ls /root > > Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "ls /root" > > > > Aborting. > > Disconnecting from server1... done. > > > > > > > > > > > > > > _______________________________________________ > > Fab-user mailing list > > [email protected] > > https://lists.nongnu.org/mailman/listinfo/fab-user > > -- > [email protected] Office: (626) 395-3675 > > > > > > >
_______________________________________________ Fab-user mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fab-user
