Permalink
Browse files

Merge pull request #237 from aia/rhel-sudoers

Use sudoers.d instead of sudoers
  • Loading branch information...
jedi4ever committed Feb 16, 2012
2 parents 5325304 + ee45b51 commit 1c5c9e0072f6cf3555181030c1a7df5aa75c1f6e
@@ -49,4 +49,5 @@ facter
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
-echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
+chmod 0440 /etc/sudoers.d/vagrant
@@ -44,4 +44,5 @@ sqlite-devel
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
-echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
+chmod 0440 /etc/sudoers.d/vagrant
@@ -34,4 +34,5 @@ bzip2
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
-echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
+chmod 0440 /etc/sudoers.d/vagrant
@@ -49,4 +49,6 @@ facter
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
-echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
+chmod 0440 /etc/sudoers.d/vagrant
+
@@ -44,4 +44,5 @@ sqlite-devel
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
-echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
+chmod 0440 /etc/sudoers.d/vagrant
@@ -42,4 +42,6 @@ wget
/usr/sbin/groupadd veewee
/usr/sbin/useradd veewee -g veewee -G wheel
echo "veewee"|passwd --stdin veewee
-echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
+chmod 0440 /etc/sudoers.d/veewee
+
@@ -41,4 +41,6 @@ sqlite-devel
/usr/sbin/groupadd veewee
/usr/sbin/useradd veewee -g veewee -G wheel
echo "veewee"|passwd --stdin veewee
-echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
+chmod 0440 /etc/sudoers.d/veewee
+
@@ -34,5 +34,6 @@ bzip2
/usr/sbin/groupadd veewee
/usr/sbin/useradd veewee -g veewee -G wheel
echo "veewee"|passwd --stdin veewee
-echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
+chmod 0440 /etc/sudoers.d/veewee
@@ -41,4 +41,6 @@ sqlite-devel
/usr/sbin/groupadd veewee
/usr/sbin/useradd veewee -g veewee -G wheel
echo "veewee"|passwd --stdin veewee
-echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
+chmod 0440 /etc/sudoers.d/veewee
+

0 comments on commit 1c5c9e0

Please sign in to comment.