1
0
intel-media-ffmpeg/templates/centos/25-create-user.in
James P. Ketrenos 01b78228a7 Updated to latest xe-solutions
Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
2020-07-15 10:15:05 -07:00

22 lines
581 B
Plaintext

# Create user 'user' and add them to 'wheel' for sudo access and set
# the passwd to 'user'
FROM xe-base-stage AS xe-user-stage
# CentOS doesn't provide openssl by default. Red Hat does.
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
USER user