From ca7642cc91bead99c81246135b80d5b2c09e5960 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Thu, 12 Jun 2025 20:54:36 +0200 Subject: [PATCH] Create service user as system user (#867) --- supplemental/scripts/install-agent.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supplemental/scripts/install-agent.sh b/supplemental/scripts/install-agent.sh index c8e3273..50c566f 100755 --- a/supplemental/scripts/install-agent.sh +++ b/supplemental/scripts/install-agent.sh @@ -317,14 +317,14 @@ fi if is_alpine; then if ! id -u beszel >/dev/null 2>&1; then echo "Creating a dedicated user for the Beszel Agent service..." - adduser -D -H -s /sbin/nologin beszel + adduser -S -D -H -s /sbin/nologin beszel fi # Add the user to the docker group to allow access to the Docker socket addgroup beszel docker else if ! id -u beszel >/dev/null 2>&1; then echo "Creating a dedicated user for the Beszel Agent service..." - useradd -M -s /bin/false beszel + useradd --system --home-dir /nonexistent --shell /bin/false beszel fi # Add the user to the docker group to allow access to the Docker socket usermod -aG docker beszel