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