Skip to content

Commit a6f4b2e

Browse files
committed
HDDS-14576. sudo cannot retrieve authentication info (#56)
(cherry picked from commit 557193f)
1 parent 27c8463 commit a6f4b2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ RUN id=1000; \
173173
done
174174

175175
RUN echo "hadoop ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
176+
RUN chmod 0400 /etc/shadow # workaround for "PAM account management error: Authentication service cannot retrieve authentication info" when trying to sudo
176177
RUN chown hadoop /opt
177178

178179
# Prep for Kerberized cluster
@@ -190,5 +191,6 @@ COPY --chmod=755 entrypoint.sh /usr/local/bin/entrypoint.sh
190191

191192
WORKDIR /opt/hadoop
192193
USER hadoop
194+
RUN sudo whoami # sanity check
193195

194196
ENTRYPOINT ["/usr/local/bin/dumb-init", "--", "entrypoint.sh"]

0 commit comments

Comments
 (0)