diff options
author | varac <varacanero@zeromail.org> | 2016-01-18 09:22:00 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-01-18 09:22:00 +0100 |
commit | b22872abee3a93e94a3a0d114461aa711b201284 (patch) | |
tree | c4eef655324d9418bf8d47b47b854ca178f199c5 /scripts | |
parent | 3874b8f9459e814a7bbca24f9694c136981da278 (diff) |
install vagrant key to root, dont pin version
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vagrant.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/vagrant.sh b/scripts/vagrant.sh index 694486b..1cb2659 100644 --- a/scripts/vagrant.sh +++ b/scripts/vagrant.sh @@ -6,10 +6,15 @@ date > /etc/vagrant_box_build_time # Installing vagrant keys -mkdir -pm 700 /home/vagrant/.ssh -wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys -chmod 0600 /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh +wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /tmp/vagrant.pub + +for user in vagrant root +do + mkdir -pm 700 /home/${user}/.ssh + chmod 0600 /home/${user}/.ssh/authorized_keys + cp /tmp/vagrant.pub /home/${user}/.ssh/authorized_keys + chown -R ${user} /home/${user}/.ssh +done # configure password-less sudo echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers |