do not give root a random password if login is already disabled by default

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2026-08-25 13:00:24 +02:00
committed by Simon L.
parent a95737744c
commit fee4903fef
6 changed files with 4 additions and 31 deletions
+1 -5
View File
@@ -31,7 +31,6 @@ RUN set -ex; \
supervisor \
tzdata \
ca-certificates \
openssl \
bind-tools \
netcat-openbsd; \
\
@@ -91,10 +90,7 @@ RUN set -ex; \
mkdir -p /usr/local/apache2/logs; \
chmod 777 -R /home/www-data; \
chmod 777 -R /usr/local/apache2/logs; \
rm -rf /usr/local/apache2/cgi-bin/; \
\
echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk --no-cache del openssl
rm -rf /usr/local/apache2/cgi-bin/
USER www-data:www-data
+1 -6
View File
@@ -11,12 +11,7 @@ RUN set -ex; \
ca-certificates \
netcat-openbsd \
tzdata \
bash \
openssl; \
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk del --no-cache \
openssl; \
bash; \
delgroup www-data; \
addgroup -g 33 -S www-data; \
adduser -u 33 -S -D -G www-data -H -s /sbin/nologin www-data;
-5
View File
@@ -13,7 +13,6 @@ RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache \
bash \
openssl \
shadow \
netcat-openbsd \
grep; \
@@ -35,10 +34,6 @@ RUN set -ex; \
mkdir /mnt/data; \
chown postgres:postgres /mnt/data; \
\
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk --no-cache del openssl; \
\
# Get rid of unused binaries
rm -f /usr/local/bin/gosu /usr/local/bin/su-exec;
+1 -8
View File
@@ -7,14 +7,7 @@ COPY --chmod=775 start.sh /start.sh
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache openssl bash; \
\
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk --no-cache del openssl; \
\
# Get rid of unused binaries
rm -f /usr/local/bin/gosu;
apk add --no-cache bash
COPY --chmod=775 healthcheck.sh /healthcheck.sh
+1 -4
View File
@@ -32,7 +32,6 @@ RUN set -ex; \
wget \
shadow \
pulseaudio \
openssl \
build-base \
linux-headers \
geckodriver; \
@@ -40,8 +39,7 @@ RUN set -ex; \
apk add --no-cache intel-media-driver; \
fi; \
useradd -d /tmp --system recording -u 122; \
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
\
git clone --recursive https://github.com/nextcloud/nextcloud-talk-recording --depth=1 --single-branch --branch "$RECORDING_VERSION" /src; \
python3 -m pip install --no-cache-dir /src; \
rm -rf /src; \
@@ -55,7 +53,6 @@ RUN set -ex; \
git \
wget \
shadow \
openssl \
build-base \
linux-headers;
-3
View File
@@ -78,9 +78,6 @@ RUN set -ex; \
apk del --no-cache \
shadow; \
\
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
\
touch \
/etc/nats.conf \
/etc/eturnal.yml; \