-
Notifications
You must be signed in to change notification settings - Fork 21
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
PATH in chef-client environment missing /usr/sbin and breaking downstream cookbook #268
Comments
@sean-nixon Sorry for late reply we will look at this soon and update you on this. Thank you for reporting. |
Hi @sean-nixon, I've tried to reproduce this issue on In order to verify created machines ( Ubuntu16 and Ubuntu14) from Azure Portal and pinned Added your cookbook in the run list Machine has
From chef-client-on-ubu-14.04.log Please check and let us know if there is anything. Thanks, |
Just an update : It seems issue was not reproduced earlier because I've used the latest cookbook Thanks |
Thanks for reviewing this @dheerajd-msys. Yeah, I submitted a patch to that cookbook in the meantime to invoke the command with the full path. There are probably a decent amount of other cookbooks that this could affect, so I think it could still be worthwhile to make the PATH configurable for the extension |
The DevSec os-hardening cookbook relies on
pam-auth-update
being in the PATH for Ubuntu nodes. The crontab generated by this extension uses the default PATH which to my knowledge only includes/bin:/usr/bin
and not/usr/sbin
wherepam-auth-update
resides. This is causing the downstream cookbook to fail withErrno::ENOENT: No such file or directory - pam-auth-update
I've validated that updating the crontab line to the following fixes the client run.
/bin/sleep 0; PATH=$PATH:/usr/sbin; chef-client -c /etc/chef/client.rb...
Is it possible to add the /usr/sbin to the path of the client in the crontab as part of the installation? Or else make the PATH configurable?
The text was updated successfully, but these errors were encountered: