Originally created by @tovine on GitHub (May 16, 2018).
I noticed that dehydrated refuses to run without sudo installed if DEHYDRATED_USER is set - why is that?
The same feature (restarting the script as a different user) is also perfectly doable using the su command: su $DEHYDRATED_USER -s /bin/bash -c "${0} ${ORIGARGS}"; the only difference I can see immediately is the option to explicitly specify the group to run as.
While sudo may be more feature-complete in some respects, su is "guaranteed" to be present in mostly any system you would run on and IMO should at least be provided as a fallback if sudo is not found.
I can probably make a PR for it if you want me to.
Originally created by @tovine on GitHub (May 16, 2018).
I noticed that dehydrated refuses to run without `sudo` installed if `DEHYDRATED_USER` is set - why is that?
The same feature (restarting the script as a different user) is also perfectly doable using the `su` command: `su $DEHYDRATED_USER -s /bin/bash -c "${0} ${ORIGARGS}"`; the only difference I can see immediately is the option to explicitly specify the group to run as.
While `sudo` may be more feature-complete in some respects, `su` is "guaranteed" to be present in mostly any system you would run on and IMO should at least be provided as a fallback if `sudo` is not found.
I can probably make a PR for it if you want me to.
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use su yourself.
@lukas2511 commented on GitHub (May 22, 2018):
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use `su` yourself.
go
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use su yourself.
@Mischelle89 commented on GitHub (May 22, 2018):
go
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use su yourself.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @tovine on GitHub (May 16, 2018).
I noticed that dehydrated refuses to run without
sudoinstalled ifDEHYDRATED_USERis set - why is that?The same feature (restarting the script as a different user) is also perfectly doable using the
sucommand:su $DEHYDRATED_USER -s /bin/bash -c "${0} ${ORIGARGS}"; the only difference I can see immediately is the option to explicitly specify the group to run as.While
sudomay be more feature-complete in some respects,suis "guaranteed" to be present in mostly any system you would run on and IMO should at least be provided as a fallback ifsudois not found.I can probably make a PR for it if you want me to.
@lukas2511 commented on GitHub (May 22, 2018):
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use
suyourself.@Mischelle89 commented on GitHub (May 22, 2018):
go
Using sudo does allow for a user switch without the need for a password (if configured). Also the group option might be needed by some people. Nobody forces you to use the dehydrated integrated sudo operation, you could always just use su yourself.