Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -xe |
| 3 | |
| 4 | # Create user sdn |
| 5 | useradd -m -d /home/sdn -s /bin/bash sdn |
| 6 | echo "sdn:rocks" | chpasswd |
| 7 | echo "sdn ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99_sdn |
| 8 | chmod 440 /etc/sudoers.d/99_sdn |
| 9 | usermod -aG vboxsf sdn |
| 10 | |
| 11 | # Java 8 |
| 12 | apt-get install software-properties-common -y |
| 13 | add-apt-repository ppa:webupd8team/java -y |
| 14 | apt-get update |
| 15 | echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections |
| 16 | |
| 17 | apt-get -y install \ |
| 18 | oracle-java8-installer oracle-java8-set-default \ |
| 19 | zip unzip \ |
| 20 | bridge-utils |
| 21 | |
| 22 | tee -a /etc/ssh/sshd_config <<EOF |
| 23 | |
| 24 | UseDNS no |
| 25 | EOF |
| 26 | |
| 27 | su sdn <<'EOF' |
| 28 | cd /home/sdn |
| 29 | bash /vagrant/user-bootstrap.sh |
| 30 | EOF |