Skip to content

Commit

Permalink
hide first-setup user before logging out
Browse files Browse the repository at this point in the history
  • Loading branch information
taukakao committed Feb 19, 2025
1 parent 25ce007 commit 7939324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions vanilla_first_setup/scripts/logout
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ if [ "$UID" == "0" ]; then
exit 7
fi

# TODO: consider setting vanilla user to invisible for AccountsService
# see https://github.com/Vanilla-OS/first-setup/blob/4f7f49908ff32503c995a97253af0e796f279627/__first_setup_reset_session#L3
# and https://github.com/Vanilla-OS/first-setup/blob/4f7f49908ff32503c995a97253af0e796f279627/recipe.json#L10
loginctl terminate-user "$USER"
2 changes: 2 additions & 0 deletions vanilla_first_setup/scripts/remove-first-setup-user
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ if ! [ "$UID" == "0" ]; then
exit 6
fi

echo -e '[User]\nSession=firstsetup\nSystemAccount=true' > /var/lib/AccountsService/users/$(id -nu $PKEXEC_UID || echo invaliduser)
systemctl restart accounts-daemon.service
systemctl enable remove-first-setup-user.service

0 comments on commit 7939324

Please sign in to comment.