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

feat: Add optional option to define a home directory for users created with users.conf #36

Merged
merged 8 commits into from
Jan 30, 2025

Conversation

Nunction
Copy link
Contributor

This patch aims to add the optional option to define a home directory for users created using the users.conf.
It attempts to do so in a backwards compatibly way by adding the homedir field at the end of the users.conf line, in doing so however breaks support for passwords containing :.

If not set the home directory in HOME_DIR is used, this variable was added to the Dockerfile and is also used to for the single user mode and defaults to the existing value of /tmp. Furthermore the home directory is now created if not already present.

This would allow the use of e.g. the samba homes share where each user accesses their own home directory, currently all users use /tmp as home directory.

@cfiehe
Copy link

cfiehe commented Jan 30, 2025

Nice feature 👍. I hope, it will be merged soon.

@kroese
Copy link
Contributor

kroese commented Jan 30, 2025

Can you tell me a bit more about what effect setting the home directory has?

Because I have no idea about the purpose but depending on that it might be better that we set the default to /storage instead of /tmp? Because /tmp is cleared when you update the image.

@Nunction
Copy link
Contributor Author

In the context of samba it should primarly affect how the homes share is handled, which if not explicitly set shares the home directory of the user.

The [homes] section
...
If no path was given, the path is set to the user's home directory.
-- https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

As well as affecting the value of the %H substituion which is the home directory of the user.

Regarding the default value I just reused /tmp as this is the value currently used in the entrypoint. Might be worth setting it to /storage in case the homes share is used with the default volume.

@kroese kroese merged commit da35545 into dockur:master Jan 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants