Hopefully change users in nodm.conf.

This commit is contained in:
Storm Dragon 2020-01-08 12:28:56 -05:00
parent c51b494fbb
commit 621558b8d4

View File

@ -78,7 +78,7 @@ echo "Writing /etc/cron.d/0chuser" | log
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null
SHELL=/bin/bash SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin PATH=/sbin:/bin:/usr/sbin:/usr/bin
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -E -i "s/autologin +[a-zA-Z0-9-]+/autologin $newUser/g" /etc/systemd/system/getty@tty*.service.d/override.conf && sed -i -e "s#NODM_USER=.*#NODM_USER='$newUser'#" -e "s#NODM_XSESSION=.*#NODM_XSESSION='/home/$newUser/.xinitrc'#" /etc/nodm.conf; rm -f /etc/cron.d/0chuser;reboot @reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -i -e "s#NODM_USER=.*#NODM_USER='$newUser'#" -e "s#NODM_XSESSION=.*#NODM_XSESSION='/home/$newUser/.xinitrc'#" /etc/nodm.conf; rm -f /etc/cron.d/0chuser;reboot
EOF EOF