summaryrefslogtreecommitdiff
path: root/lxc
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2020-02-13 09:22:11 -0600
committerTom Barrett <tom@tombarrett.xyz>2020-02-13 09:22:11 -0600
commit02001fd2dfe487d995498360b5813798ee00be86 (patch)
tree3c07cfb9189a7e9480610ee468bef50000eb0aa3 /lxc
parentd5fad7e84a1cc8146fb3250d4c1d4d18045f4c52 (diff)
good debian roll
Diffstat (limited to 'lxc')
-rwxr-xr-xlxc/debian_roll22
1 files changed, 6 insertions, 16 deletions
diff --git a/lxc/debian_roll b/lxc/debian_roll
index 474e990..7ea23c3 100755
--- a/lxc/debian_roll
+++ b/lxc/debian_roll
@@ -16,23 +16,13 @@ lxc-attach -n $NAME -- apt dist-upgrade
lxc-attach -n $NAME -- apt install -y sudo openssh-server x11-xserver-utils
# setup user
-#lxc-attach -n $NAME -- useradd $USER
-#lxc-attach -n $NAME -- mkdir /home/$USER
-#lxc-attach -n $NAME -- bash -c 'echo "'$USER' ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
-#lxc-attach -n $NAME -- bash -c 'echo -e "'$PASS'\n'$PASS'" | passwd $USER'
-
-# setup for yay
-#lxc-attach -n $NAME -- mkdir /home/$USER/yay
-#lxc-attach -n $NAME -- git clone https://aur.archlinux.org/yay-bin.git /home/$USER/yay
-#lxc-attach -n $NAME -- chown $USER:$USER -R /home/$USER
-#lxc-attach -n $NAME -- bash -c 'cd /home/'$USER'/yay && sudo -u '$USER' makepkg -si --noconfirm'
-#lxc-attach -n $NAME -- bash -c 'sudo -u '$USER' yay -Syu --noconfirm'
+lxc-attach -n $NAME -- adduser $USER --gecos "" --disabled-password
+lxc-attach -n $NAME -- bash -c 'echo -e "'$PASS'\n'$PASS'" | passwd $USER'
# setup x11 forwarding
-#lxc-attach -n $NAME -- bash -c 'echo "X11Forwarding yes" >> /etc/ssh/sshd_config'
-#lxc-attach -n $NAME -- bash -c 'echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config'
-#lxc-attach -n $NAME -- bash -c 'echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config'
-#lxc-attach -n $NAME -- systemctl start sshd
+lxc-attach -n $NAME -- bash -c 'echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config'
+lxc-attach -n $NAME -- bash -c 'echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config'
+lxc-attach -n $NAME -- systemctl restart sshd
# display info
-#lxc-info -n $NAME
+lxc-info -n $NAME