Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris Sudo Not Always In /usr/bin/sudo #1265

Closed
sean-horn opened this issue Oct 31, 2016 · 1 comment
Closed

Solaris Sudo Not Always In /usr/bin/sudo #1265

sean-horn opened this issue Oct 31, 2016 · 1 comment

Comments

@sean-horn
Copy link
Contributor

Description

The InSpec executable expects that sudo will be found in /usr/bin/sudo, however, some older Solaris installs install it after the fact in /usr/local/bin/sudo.

InSpec and Platform Version

  • Inspec Version:
  • Solaris Version: Any modern supportable Solaris with a non-bundled install of sudo

Replication Case

  1. Run InSpec against Solaris system with --sudo option
  2. If the sudo executable is not found in /usr/bin/sudo or elsewhere in the PATH available when the Inspec command connects, the run will fail.

Possible Solutions

You can use the sudo_command option like this to workaround --sudo_command PATH=$PATH:/usr/local/bin sudo

Stacktrace

/opt/chef-compliance/embedded/bin/inspec exec test.rb --key-files /root/dev/dev-lxc.pem -t ssh://dev-lxc@solaris-compliance1.lxc --sudo

Sudo failed: Can't find sudo command. Please either install and configure it on the target or deactivate sudo.
@sean-horn
Copy link
Contributor Author

Discussed with the developers. It's best to handle this one of two ways

  • Fix the path on the Solaris side
  • Use the --sudo_command option workaround to point at the desired sudo command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant