From c17566fd5f679736699b63cc873486c50642bc92 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Wed, 14 Feb 2024 17:51:26 +0000 Subject: [PATCH] Trying to fix the creation of the user, updating to version 1.1.3 --- entrypoint.sh | 10 ++-------- version.txt | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index c2364d0..59dabd6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,7 +25,7 @@ then else echo "INFO: Group doesn't exist; creating..." # create the group - addgroup -g "${MY_GID}" "${MY_GROUP}" || (echo "INFO: Group exists but with a different name; renaming..."; groupmod -g "${MY_GID}" -n "${MY_GROUP}" "$(awk -F ':' '{print $1":"$3}' < /etc/group | grep ":${MY_GID}$" | awk -F ":" '{print $1}')") + sudo addgroup -g "${MY_GID}" "${MY_GROUP}" || (echo "INFO: Group exists but with a different name; renaming..."; sudo groupmod -g "${MY_GID}" -n "${MY_GROUP}" "$(awk -F ':' '{print $1":"$3}' < /etc/group | grep ":${MY_GID}$" | awk -F ":" '{print $1}')") fi @@ -36,15 +36,9 @@ then else echo "INFO: User doesn't exist; creating..." # create the user - adduser -u "${MY_UID}" -G "${MY_GROUP}" -h "/home/${HOME_USER}" -s /bin/sh -D "${HOME_USER}" + sudo adduser -u "${MY_UID}" -G "${MY_GROUP}" -h "/home/${HOME_USER}" -s /bin/sh -D "${HOME_USER}" fi -# make the directories needed to run my app -mkdir -p /opt/myapp - -# change ownership of any directories needed to run my app as the proper UID/GID -chown -R "${HOME_USER}:${MY_GROUP}" "/opt/myapp" - # addgroup nonroot #adduser --disabled-password --gecos "" ${HOME_USER} # echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers diff --git a/version.txt b/version.txt index 8428158..9c1218c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.1.2 \ No newline at end of file +1.1.3 \ No newline at end of file