We connected a computer to our FreeIPA system on the network, no problems there... However, we can't figure out how to remove a FreeIPA user account from the computer after they've logged in at least once.
Were running Fedora 27, and running userdel -r {username}
results in:
userdel: cannot remove entry 'admin' from /etc/passwd
we don't want to delete the user from FreeIPA, just the system so it no longer shows on the login screen.
** We also tried using gnome's user screen to remove the user, and it prompts to confirm removal, we confirm, but then it doesn't remove the user.
FreeIPA does not store users locally, so using 'userdel' will not help.
From your description, it looks like you are interested in removing a user from GDM welcome screen rather than removing a user itself.
GDM uses GNOME AccountsService to store information about recently logged in users. AccountsService stores these details in files /var/lib/AccountsService/users/<username>
and provides a dbus interface to access those details. UncacheUser
method is what you need:
Running
dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.UncacheUser string:username
would remove username
from the list of cached users.