-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Adding a password-protected user without interactive shell #389
Comments
It's not currently possible without interactive input. |
AFAIK, it is not currently possible to automate this. easy-rsa will ask for a password from stdin: openvpn-install/openvpn-install.sh Line 975 in ef37eb6
I wish we had a workaround. |
there is a workaround but it involves hacking easy-rsa in opts="-passout stdin" now you can feed the script a text file as input textinput contains
|
it must be said that the however, we are working on a wrapper script, that modify easyrsa, then run openvpn-install.sh with piping in a textfile, then restores the orignal easyrsa file. |
The following script modifies the first "opts=" statement found in the declaration of gen_req in easyrsa to prepend "-passout stdin". It stores the original next to easyrsa as "easyrsa.nostdin.bkp", which you could also use to restore the original file after any automation. This is of course a bit of a hacky workaround, but it does the job.
|
easyrsa can now accept passwords as arguments: |
Awsome, thanks for letting us know. I won't have time to add this before a little while, but I'll gadly accept a PR. |
With EasyRSA 3.0.7 it's possible to pass the password of the password protected client with a variable. @angristan you always wanted to do this so I leave it to you #160 (comment) From EasyRSA 3.0.7 changelog: Add support for EASYRSA_PASSIN and EASYRSA_PASSOUT env vars |
Been any update on this? |
No, feel free to open a PR. |
pass the password with the var EASYRSA_PASSOUT, then run the command, this works for me.
easy-rsa v3.1.2 |
Is it somehow possible to add such user without answering all the dialogs? I need it to be created using my API.
The text was updated successfully, but these errors were encountered: