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 2cb099d7a3)
This commit is contained in:
Thomas Mueller 2017-02-03 16:47:57 +01:00
parent e11de770d0
commit ee920bfa1f
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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