Skip to content

[Packaging]: Use system-defined location for home directories#62507

Merged
dmick merged 2 commits intoceph:mainfrom
NVShawn:main
May 21, 2025
Merged

[Packaging]: Use system-defined location for home directories#62507
dmick merged 2 commits intoceph:mainfrom
NVShawn:main

Conversation

@NVShawn
Copy link
Contributor

@NVShawn NVShawn commented Mar 25, 2025

This patch removes the assumption that user home directories always live under /home. If the user has set home directories to live under a different directory by changing /etc/adduser.conf, this will honor that setting.

Signed-off-by: Shawn Edwards shedwards@nvidia.com

This patch removes the assumption that user home directories always live under /home. If the user has set home directories to live under a different directory by changing /etc/adduser.conf, this will honor that setting.

Signed-off-by: Shawn Edwards <shedwards@nvidia.com>
@ceph-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@NVShawn
Copy link
Contributor Author

NVShawn commented Mar 27, 2025 via email

@dmick
Copy link
Member

dmick commented Mar 27, 2025

It seems that the answer is that "true Bourne shell" just doesn't exist on many (any?) Linux distros; /bin/sh is usually a symlink to either dash or bash, which are both Posix-compliant and support tilde expansion.

@NVShawn
Copy link
Contributor Author

NVShawn commented Mar 31, 2025

True 'Bourne Shell' hasn't been maintained for some time. The license is hilariously discussed here: https://en.wikipedia.org/wiki/Talk:Bourne_shell#License (BYO flame-retardant undies)

The closest thing I can find to an 'original' Bourne shell is from Schily's tools. One can build a non-POSIX compliant shell (obosh) if one wants to. I know of no distribution or POSIX OS which would inflict this on their users.

@dmick
Copy link
Member

dmick commented May 3, 2025

I'm sorry to have let this sit for a while. One thing that concerns me is how many different places in the Ceph codebase we might have that are assuming /home; a quick grep finds an obvious one that should be included in this PR, in doc/cephadm/install.rst, but somewhat-surprisingly, not a lot else in src. So this is probably OK if you'll add an update to doc/.

Signed-off-by: Shawn Edwards <42198692+NVShawn@users.noreply.github.com>
@NVShawn NVShawn requested a review from a team as a code owner May 5, 2025 15:40
@NVShawn
Copy link
Contributor Author

NVShawn commented May 20, 2025

Please let me know if there is anything further you need from me on this pull request. Thanks!

@dmick dmick self-requested a review May 21, 2025 01:19
Copy link
Member

@dmick dmick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@dmick dmick merged commit d9c429f into ceph:main May 21, 2025
12 checks passed
@cbodley
Copy link
Contributor

cbodley commented Jul 11, 2025

@NVShawn this pr seems to be causing package installation errors against ubuntu 24.04, tracked in https://tracker.ceph.com/issues/72083. there, adduser without --home ends up pointing to /nonexistent so cephadm.postinst fails with:

mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory

from https://manpages.ubuntu.com/manpages/noble/man8/adduser.8.html:

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.

can you help me find a better solution than #64459 which just adds back --home /home/cephadm?

@NVShawn
Copy link
Contributor Author

NVShawn commented Jul 14, 2025

Use /var/lib/cephadm for the home directory. /var should be locally writable on all hosts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants