From 28ec996999d487e7525ccfebae6a4de263fd4918 Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 13 Mar 2025 15:06:49 -0600 Subject: [PATCH] Adding created user to the wrolpi group so they can interact with wrolpi files and logs. --- wrolpi/scripts/first_startup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wrolpi/scripts/first_startup.sh b/wrolpi/scripts/first_startup.sh index 5e492f8e..071738ea 100755 --- a/wrolpi/scripts/first_startup.sh +++ b/wrolpi/scripts/first_startup.sh @@ -15,5 +15,10 @@ else exit 1 fi +# Add the user created on startup to the wrolpi group. +USER_NAME=$(getent passwd 1000 | cut -d: -f1) +grep wrolpi: /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)" +usermod -aG wrolpi ${USER_NAME} + # Do not run this script again. systemctl disable wrolpi-first-startup.service