From 90584f0b30da5459fc48bc1168c3db79cc6ef7d8 Mon Sep 17 00:00:00 2001 From: librelad Date: Sat, 23 May 2026 21:23:12 +0100 Subject: [PATCH] fix(rootless): actually create the docker install user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit useradd was missing its login-name argument (and -m), so it failed — silently, because local result=$(...) swallowed the exit code and checkSuccess reported success. The rootless install user was therefore never created, which cascaded into 'invalid user dockerinstall' and a daemon that never came up. Pass the username + -m (subordinate uid/gid ranges come from login.defs), unmasked. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/docker/install/rootless/rootless_user.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/docker/install/rootless/rootless_user.sh b/scripts/docker/install/rootless/rootless_user.sh index 7eeb5f1..b5b4de8 100755 --- a/scripts/docker/install/rootless/rootless_user.sh +++ b/scripts/docker/install/rootless/rootless_user.sh @@ -6,8 +6,13 @@ installDockerRootlessUser() if id "$CFG_DOCKER_INSTALL_USER" &>/dev/null; then isSuccessful "User $CFG_DOCKER_INSTALL_USER already exists." else - # If the user doesn't exist, create the user - local result=$(sudo useradd -s /bin/bash -d "/home/$CFG_DOCKER_INSTALL_USER") + # Create the rootless docker user. The login name (last arg) was + # missing, so useradd failed silently — masked by local result=$(...) + # — and the user never existed, breaking the whole rootless setup. + # -m makes its home; with SUB_UID/GID configured in login.defs, + # useradd also assigns its subordinate uid/gid ranges (needed for + # rootless). Run unmasked so checkSuccess sees real failures. + sudo useradd -m -s /bin/bash -d "/home/$CFG_DOCKER_INSTALL_USER" "$CFG_DOCKER_INSTALL_USER" checkSuccess "Creating $CFG_DOCKER_INSTALL_USER User." updateDockerInstallPassword; fi