]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debian/cephadm.postinst: specify --home when adduser
authorKefu Chai <tchaikov@gmail.com>
Wed, 17 Jan 2024 15:47:39 +0000 (23:47 +0800)
committerMatthew Vernon <mvernon@wikimedia.org>
Thu, 22 Feb 2024 10:06:29 +0000 (10:06 +0000)
quote from adduser/NEWS.Debian.gz:

>  System user home defaults to /nonexistent if --home is not specified.
>  Packages that call adduser to create system accounts should explicitly
>  specify a location for /home (see Lintian check
>  maintainer-script-lacks-home-in-adduser).

so let's follow this change in adduser. otherwise "cephadm"
would have a $HOME at `/nonexistent`.

Fixes: https://tracker.ceph.com/issues/64069
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 90bc0369243077c2aaf67f0de2bab5810b217f4e)

debian/cephadm.postinst

index 090677ad992eea3db4d503d68700c5d209feeeff..eaa574cbb634a24897b025ed836d39a9097565fc 100644 (file)
@@ -28,6 +28,7 @@ case "$1" in
          adduser --quiet \
                  --system \
                  --disabled-password \
+                 --home /home/cephadm \
                  --gecos 'cephadm user for mgr/cephadm' \
                  --shell /bin/bash cephadm 2>/dev/null || true
          echo "..done"