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

Only create samba user if not already existing #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bdabelow
Copy link

I would like to manage my user's passwords manually rather than put them in any configuration file in clear text. I can change the password via smbpasswd after container start. However, the password is reset/removed on every container restart, because smbpasswd is executed unconditionally if a config file is configured.

This PR introduces a check via pdbedit whether the samba user already exists and only calls smbpasswd if it does not.

As this changes the current behavior (and some people might want to keep closed-loop management of passwords via configuration), I could also add a configuration, either globally via env var or per user. Please let me know @crazy-max if you would consider this for merge but want it configurable.

Check via pdbedit whether the samba user already exists and only call smbpasswd if it does not. This avoids reset of the password on every container restart.
@bdabelow bdabelow requested a review from crazy-max as a code owner December 29, 2024 23:44
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.

1 participant