From 756aadd0cbd04b4a593268f8afc456c4a1b60b91 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Mon, 20 Jan 2025 13:07:56 +0000 Subject: [PATCH] Remove ubuntu user to replace with crafty user Needing to as shipped user in sudoers, creating dummy mail to save on error/warn in build --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8c16e3a3..0bf6b890 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,12 @@ ENV DEBIAN_FRONTEND="noninteractive" # Security Patch for CVE-2021-44228 ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true +# Remove shipped sudoer user (Required for Ubuntu 24.04 base) MR !826 # Create non-root user & required dirs -RUN useradd -g root -M crafty \ +RUN touch /var/mail/ubuntu \ + && chown ubuntu /var/mail/ubuntu \ + && userdel -r ubuntu \ + && useradd -g root -M crafty \ && mkdir /crafty \ && chown -R crafty:root /crafty