GNOME
Make the GNOME login screen (GDM) ask for a username instead of showing the list of users.
1 min readUpdated
By default the GNOME Display Manager (GDM) shows a list of the users on the system, and you pick one to log in. Hiding that list makes GDM show a username prompt instead. This is often done for security, so that the login screen does not reveal valid usernames, or on systems with many users, where the list becomes long.
Hide the user list on Debian and Ubuntu
GDM reads its defaults from the dconf key org.gnome.login-screen.disable-user-list. On Debian and Ubuntu, set it in GDM’s defaults file:
sudo nano /etc/gdm3/greeter.dconf-defaultsUnder the [org/gnome/login-screen] section, set disable-user-list to true:
[org/gnome/login-screen]disable-user-list=true# banner-message-enable=true# banner-message-text='Enter Username'Optionally, uncomment the two banner-message lines to show a short text on the login screen, for example a prompt to enter the username.
Restart GDM to apply the change:
sudo systemctl restart gdmNote: restarting GDM ends every graphical session on the machine, including your own. Save your work first, or run the command from a text console (Ctrl+Alt+F3) or an SSH session, or reboot instead.
Hide the user list on other distributions
Distributions without greeter.dconf-defaults, such as Fedora, use a dconf database for GDM. The GNOME System Administration Guide describes the steps:
-
Create the profile
/etc/dconf/profile/gdm:/etc/dconf/profile/gdm user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults -
Create the keyfile
/etc/dconf/db/gdm.d/00-login-screen:/etc/dconf/db/gdm.d/00-login-screen [org/gnome/login-screen]# Do not show the user listdisable-user-list=true -
Update the system databases:
Terminal window sudo dconf update