Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create parent directories for <user> home #2493

Open
ampresent opened this issue Feb 29, 2024 · 1 comment
Open

Create parent directories for <user> home #2493

ampresent opened this issue Feb 29, 2024 · 1 comment

Comments

@ampresent
Copy link

Problem description

Add a new user and assign it with a new home directory through.
<user name="newuser" home="/path/to/home"/>
Kiwi fails to create image when /path/to/ doesn't exist,
because useradd -m -d /path/to/home newuser assumes /path/to/ exists.

Expected behaviour

Kiwi creates /path/to/home automatically and assign it to newuser.

Steps to reproduce the behaviour

  • Ensure /path/to doesn't exist
  • Add a line <user name="newuser" home="/path/to/home"/> in appliance.kiwi
  • Build a image
  • Kiwi fails

OS and Software information

  • KIWI version:
  • Operating system host version: RockyLinux 9.2
  • Operating system target version: CentOS 8.5
  • Open Build Service version (N/A if not using OBS): N/A
  • Koji version (N/A if not using Koji): N/A
@schaefi
Copy link
Collaborator

schaefi commented Feb 29, 2024

It's interesting that you run into that issue because

  • standard users has their home below /home which always exists according to FHS
  • non standard users, daemons and others usually provide their user setup through a package

You should be able to workaround the issue by creating the parent in a config.sh script of your image description.
But I would be interested which use-case triggered the problem in the first place

No objections to make sure kiwi creates the parent though

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

No branches or pull requests

2 participants