1
0
intel-media-ffmpeg/templates/rhel/18-create-user.in
2021-05-05 23:37:52 +00:00

19 lines
510 B
Plaintext

# Create user 'user' and add them to 'sudo' for sudo access and set
# the passwd to 'user'
FROM xe-base-stage AS xe-user-stage
RUN dnf install -y sudo openssl
# NOTE: Requires 'sudo' package to already be installed
RUN groupadd -r user \
&& useradd --no-log-init \
-s /bin/bash \
-r -m \
-g user \
-G wheel,video \
-p $(echo "user" | openssl passwd -stdin) user
# Set 'wheel' to NOPASSWD for all container users
RUN sed -i -e 's,%wheel.*,%wheel ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers