From 7f74581b60c6a5e0dc3f9f0b83073df81c1a6ad9 Mon Sep 17 00:00:00 2001 From: Kevin Pease Date: Tue, 26 Jun 2018 10:52:41 -0400 Subject: [PATCH] Set correct permissions on /etc/sudoers.d/vagrant 'visudo -c' reports that /etc/sudoers.d/vagrant should have its mode set to 0440, but it is set to 0644. --- centos/http/6/ks.cfg | 1 + centos/http/7/ks.cfg | 1 + 2 files changed, 2 insertions(+) diff --git a/centos/http/6/ks.cfg b/centos/http/6/ks.cfg index f39b0e123..931bea276 100644 --- a/centos/http/6/ks.cfg +++ b/centos/http/6/ks.cfg @@ -69,6 +69,7 @@ virt-what sed -i -e 's/\(^SELINUX=\).*$/\1permissive/' /etc/selinux/config # sudo echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant +chmod 0440 /etc/sudoers.d/vagrant #Enable hyper-v daemons only if using hyper-v virtualization if [ $(virt-what) == "hyperv" ]; then diff --git a/centos/http/7/ks.cfg b/centos/http/7/ks.cfg index 2b32f982d..c8cef2a43 100644 --- a/centos/http/7/ks.cfg +++ b/centos/http/7/ks.cfg @@ -64,6 +64,7 @@ deltarpm %post # sudo echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant +chmod 0440 /etc/sudoers.d/vagrant #Enable hyper-v daemons only if using hyper-v virtualization if [ $(virt-what) == "hyperv" ]; then