From ee920bfa1f0008dee3f80cff307ae4c2dae9e946 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Fri, 3 Feb 2017 16:47:57 +0100 Subject: [PATCH] Allow vagrant user to sudo to all users This addresses atomic-wg issue 173. Also vagrant docs https://www.vagrantup.com/docs/boxes/base.html tell to configure it like this. (cherry picked from commit 2cb099d7a3c36f9ee0d9d99221c87e4bc3d7dbb5) --- fedora-atomic-vagrant.ks | 2 +- fedora-cloud-base-vagrant.ks | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fedora-atomic-vagrant.ks b/fedora-atomic-vagrant.ks index 822311a..0998028 100644 --- a/fedora-atomic-vagrant.ks +++ b/fedora-atomic-vagrant.ks @@ -23,7 +23,7 @@ systemctl mask cloud-init cloud-init-local cloud-config cloud-final # Vagrant setup sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers -echo 'vagrant ALL=NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd +echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config mkdir -m 0700 -p ~vagrant/.ssh cat > ~vagrant/.ssh/authorized_keys << EOKEYS diff --git a/fedora-cloud-base-vagrant.ks b/fedora-cloud-base-vagrant.ks index d179d91..72e30e7 100644 --- a/fedora-cloud-base-vagrant.ks +++ b/fedora-cloud-base-vagrant.ks @@ -42,7 +42,7 @@ systemctl mask cloud-init cloud-init-local cloud-config cloud-final # Vagrant setup sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers -echo 'vagrant ALL=NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd +echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config mkdir -m 0700 -p ~vagrant/.ssh cat > ~vagrant/.ssh/authorized_keys << EOKEYS