-
Notifications
You must be signed in to change notification settings - Fork 163
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
visudo missing from PATH during cron runs #116
Comments
You can fix this by setting this attribute: |
@gdurand Thanks, but shouldn't |
Perhaps, but that probably could interfer with other settings. But I think it should at least be documented. And perhaps even more in the sudo cookbook since it uses a relative path for visudo. |
Added a new `visudo_path` attribute to the sudo resource to allow users to specify the installed path of visudo. In addition, the setting for the PATH environment variable on SLES and Solaris does not include the sbin path in which the visudo command is installed. This ensures the correct path value is inserted into the PATH environment variable automaticall before executing the command. Fixes #116
Added a new `visudo_path` attribute to the sudo resource to allow users to specify the installed path of visudo. In addition, the setting for the PATH environment variable on SLES and Solaris does not include the sbin path in which the visudo command is installed. This ensures the correct path value is inserted into the PATH environment variable automatically before executing the command. Fixes #116
Added a new `visudo_path` attribute to the sudo resource to allow users to specify the installed path of visudo. In addition, the setting for the PATH environment variable on SLES and Solaris does not include the sbin path in which the visudo command is installed. This ensures the correct path value is inserted into the PATH environment variable automatically before executing the command. Fixes #116
@szymonpk The linked PR will allow you to add |
Added a new `visudo_path` attribute to the sudo resource to allow users to specify the installed path of visudo. In addition, the setting for the PATH environment variable on SLES and Solaris does not include the sbin path in which the visudo command is installed. This ensures the correct path value is inserted into the PATH environment variable automatically before executing the command. Fixes #116 Signed-off-by: Ryan Hass <rhass@users.noreply.github.com>
I think it is separate from #103. I am just not sure if it should be fixed here or in chef-client cookbook.
visudo
is called directly. In my case it is not in the PATH (defaults for this AMI). Can we safely assume it is always/usr/sbin/visudo
?Cookbook version
3.5.3
Chef-client version
13.4.24
Platform Details
AWS AMI - ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170811 (ami-674cbc1e)
Scenario:
Trying to run sudo resource using chef running from cron.
Steps to Reproduce:
Expected Result:
Chef runs fine.
Actual Result:
The text was updated successfully, but these errors were encountered: