How to create a user that doesn't show up on the login screen?
Edit /etc/gdm/custom.conf
and add or change the Exclude
directive in the [greeter]
section:
[greeter]
Exclude=nobody,alice,bob
Users alice
and bob
won't be shown on the list at the login screen but can still log in by typing their name and password (if they have a password).
See more details in How to hide users from the GDM login screen? (it's mostly distribution-independent — some details might change, for example files may located in different places, and the threshold for system users is 500 on most Red Hat derivatives but 1000 on most Debian derivatives).
Create system user account - with UID less than 1000. Accounts with UID less than 1000 are hidden in gdm and probably others display managers.
You can create system account by running useradd
with -r
flag.
I found the solution here:
https://askbot.fedoraproject.org/en/question/43367/how-to-hide-certain-users-from-gdm-logon-list/
In the directory /var/lib/AccountsService/users edit the file for the username to be excluded (copy another one if it does not exist), and set SystemAccount=true
. Restart the gdm3 service (as root) with
# systemctl restart gdm3.service
If you are in a gdm session you will be logged out, and the excluded user will not show on the login screen.