#!/usr/bin/env bash

locale-gen

usermod -p '$y$j9T$DCmooGCtnp3i6gg0IuIhG/$n9NDMoszCJzqEPuJvZppPqjDMttYJlNZVDpxQikzHH1' -s /bin/bash root
cp -aT /etc/skel/ /root/

usermod -p '$y$j9T$TNQr0I6vYHoPyYW..UMVS.$REa5y1aHgxjCdYbEeGviSn2oxSSD6AuoyP1ktQptkL6' liveuser
usermod -g 'users' liveuser

groups="adm audio autologin floppy log network nopasswdlogin optical power rfkill scanner storage sys tty users uucp video wheel"
for i in $groups
do
    usermod -a -G $i liveuser
done

# tar -xJvf /root/archives/skel.tar.xz -C /etc/skel --strip=1 --overwrite
# chown -R 0:0 /etc/skel

# tar -xJvf /root/archives/liveuser.tar.xz -C /home/liveuser --strip=1 --overwrite
# chown -R 1000:1000 /home/liveuser

# tar -xJvf /root/archives/skel.tar.xz -C /root --strip=1 --overwrite
# chown -R 0:0 /root

# echo -e "[Daemon]\nTheme=melawy-lera-sugar\nDeviceScale=1\nDeviceTimeout=8\nShowDelay=0" > "/usr/share/plymouth/plymouthd.defaults"

# cp -rT --no-preserve=ownership "/etc/skel/" "/root/"


true
