Skip to content

Commit

Permalink
chore(kuma-init): try adding a user copying passwd and group
Browse files Browse the repository at this point in the history
Signed-off-by: slonka <[email protected]>
  • Loading branch information
slonka committed Oct 21, 2024
1 parent a92e4d9 commit 70668ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
20 changes: 3 additions & 17 deletions tools/releases/dockerfiles/kuma-init.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ COPY /tools/releases/templates/LICENSE \

COPY /tools/releases/templates/NOTICE /kuma/NOTICE

# Manually add user equivalent to:
# adduser --system --disabled-password --group kumactl --uid 5678
RUN cat <<EOF >> /etc/passwd \
kumactl:x:5678:5678::/home/kumactl:/usr/sbin/nologin \
EOF

RUN cat <<EOF >> /etc/shadow \
kumactl:*:19000:0:99999:7::: \
EOF

RUN cat <<EOF >> /etc/group \
kumactl:x:5678: \
EOF

RUN cat <<EOF >> /etc/gshadow \
kumactl:!::: \
EOF
# Copy modified system files
COPY /tools/releases/templates/passwd /etc/passwd
COPY /tools/releases/templates/group /etc/group

ENTRYPOINT ["/usr/bin/kumactl"]
CMD ["install", "transparent-proxy"]
6 changes: 6 additions & 0 deletions tools/releases/templates/group
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root:x:0:
nobody:x:65534:
tty:x:5:
staff:x:50:
nonroot:x:65532:
kumactl:x:5678:
4 changes: 4 additions & 0 deletions tools/releases/templates/passwd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root:x:0:0:root:/root:/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/sbin/nologin
nonroot:x:65532:65532:nonroot:/home/nonroot:/sbin/nologin
kumactl:x:5678:5678::/tmp:/usr/sbin/nologin

0 comments on commit 70668ef

Please sign in to comment.