-
-
Notifications
You must be signed in to change notification settings - Fork 716
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
Doesn't pass environment variables when run via sudo #942
Comments
I've created a branch with a new config variable |
Hey, thanks for the super quick response! I've thrown 911a822 on top of my dehydrated, added Tho I wonder if a config variable is really necessary. Generally it's normal to keep the env when dropping privileges, e.g. daemons using |
Hey!
currently implementing dehydrated into my environment. I'm using lexicon for the dns-01 challenge.
As I'm using
DEHYDRATED_USER
andDEHYDRATED_GROUP
, sudo is used to run the script. However, sudo by default does not pass environment variables. As a result the clear and easy way of running dehydrated+lexicon using env variables as described here (with this hook) does not work.This can easily be mitigated by having sudo pass env variables. The
-E -H
options should be added.-E
passes env variables, while-H
sets a properHOME
(which would be the wrong one from the env vars otherwise)I've been running it this way for a while now and see no issues. Would you consider making this the default?
Thanks a lot!
The text was updated successfully, but these errors were encountered: