blob: ff23fc51eb72195e1f1db441cb101e6ff2a70176 [file] [log] [blame]
Carmelo Casconed6615072017-12-15 00:53:43 -08001#!/bin/bash
2set -xe
3
4# Create user sdn
5useradd -m -d /home/sdn -s /bin/bash sdn
6echo "sdn:rocks" | chpasswd
7echo "sdn ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99_sdn
8chmod 440 /etc/sudoers.d/99_sdn
9usermod -aG vboxsf sdn
Carmelo Casconef11513d2018-01-16 00:31:14 -080010update-locale LC_ALL="en_US.UTF-8"
Carmelo Casconed6615072017-12-15 00:53:43 -080011
12# Java 8
13apt-get install software-properties-common -y
14add-apt-repository ppa:webupd8team/java -y
15apt-get update
16echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
17
18apt-get -y install \
19 oracle-java8-installer oracle-java8-set-default \
20 zip unzip \
Carmelo Casconef11513d2018-01-16 00:31:14 -080021 bridge-utils \
22 avahi-daemon \
23 htop \
24 valgrind \
25 git-review
Carmelo Casconed6615072017-12-15 00:53:43 -080026
27tee -a /etc/ssh/sshd_config <<EOF
28
29UseDNS no
30EOF
31
32su sdn <<'EOF'
33cd /home/sdn
34bash /vagrant/user-bootstrap.sh
35EOF