Skip to content

Instantly share code, notes, and snippets.

@ymek
Created October 31, 2013 23:46
Show Gist options
  • Select an option

  • Save ymek/7259032 to your computer and use it in GitHub Desktop.

Select an option

Save ymek/7259032 to your computer and use it in GitHub Desktop.
# Set up sudo
echo %vagrant ALL=NOPASSWD:ALL > /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
# Setup sudo to allow no-password sudo for "sudo"
usermod -a -G sudo vagrant
# Installing vagrant keys
mkdir /home/vagrant/.ssh
chmod 700 /home/vagrant/.ssh
cd /home/vagrant/.ssh
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
chmod 600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh
# Log build time
date > /etc/vagrant_box_build_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment