You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
408 B
9 lines
408 B
#!/bin/sh -eux
|
|
|
|
# Only add the secure path line if it is not already present
|
|
grep -q 'secure_path' /etc/sudoers \
|
|
|| sed -i -e '/Defaults\s\+env_reset/a Defaults\tsecure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' /etc/sudoers;
|
|
|
|
# Set up password-less sudo for the vagrant user
|
|
echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_vagrant;
|
|
chmod 440 /etc/sudoers.d/99_vagrant;
|
|
|