mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #91] Provision for adding additional users #79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pogzie on GitHub (Oct 4, 2018).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/91
While running this docker container seems to be convenient, adding additional users is troublesome.
Can you provide a section in the
start.shfile to accommodate additional users? Perhaps anenvvariable containing the additional users separated by comma:Im using this docker image to automate and streamline the deployment of a small home network VPN but its counter-intuitive to
docker execand add the other users manually.@pogzie commented on GitHub (Oct 4, 2018):
One simpler fix would be:
The issue with your original
cat >is that even if I write the additional users to thechap-secretsand to thepasswdfile, running thestart.shwould just obliterate what I added there. Converting tocat >>would preserve what is written there before adding the user from the ENV variable.@pogzie commented on GitHub (Oct 17, 2018):
@hwdsl2 any thoughts on the possibility of converting
cat >tocat >>?@hwdsl2 commented on GitHub (Oct 18, 2018):
@pogzie Hello! Thank you for the suggestion. Unfortunately, changing
cat >tocat >>will add a duplicate line every time the container is restarted (e.g. at system boot).Going forward, we'll look into other ways to enable multiple users. In the meantime, you may enable multiple users yourself by first entering the container [1], then add multiple users using these instructions [2], and finally, edit
/opt/src/run.shinside the container and comment out these lines [3].[1] https://github.com/hwdsl2/docker-ipsec-vpn-server#bash-shell-inside-container
[2] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/manage-users.md
[3] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/run.sh#L205-L213
@pogzie commented on GitHub (Nov 5, 2018):
Thats what I did. But it defeats the purpose of containerizing it if I would have to manually do it everytime i restart the container.
Good catch on the
>>tho.One alternative im thinking is comma separating the accounts and just looping through it. Converting the env variable to accept comma separated values (along with the password of course), it would be easier to iterate until all elements are added to the file.