Skip to content

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:

Terminal window
sudo nano /etc/gdm3/greeter.dconf-defaults

Under the [org/gnome/login-screen] section, set disable-user-list to true:

/etc/gdm3/greeter.dconf-defaults
[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:

Terminal window
sudo systemctl restart gdm

Note: 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:

  1. Create the profile /etc/dconf/profile/gdm:

    /etc/dconf/profile/gdm
    user-db:user
    system-db:gdm
    file-db:/usr/share/gdm/greeter-dconf-defaults
  2. 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 list
    disable-user-list=true
  3. Update the system databases:

    Terminal window
    sudo dconf update

References

Related notes

4 min read

Jitsi Meet

Self-host Jitsi Meet on Debian: install from the Jitsi repository, add a Let's Encrypt certificate, open the firewall, require login and check the services.

  • Linux & Systems
4 min read

SSH keys

Create and manage SSH keys: generate a key pair, set a passphrase, copy the public key, test Git hosts and recover a server you are locked out of.

  • Security
  • Linux & Systems
2 min read

Debian

Debian administration tasks: check the release, update packages, set the locale and time zone, purge removed packages and boot to text mode.

  • Linux & Systems

Type to search the whole site.