From 2f71fc2705c79370c11b6c8474ca37faa0079a2e Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 10 May 2019 19:49:54 -0700 Subject: [PATCH] remove root login to disable passwordless su from abc --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- Dockerfile.armhf | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d4daf74..0e97349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,8 @@ RUN \ mkdir /root-out && \ tar xf \ /rootfs.tar.xz -C \ - /root-out + /root-out && \ + sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow # Runtime stage FROM scratch diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1e5704e..f78977c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -31,7 +31,8 @@ RUN \ mkdir /root-out && \ tar xf \ /rootfs.tar.xz -C \ - /root-out + /root-out && \ + sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow # Runtime stage FROM scratch diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 139410f..5070ba6 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -31,7 +31,8 @@ RUN \ mkdir /root-out && \ tar xf \ /rootfs.tar.xz -C \ - /root-out + /root-out && \ + sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow # Runtime stage FROM scratch