Skip to content

Commit fee2790

Browse files
ydirsonfallen
andcommitted
Adjust /etc/shadow permissions to unbreak sudo un some setups
In this Ubuntu 24.04 with podman 4.9.3, this was observed: + sudo dnf config-manager --enable crb sudo: PAM account management error: Authentication service cannot retrieve authentication info sudo: a password is required We're not sure of the exact reason this setup exhibits this problem, or why it does not with `xcp-ng/xcp-ng-build-env:8.3` which has the same 000 permissions on /etc/shadow, but changing the permissions does avoid the problem there. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> Co-authored-by: Yann Sionneau <yann.sionneau@vates.tech>
1 parent ec22871 commit fee2790

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Dockerfile-9.x

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ RUN dnf install -y \
5252
# enable repositories commonly required to build
5353
RUN dnf config-manager --enable crb
5454
55+
# workaround sudo not working (e.g. in podman 4.9.3 in Ubuntu 24.04)
56+
RUN chmod 0400 /etc/shadow
57+
5558
# Set up the builder user
5659
RUN bash -c ' \
5760
OPTS=(); \

0 commit comments

Comments
 (0)