diff --git a/bitwarden_license/src/Scim/entrypoint.sh b/bitwarden_license/src/Scim/entrypoint.sh index b3cffa33bd..77b0540541 100644 --- a/bitwarden_license/src/Scim/entrypoint.sh +++ b/bitwarden_license/src/Scim/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/bitwarden_license/src/Sso/entrypoint.sh b/bitwarden_license/src/Sso/entrypoint.sh index 1d0f6d6a42..61e78e5b72 100644 --- a/bitwarden_license/src/Sso/entrypoint.sh +++ b/bitwarden_license/src/Sso/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Admin/entrypoint.sh b/src/Admin/entrypoint.sh index d003e4ec17..5887dd3c39 100644 --- a/src/Admin/entrypoint.sh +++ b/src/Admin/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Billing/entrypoint.sh b/src/Billing/entrypoint.sh index 8b6a312ea1..90b28dda7c 100644 --- a/src/Billing/entrypoint.sh +++ b/src/Billing/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Events/entrypoint.sh b/src/Events/entrypoint.sh index 0497ceed60..a339d2ca0e 100644 --- a/src/Events/entrypoint.sh +++ b/src/Events/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/EventsProcessor/entrypoint.sh b/src/EventsProcessor/entrypoint.sh index f5757bc180..2f3ed39a70 100644 --- a/src/EventsProcessor/entrypoint.sh +++ b/src/EventsProcessor/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Icons/entrypoint.sh b/src/Icons/entrypoint.sh index 13bc1114aa..5e493c83ed 100644 --- a/src/Icons/entrypoint.sh +++ b/src/Icons/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Identity/entrypoint.sh b/src/Identity/entrypoint.sh index 7141058c80..2c04333dd7 100644 --- a/src/Identity/entrypoint.sh +++ b/src/Identity/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/src/Notifications/entrypoint.sh b/src/Notifications/entrypoint.sh index 4c5759675b..8ac77dcc8f 100644 --- a/src/Notifications/entrypoint.sh +++ b/src/Notifications/entrypoint.sh @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest... diff --git a/util/Attachments/entrypoint.sh b/util/Attachments/entrypoint.sh index 1de574dc43..2c0942a148 100644 --- a/util/Attachments/entrypoint.sh +++ b/util/Attachments/entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Setup @@ -23,11 +23,11 @@ if [ "$(id -u)" = "0" ] then # Create user and group - groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || - groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 - useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || - usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 - mkhomedir_helper $USERNAME + addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true + adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true + mkdir -p /home/$USERNAME + chown $USERNAME:$GROUPNAME /home/$USERNAME + # The rest...