From 3f9c6749c1ae4847ca14da6a1eb02e21440445be Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 10 May 2019 19:48:50 -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 34bc2ab..7f3fcd8 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 8118301..0830243 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 1f32fd8..ee2db3d 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