blob: 3f1b8e656ce946a020bbc600566d51bec1d16862 [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
10
11# Java 8
12apt-get install software-properties-common -y
13add-apt-repository ppa:webupd8team/java -y
14apt-get update
15echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
16
17apt-get -y install \
18 oracle-java8-installer oracle-java8-set-default \
19 zip unzip \
20 bridge-utils
21
22tee -a /etc/ssh/sshd_config <<EOF
23
24UseDNS no
25EOF
26
27su sdn <<'EOF'
28cd /home/sdn
29bash /vagrant/user-bootstrap.sh
30EOF