Skip to content

Commit

Permalink
Override sudoers with configuration that allows root and the sudo gro…
Browse files Browse the repository at this point in the history
…up to run any command. (#8)

Members of the sudo do not have to specify a password.
  • Loading branch information
drieseng authored Nov 28, 2022
1 parent a31325e commit c5ca241
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ RUN apk add --no-cache syslog-ng && \
# install and configure sudo
apk add --no-cache sudo && \
addgroup sudo && \
sed -i 's/#\s*%sudo\s*ALL=(ALL)\s*ALL/%sudo ALL=(ALL) NOPASSWD:ALL/' /etc/sudoers && \
# allow root to run any command
echo 'root ALL=(ALL) ALL' > /etc/sudoers && \
# allow everyone in the 'sudo' group to run any command without a password
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
# add user to run most of the integration tests
adduser -D sshnet && \
passwd -u sshnet && \
Expand Down

0 comments on commit c5ca241

Please sign in to comment.