Skip to content

Commit

Permalink
Fix sudo with user extension for some usernames (#55)
Browse files Browse the repository at this point in the history
Not all valid usernames are valid names for files in /etc/sudoers.d/.
We had the problem with a user that has a dot in his username.
The file /etc/sudoers.d/firstname.lastname was ignored by sudo.
  • Loading branch information
meyerj authored and tfoote committed Sep 11, 2019
1 parent 44de3d7 commit 0bc20b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rocker/templates/user_snippet.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN groupadd -g "@(gid)" "@name" \
&& useradd --uid "@(uid)" -s "@(shell)" -c "@(gecos)" -g "@(gid)" -d "@(dir)" "@(name)" \
&& echo "@(name):@(name)" | chpasswd \
&& adduser @(name) sudo \
&& echo "@(name) ALL=NOPASSWD: ALL" >> /etc/sudoers.d/@(name)
&& echo "@(name) ALL=NOPASSWD: ALL" >> /etc/sudoers.d/rocker
# Commands below run as the developer user
USER @(name)
@[else]@
Expand Down

0 comments on commit 0bc20b8

Please sign in to comment.