diff --git a/src/DEBIAN_postinst.in b/src/DEBIAN_postinst.in index e29c770c10..a878cf688b 100755 --- a/src/DEBIAN_postinst.in +++ b/src/DEBIAN_postinst.in @@ -4,6 +4,11 @@ # it already exists do_create_rdc_user() { useradd -r -s /bin/nologin rdc + if [ $(getent group render) ]; then + usermod -a -G render rdc + else + usermod -a -G video rdc + fi # Make sure this doesn't return non-zero if an id already exists return 0 } diff --git a/src/RPM_rpm_post.in b/src/RPM_rpm_post.in index f99611e85e..3e535e6b39 100755 --- a/src/RPM_rpm_post.in +++ b/src/RPM_rpm_post.in @@ -2,6 +2,12 @@ do_create_rdc_user() { useradd -r -s /bin/nologin rdc + if [ $(getent group render) ]; then + usermod -a -G render rdc + else + usermod -a -G video rdc + fi + # Make sure this doesn't return non-zero if an id already exists return 0 }