summaryrefslogtreecommitdiff
path: root/scripts/debian_roll
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/debian_roll')
-rwxr-xr-xscripts/debian_roll13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/debian_roll b/scripts/debian_roll
index 56c5e5b..041baf4 100755
--- a/scripts/debian_roll
+++ b/scripts/debian_roll
@@ -3,7 +3,8 @@ set -e
NAME=$1
USER=tom
-PASS=durr
+PASS=tom
+ROOT_PASS=root
# init
lxc-create -n $NAME -t download -- --dist debian --release buster --arch amd64
@@ -12,11 +13,13 @@ lxc-start -n $NAME
sleep 15
# install basics
-lxc-attach -n $NAME -- apt update
-lxc-attach -n $NAME -- apt dist-upgrade
-lxc-attach -n $NAME -- apt install -y sudo openssh-server x11-xserver-utils
+lxc-attach -n $NAME -- apt-get update
+lxc-attach -n $NAME -- apt-get dist-upgrade
+lxc-attach -n $NAME -- apt-get install -y apt-utils
+lxc-attach -n $NAME -- apt-get install -y sudo openssh-server x11-xserver-utils
-# setup user
+# setup users
+lxc-attach -n $NAME -- bash -c 'echo -e "'$ROOT_PASS'\n'$ROOT_PASS'" | passwd'
lxc-attach -n $NAME -- adduser $USER --gecos "" --disabled-password
lxc-attach -n $NAME -- bash -c 'echo -e "'$PASS'\n'$PASS'" | passwd $USER'