b503ad5cdc9b0d3bfb8a67aa3f42a6257895ee37
[leap_vagrant.git] / wheezy / vagrant.sh
1 # Set up Vagrant.
2
3 date > /etc/vagrant_box_build_time
4
5 # Create the user vagrant with password vagrant
6 useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant
7
8 # Install vagrant keys
9 mkdir -pm 700 /home/vagrant/.ssh
10 curl -Lo /home/vagrant/.ssh/authorized_keys \
11   'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub'
12 chmod 0600 /home/vagrant/.ssh/authorized_keys
13 chown -R vagrant:vagrant /home/vagrant/.ssh
14
15 # Customize the message of the day
16 echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd
17
18