Skip to content

Commit 743484f

Browse files
authored
fix: Suppress useradd/groupadd errors (ietf-tools#4408)
1 parent 9f0e5d1 commit 743484f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docker/scripts/app-setup-debian.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ if id -u ${USERNAME} > /dev/null 2>&1; then
193193
else
194194
# Create user
195195
if [ "${USER_GID}" = "automatic" ]; then
196-
groupadd $USERNAME
196+
groupadd --force $USERNAME
197197
else
198-
groupadd --gid $USER_GID $USERNAME
198+
groupadd --force --gid $USER_GID $USERNAME
199199
fi
200200
if [ "${USER_UID}" = "automatic" ]; then
201-
useradd -s /bin/bash --gid $USERNAME -m $USERNAME
201+
useradd -s /bin/bash --gid $USERNAME -m $USERNAME || true
202202
else
203-
useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME
203+
useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME || true
204204
fi
205205
fi
206206

0 commit comments

Comments
 (0)