summaryrefslogtreecommitdiff
path: root/scripts/vagrant.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vagrant.sh')
-rw-r--r--scripts/vagrant.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/vagrant.sh b/scripts/vagrant.sh
index 900fe9c..4e2a11b 100644
--- a/scripts/vagrant.sh
+++ b/scripts/vagrant.sh
@@ -6,12 +6,14 @@
date > /etc/vagrant_box_build_time
# Installing vagrant key for root
-mkdir -pm 700 /root/.ssh
-wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /root/.ssh/authorized_keys
+mkdir -m 0700 /root/.ssh
+chmod 0700 /root /root/.ssh
+wget --no-check-certificate 'https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /root/.ssh/authorized_keys
chmod 0600 /root/.ssh/authorized_keys
# Installing vagrant key for vagrant user
-cp -a /root/.ssh/ /home/vagrant/
+getent passwd vagrant || useradd -m vagrant -s /bin/bash
+cp -a /root/.ssh /home/vagrant/
chown -R vagrant:vagrant /home/vagrant/.ssh
# configure password-less sudo