Skip to content

[Feature Request] Consider a more standard approach to removing the first setup user. #393

@Maxwelldoug

Description

@Maxwelldoug

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.service

Ignoring 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions