fab-user
[Top][All Lists]
Advanced

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

[Fab-user] out: bash: sudo: command not found


From: Ruslan Valiyev
Subject: [Fab-user] out: bash: sudo: command not found
Date: Fri, 5 Jul 2013 12:37:18 +0200

Hey guys,

I'm having some hard time with several Solaris hosts. For some reason, my function is not able to find the sudo binary.

This is the function:

def task():
  set_users('ldap')
  run('echo $PATH')
  run('type sudo')
  sudo('id')

This is my output:

$ fab --show=debug task -H 10.200.8.160
Using fabfile '/root/fab/configs/fabfile.py'
Commands to run: task
Parallel tasks now using pool size of 1
[10.200.8.160] Executing task 'task'
[10.200.8.160] run: /bin/bash -l -c "echo \$PATH"
[10.200.8.160] out: /usr/bin:/bin:/usr/sbin:/usr/sfw/bin:/opt/sfw/bin:/usr/sfw/sbin:/sbin:/bin
[10.200.8.160] out: 

[10.200.8.160] run: /bin/bash -l -c "type sudo"
[10.200.8.160] out: sudo is /opt/sfw/bin/sudo
[10.200.8.160] out: 

[10.200.8.160] sudo: sudo -S -p 'sudo password:'  /bin/bash -l -c "id"
[10.200.8.160] out: bash: sudo: command not found
[10.200.8.160] out: 


Fatal error: sudo() received nonzero return code 127 while executing!

Requested: id
Executed: sudo -S -p 'sudo password:'  /bin/bash -l -c "id"

None


Aborting.
Disconnecting from 10.200.8.160... done.

I'm guessing there's an issue with $PATH somewhere, but I just ran two commands before invoking sudo and "type" found it.


Regards,
rv

reply via email to

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