diff --git a/boxes/build-debian-box.sh b/boxes/build-debian-box.sh index d1f7c25..d020891 100755 --- a/boxes/build-debian-box.sh +++ b/boxes/build-debian-box.sh @@ -98,7 +98,7 @@ chroot ${ROOTFS} apt-get install sudo -y --force-yes chroot ${ROOTFS} adduser vagrant sudo # Enable passwordless sudo for users under the "sudo" group -echo "vagrant ALL=NOPASSWD:ALL" > ${ROOTFS}/etc/sudoers.d/vagrant +echo "vagrant ALL=(ALL) NOPASSWD:ALL" > ${ROOTFS}/etc/sudoers.d/vagrant chmod 0440 ${ROOTFS}/etc/sudoers.d/vagrant diff --git a/boxes/build-ubuntu-box.sh b/boxes/build-ubuntu-box.sh index 73001b9..5ffa27e 100755 --- a/boxes/build-ubuntu-box.sh +++ b/boxes/build-ubuntu-box.sh @@ -81,7 +81,7 @@ echo $VAGRANT_KEY > ${ROOTFS}/home/vagrant/.ssh/authorized_keys chroot ${ROOTFS} chown -R vagrant: /home/vagrant/.ssh # Enable passwordless sudo for users under the "sudo" group -echo "vagrant ALL=NOPASSWD:ALL" > ${ROOTFS}/etc/sudoers.d/vagrant +echo "vagrant ALL=(ALL) NOPASSWD:ALL" > ${ROOTFS}/etc/sudoers.d/vagrant chmod 0440 ${ROOTFS}/etc/sudoers.d/vagrant