From f95217ed6d22b62ab2a1a480b0d624f4675a9a0b Mon Sep 17 00:00:00 2001 From: Bernhard Berger Date: Sat, 19 Oct 2019 21:48:18 +0200 Subject: [PATCH] fix invalid random pattern for creation of groups (only lowercase + number allowed) --- root/etc/cont-init.d/50-gid-video | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-gid-video b/root/etc/cont-init.d/50-gid-video index fdbd5ae..cfff065 100644 --- a/root/etc/cont-init.d/50-gid-video +++ b/root/etc/cont-init.d/50-gid-video @@ -11,7 +11,7 @@ do if [ ! "${VIDEO_GID}" == '0' ]; then VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') if [ -z "${VIDEO_NAME}" ]; then - VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)" + VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-za-z0-9' | head -c8)" groupadd "$VIDEO_NAME" groupmod -g "$VIDEO_GID" "$VIDEO_NAME" fi @@ -23,4 +23,4 @@ done if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then usermod -a -G root abc -fi \ No newline at end of file +fi