Skip to content

Commit 5fdd748

Browse files
committed
Merge pull request boxcutter#45 from bountin/master
Using sudoers.d/vagrant instead of direct sudoers file
2 parents aea5dcd + bc3d1df commit 5fdd748

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/vagrant.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ if [ "$INSTALL_VAGRANT_KEY" = "true" ] || [ "$INSTALL_VAGRANT_KEY" = "1" ]; then
2020

2121
# Set up sudo
2222
echo "==> Giving ${SSH_USER} sudo powers"
23-
echo "${SSH_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
23+
echo "${SSH_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
24+
chmod 440 /etc/sudoers.d/vagrant
2425

2526
# Fix stdin not being a tty
2627
if grep -q -E "^mesg n$" /root/.profile && sed -i "s/^mesg n$/tty -s \\&\\& mesg n/g" /root/.profile; then

0 commit comments

Comments
 (0)