Skip to content

Commit 214757f

Browse files
lpancescukbsingh
authored andcommitted
vagrant: set sudoers permissions to 0440 (#142)
Fixes CentOS bug 15552.
1 parent a7db0cd commit 214757f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

vagrant/centos6.ks

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ mkswap /swapfile
7575
echo "/swapfile none swap defaults 0 0" >> /etc/fstab
7676
7777
# sudo
78-
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
78+
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
79+
chmod 0440 /etc/sudoers.d/vagrant
7980
8081
# Fix for https://github.com/CentOS/sig-cloud-instance-build/issues/38
8182
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF

vagrant/centos7.ks

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ mkswap /swapfile
8484
echo "/swapfile none swap defaults 0 0" >> /etc/fstab
8585
8686
# sudo
87-
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
87+
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
88+
chmod 0440 /etc/sudoers.d/vagrant
8889
8990
# Fix for https://github.com/CentOS/sig-cloud-instance-build/issues/38
9091
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF

0 commit comments

Comments
 (0)