Uh oh!
There was an error while loading. Please reload this page.
Conversation
…up to run any command. Members of the sudo do not have to specify a password.
daviburg
commented
Nov 21, 2022
I've not worked in depth in Unix systems for almost 25 years so I don't think I'm the right person to review this change. |
drieseng
commented
Nov 22, 2022
@daviburg, thanks for the honest feedback. |
drieseng
commented
Nov 26, 2022
@daviburg, how do we proceed with this one? I need this to complete the integration tests for sshnet/SSH.NET#910. |
daviburg
commented
Nov 27, 2022
I've studied what I can to unblock this. So, before the change sed -i command was used for an in-place update of the /etc/sudoers security configuration file. There is a substitution syntax After the change simple appends to the same configuration file are made with two echo >> commands. As this is a docker file I assume the script is only executed once per host, hence we do not have to worry about repeat execution. The first append gives root access to all commands per sudoers. Frankly I'm surprised root doesn't already have such access by definition. The second append gives sudo users the ability to run any command without repeat password entry. I can see how that helps with non-interactive scripts for test execution. And sudo users are already privileged accounts. So, my unix-ignorant self believes this change is ok and I'll sign-off. |
drieseng
commented
Nov 27, 2022
Instead of modifying the default sudoers configuration file, we now just create one from scratch. |
Override /etc/sudoers with configuration that allows root and the sudo group to run any command.
Members of the sudo group do not have to specify a password.