mirror of
https://github.com/Maks1mS/alt-linux-vagrant-boxes.git
synced 2024-12-24 20:14:38 +03:00
11 lines
478 B
Bash
11 lines
478 B
Bash
#!/bin/bash -e
|
|
|
|
# add vagrant's public key - user can ssh without password
|
|
mkdir -pm 700 /home/vagrant/.ssh
|
|
curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
|
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
|
chown -R vagrant:vagrant /home/vagrant/.ssh
|
|
|
|
# give sudo access (grants all permissions to user vagrant)
|
|
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
|
|
chmod 0440 /etc/sudoers.d/vagrant |