From c6d9439c13bf0337ade564cb457044e05661ec79 Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 9 Dec 2021 12:21:17 +0200 Subject: [PATCH] ipterm --- install/usr/share/swarmlab.io/sec/swarmlab-sec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index ec6c4a7..1b68334 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -153,15 +153,20 @@ if [ -d "$Wdir/project" ]; then COPY ssh/ \${SSHDIR}/ RUN export DEBIAN_FRONTEND=noninteractive \ + && useradd -ms /bin/bash docker \ && rm -rf /usr/share/doc \ && rm -rf /usr/share/man \ && rm -rf /usr/share/locale \ && mkdir -p /var/run/sshd \ - && echo 'root:$ROOT_PASSWORD' | chpasswd \ + && echo 'root:pass' | chpasswd \ && echo "export VISIBLE=now" >> /etc/profile \ && mkdir -p /home/docker/project \ && mkdir -p /etc/opt \ && echo "docker:docker" | chpasswd \ + && echo "StrictHostKeyChecking no" > \${SSHDIR}/config \ + && cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \ + && chmod -R 600 \${SSHDIR}/* \ + && chown -R \${USER1}:\${USER1} \${SSHDIR} COPY .vimrc /home/docker USER root @@ -230,12 +235,17 @@ if [ "$Wdir" == "$HOME" ]; then && rm -rf /usr/share/doc \ && rm -rf /usr/share/man \ && rm -rf /usr/share/locale \ + && useradd -ms /bin/bash docker \ && mkdir -p /var/run/sshd \ - && echo 'root:$ROOT_PASSWORD' | chpasswd \ + && echo 'root:pass' | chpasswd \ && echo "export VISIBLE=now" >> /etc/profile \ && mkdir -p /home/docker/project \ && mkdir -p /etc/opt \ && echo "docker:docker" | chpasswd \ + && echo "StrictHostKeyChecking no" > \${SSHDIR}/config \ + && cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \ + && chmod -R 600 \${SSHDIR}/* \ + && chown -R \${USER1}:\${USER1} \${SSHDIR} COPY .vimrc /home/docker USER root