-
Notifications
You must be signed in to change notification settings - Fork 531
Fix password script in base container image #11547
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
Fix password script in base container image #11547
Conversation
…", "DOMAIN_PASSWORD"
…ewlines in error handling blocks
Ensure password-related commands properly handle failures and print warnings if changes cannot be applied. Backported changes to v6.4, v6.5, and v6.6.
|
@pdurbin this is ready for review. As it is very important for containers but not touching any app code at all it is a very small PR. IMHO it should be OK to take a shortcut unless @ofahimIQSS wants to play with images 😄 |
…with ro rootfs Added a note about incompatibility with read-only root filesystems when modifying `/etc/shadow`.
pdurbin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test this but the fix looks reasonable (backports! fancy!).
I did tweak the "how to test" steps a bit for clarity.
@poikilotherm are there rules for these password? I don't see anything at https://guides.dataverse.org/en/6.6/container/base-image.html#tunables I tried "foo" and got an error that it was too short ( Then I tried this: (I hope I'm doing this right, by the way.) I got this error: |
|
Nevermind. I was able to reproduce it on develop like this:
Then I ctrl-c to stop it. Then I run |
https://documentation.ubuntu.com/server/how-to/security/user-management/#minimum-password-length says, "By default, Ubuntu requires a minimum password length of 6 characters, as well as some basic entropy checks." |
|
Grml it worked on my machine. Might need to take another look and try to reproduce. |
|
Fix looks good - no longer seeing the password errors. Merging. |
|
Thanks for merging @ofahimIQSS, much appreciated! 😄 |

What this PR does / why we need it:
This PR replaces #11463 as I couldn't push changes to the fork branch.
Fixing a problem of a Dataverse application container not starting when running on Docker due to an already set password in a previous run.
Which issue(s) this PR closes:
Special notes for your reviewer:
If you normally start the Docker image with docker-compose and Docker is configured to restart all running Docker instances upon a system restart, the error occurs. This happens because the script specifies that if a program does not return exit 0, the script should terminate, and as a result, the entire startup process fails.
Suggestions on how to test this:
During the normal start using Docker, all three or at least one of the following parameters must be specified: LINUX_PASSWORD, PAYARA_ADMIN_PASSWORD, DOMAIN_PASSWORD.
Then, stop the containers but don't delete them. Now start them again and see if the startup stop failing.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope
Is there a release notes update needed for this change?:
Nope
Additional documentation:
None