From 6fddc83e266abcf32577d82be0fc172e2d0bf782 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 11 Jul 2025 10:48:47 -0400 Subject: [PATCH] deb/cephadm: add explicit --home for cephadm user cephadm.postinst fails on ubuntu 24.04, because the cephadm user it creates ends up with a `/nonexistent` home directory: > mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory on ubuntu 22.04, this user's home directory is `/home/cephadm` the `adduser` man page for 24.04 includes this new text: > If no home directory is specified, the default home directory for a new system user is /nonexistent. This directory should never exist on any Debian system, and adduser will never create it automatically. commit 90bc0369243077c2aaf67f0de2bab5810b217f4e had previously added `--home /home/cephadm`, but that was later removed by commit c5a316cfd5e993ad5accd12ed101dc33ff671163 to support non-default home directories. the latter commit's author recommends use of `--home /var/lib/cephadm` instead Fixes: https://tracker.ceph.com/issues/72083 Signed-off-by: Casey Bodley --- debian/cephadm.postinst | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/cephadm.postinst b/debian/cephadm.postinst index 87a0d81e22c06..b586ee7183d77 100644 --- a/debian/cephadm.postinst +++ b/debian/cephadm.postinst @@ -28,6 +28,7 @@ case "$1" in adduser --quiet \ --system \ --disabled-password \ + --home /var/lib/cephadm \ --shell /bin/bash cephadm 2>/dev/null || true usermod --comment "cephadm user for mgr/cephadm" cephadm echo "..done" -- 2.39.5