]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
deb/cephadm: add explicit --home for cephadm user
authorCasey Bodley <cbodley@redhat.com>
Fri, 11 Jul 2025 14:48:47 +0000 (10:48 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 21 Jul 2025 13:13:41 +0000 (09:13 -0400)
commit73ff5c677c7aaaeec44488afa946f89100e89ac2
tree598247e12927e17099cefacc56c6d54aef274b00
parented92bef1d3dfea92fa3d60269a02620bef0753c4
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 <cbodley@redhat.com>
(cherry picked from commit 6fddc83e266abcf32577d82be0fc172e2d0bf782)
debian/cephadm.postinst