-
Notifications
You must be signed in to change notification settings - Fork 133
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
execute[update-pam] resource fails on Ubuntu 14.04 on Azure #237
Comments
@sean-nixon thanks for raising this issue. Are you able to reproduce this issue? |
@artem-sidorenko I am. I just created a new Ubuntu 14.04 node in Azure and am seeing the same error. If I run chef-client directly, it works fine, however. I believe it's an environment issue with the Azure Chef extension. It's creating a crontab entry and not setting the path to include /usr/sbin. Any possibility of updating the recipe to use an absolute path? |
@sean-nixon I saw already similar issues in some other areas with cloud images :( Before we discuss the option to add the full path within this cookbook, is there any option to inform the developers of Azure Chef extension about that issue? It should fail with lots of other cookbooks too, so I would like to see this issue ideally be fixed properly in the area, where it's also located... |
I've raised an issue with them. so we can see what they say. Would it not be more secure, though, to invoke the command using the full path and not rely on it being in the path? I'm not sure if there's complexity regarding different paths on different distros/versions. |
@sean-nixon it should be fine as I had a look to the issue: the /usr/ I think it's not a problem to add |
On Debian-based distros, pam-auth-update is located at /usr/sbin/pam-auth-update. However, when running chef-client as a cron job, /usr/sbin may not be available on the path, resulting in an error. This affects nodes using the Azure Chef extension, among others. Addresses Issue dev-sec#237
On Debian-based distros, pam-auth-update is located at /usr/sbin/pam-auth-update. However, when running chef-client as a cron job, /usr/sbin may not be available on the path, resulting in an error. This affects nodes using the Azure Chef extension, among others. Addresses Issue dev-sec#237 Signed-off-by: Sean Nixon <[email protected]>
I took the liberty to submit a pull request with the suggested fix pending Chris's feedback. |
Describe the bug
update-pam
resource fails on Ubuntu 14.04.5 running on Azure with errorErrno::ENOENT: No such file or directory - pam-auth-update
. I am able to run this command locally and the error no longer occurs on the next run. However, it reappears again later. Oddly enough, I've not seen this error when running in Test Kitchen (neither on Azure nor using the bento Vagrant image for Ubuntu 14.04)Expected behavior
The recipe will run successfully.
Actual behavior
Example code
OS / Environment
Ubuntu 14.04.5 LTS Azure Latest Image
Chef Version
Cookbook Version
Additional context
None but will happily provide any additional information needed.
The text was updated successfully, but these errors were encountered: