From ae2f5091ae1418739954ffca1ce063e8f80f234d Mon Sep 17 00:00:00 2001 From: Quickbed Date: Mon, 17 Nov 2025 10:38:24 +0000 Subject: [PATCH] Dockerfile aktualisiert --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ab8ab1..d74c9f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,26 +36,26 @@ RUN echo "crime3:CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv" | chpasswd RUN echo "crime4:crime4" | chpasswd RUN echo "crime5:crime5" | chpasswd +RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config +RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config + +# Level1 COPY /Level/Level1/Chat.txt /home/crime1/.Chats/Chat.txt RUN chown crime1:crime1 /home/crime1/.Chats/Chat.txt && chmod 600 /home/crime1/.Chats/Chat.txt +# Level2 COPY /Level/Level2/data.txt /home/crime2/data.txt RUN chown crime2:crime2 /home/crime2/data.txt && chmod 600 /home/crime2/data.txt - # Level5 COPY Level/Level5/systemd-hdtob.py /usr/local/bin/systemd-hdtob.py RUN chmod +x /usr/local/bin/systemd-hdtob.py -RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config -RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config - - +# motd RUN rm -fr /etc/update-motd.d/* RUN mkdir -p /guide - RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\e[37m✧\e[0m \e[31mEin unfreundliches Willkommen im Escape Room\e[0m \e[37m✧\e[0m\n" >> /guide/crime1.txt @@ -77,11 +77,9 @@ RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ RUN echo "crime2" > /guide/crime2.txt RUN echo 'if [ -f "/guide/$(whoami).txt" ]; then cat "/guide/$(whoami).txt"; fi' >> /etc/bash.bashrc -# Skript für Typanimation COPY guide/crime5/typewrite.sh /usr/local/bin/typewrite.sh RUN chmod +x /usr/local/bin/typewrite.sh -# Login-Hook für crime5 RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' >> /home/crime5/.bashrc \ && chown crime5:crime5 /home/crime5/.bashrc @@ -92,14 +90,12 @@ RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' > RUN echo 'export PS1="\u@$(hostname):\\$ "' >> /etc/profile - RUN rm -f /etc/legal RUN sed -i 's/^session\s\+optional\s\+pam_motd/#session optional pam_motd/' /etc/pam.d/sshd EXPOSE 22 - COPY start.sh /start.sh RUN chmod +x /start.sh CMD ["/start.sh"]