#!/bin/sh

# Avoid configuring multiple times in case persistence is enabled
if [ -e /var/lib/live/config/parrot-user-setup ]; then
    exit 0
fi

# Set "toor" as user password
usermod -p "$(openssl passwd toor)" anon

# Add user to additional groups
addgroup --system wireshark || true  # Ensures the group exists
groups="adm,dialout,wireshark"
usermod -a -G $groups anon

# Remember that this script has been run
touch /var/lib/live/config/parrot-user-setup
