-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Currently, the script remove-first-setup-user includes the following snippet
systemctl restart accounts-daemon.service
cp /usr/share/org.vanillaos.FirstSetup/remove-first-setup-user.service /etc/systemd/system/remove-first-setup-user.service
systemctl enable remove-first-setup-user.serviceIgnoring the fact that this only actually works after a reboot and should include a systemd daemon-reload to properly load the new service before enabling it, POSIX standard suggests that we should instead use usermod --expiredate 1 vanilla to immediately prevent any use of the account. We could also simply consider userdel -rf vanilla which would completely remove the user, regardless of if they are currently logged in, which will return an error, but it will work.
We do need to stop to consider why I make this suggestion - besides what is "proper", this causes issues with sddm, where an explicit exclusion is needed for the vanilla user's login, and in greetd, where there is no simple way to implement this exclusion, causing them to appear (as the default) even after first setup has been finished. This particular issue could also be solved by simply forcing a reboot after first setup runs, but properly removing the user would be better.