chef-os-hardening
chef-os-hardening copied to clipboard
pam-auth-update --package prompts interactive debconf
Describe the bug
include_recipe 'os-hardening'
pam-auth-update --package prompts for debconf during the chef-run and it fails
Expected behavior A clear and concise description of what you expected to happen.
Actual behavior
-
execute[update-pam] action run
================================================================================ Error executing action
run
on resource 'execute[update-pam]'Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '255' ---- Begin output of /usr/sbin/pam-auth-update --package ---- STDOUT: STDERR: Failed to open terminal.debconf: whiptail output the above errors, giving up! Use of uninitialized value $ret in scalar chomp at /usr/share/perl5/Debconf/Client/ConfModule.pm line 132, <STDIN> line 8. Use of uninitialized value $ret in split at /usr/share/perl5/Debconf/Client/ConfModule.pm line 133, <STDIN> line 8. Use of uninitialized value $ret[0] in string eq at /usr/share/perl5/Debconf/Client/ConfModule.pm line 134, <STDIN> line 8. ---- End output of /usr/sbin/pam-auth-update --package ---- Ran /usr/sbin/pam-auth-update --package returned 255
**OS / Environment**
Ubuntu 14.04
**Chef Version**
```paste below
12.12.15
Cookbook Version
3.2.1
Additional context using DEBIAN_FRONTEND=noninteractive works, just wondering thats the right solution. if thats true I will put a PR. This used to work before not sure why it would happen right now. Recently we ran a script to make a lot of directories non-writable, not sure if that should cause this.