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 |
Carmelo Cascone | f11513d | 2018-01-16 00:31:14 -0800 | [diff] [blame] | 10 | update-locale LC_ALL="en_US.UTF-8" |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 11 | |
| 12 | # Java 8 |
| 13 | apt-get install software-properties-common -y |
| 14 | add-apt-repository ppa:webupd8team/java -y |
| 15 | apt-get update |
| 16 | echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections |
| 17 | |
| 18 | apt-get -y install \ |
| 19 | oracle-java8-installer oracle-java8-set-default \ |
| 20 | zip unzip \ |
Carmelo Cascone | f11513d | 2018-01-16 00:31:14 -0800 | [diff] [blame] | 21 | bridge-utils \ |
| 22 | avahi-daemon \ |
| 23 | htop \ |
| 24 | valgrind \ |
| 25 | git-review |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 26 | |
| 27 | tee -a /etc/ssh/sshd_config <<EOF |
| 28 | |
| 29 | UseDNS no |
| 30 | EOF |
| 31 | |
| 32 | su sdn <<'EOF' |
| 33 | cd /home/sdn |
| 34 | bash /vagrant/user-bootstrap.sh |
| 35 | EOF |