Binary to edit a user's password#383
Binary to edit a user's password#383marceloschmidt wants to merge 1 commit intodocker-mailserver:masterfrom
Conversation
|
related to #357 |
|
Just a suggestion, sed will do all the work in a single line. Try this out: Remove lines 9-13(the sed_string function), remove 31 and replace line 32 from That should search the database for $user and replace the line with the new $ENTRY. I added the .bak in case the user made a mistake and needed to rollback the change. The only issue I could think of is if % was in the encryption. As far as I've been able to tell and test, I have not come across it so I don't believe would be. Also should update setup.sh to include the usage for: and add the case: Let me know if I can make a pull request for anything to help. |
|
@marceloschmidt Thank you for submitting your script! Can you please write a test. Writing tests with bats is so nice. |
|
I'll have to learn some bash programming 😂 but give me a few days and I'll add some tests! Thanks! |
|
Yeah, no problem @marceloschmidt |
|
Hi @marceloschmidt, did you get a chance to look at |
|
Fixed by #413 |
I'm not sure if this is the best bash script it can be, but it works for me.
This script changes a user password.
We still need to restart the server for changes to be taken into account.