From dd93be8b948d490761bc098b606024e51f24bf7b Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 19 Nov 2023 23:47:11 +0300 Subject: [PATCH] fix --- alt-server-v-10/setup.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/alt-server-v-10/setup.sh b/alt-server-v-10/setup.sh index fa3761a..ad77381 100644 --- a/alt-server-v-10/setup.sh +++ b/alt-server-v-10/setup.sh @@ -1,13 +1,11 @@ #!/bin/bash -e -a= . install2-init-functions - # add vagrant's public key - user can ssh without password -run_chroot mkdir -pm 700 /home/vagrant/.ssh -run_chroot curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -run_chroot chmod 0600 /home/vagrant/.ssh/authorized_keys -run_chroot chown -R vagrant:vagrant /home/vagrant/.ssh +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) -run_chroot echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant -run_chroot chmod 0440 /etc/sudoers.d/vagrant \ No newline at end of file +echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant +chmod 0440 /etc/sudoers.d/vagrant \ No newline at end of file