How to Hide User List from GDM Login Screen in Ubuntu 20.04 | 22.04 | 22.10

Want to prevent all users from listing in login screen, then type your username and password to login? Here’s how to do it in Ubuntu 20.04, Ubuntu 22.04 & Ubuntu 22.10 with the default Gnome Desktop.

There are 3 ways to do this job: create a configuration file and write rules to disable user list, run gsettings command in terminal, or use a graphical configuration tool.

Option 1: Create configuration file to disable user list

  1. Open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, run command:
    sudo gedit /etc/dconf/profile/gdm
    For Ubuntu 22.10+ replace gedit with gnome-text-editor in command.

    The command will create a profile and open it via Gedit text editor. When the file opens, paste following lines and save it.


  2. Run command to create /etc/dconf/db/gdm.d directory if it does not exist.
    sudo mkdir /etc/dconf/db/gdm.d
  3. Create and edit the key file under this directory:
    sudo gedit /etc/dconf/db/gdm.d/00-login-screen

    When the file opens, paste following lines and save it.

    # Disable user list from login screen

  4. Finally update database to apply changes by running command:
    sudo dconf update

Option 2: Disable user list via gsettings command.

The gsettings configuration tool can do the job. However, you need to get gdm user privilege before running the command.

NOTE: this method may not work on Ubuntu running as guest in Virtualbox.

Get gdm user privilege in terminal:

First open terminal by pressing Ctrl+Alt+T on keyboard, and run following commands one by one.

  1. Run command to get root permission:
    sudo -i
  2. Add local user gdm to access control list:
    xhost +SI:localuser:gdm
  3. Get the gdm permission in this terminal window:
    su gdm -s /bin/bash

Run gsettings command:

In this command window, run command:

gsettings set org.gnome.login-screen disable-user-list true

Though the command outputs a flatpak permission denied warning, it works in my case after restart.

Option 3: Use “Login Manager Settings” (Graphical)

For Ubuntu 22.04 & Ubuntu 22.10, there’s now a new graphical configuration tool that can do the job. Not only for hiding user list, but also changing login screen background, text font, color scheme, etc.

1. First, go to the software releases page to download the AppImage package under ‘Assets’ section:

2. Next, start the app, by first adding executable permission under file “Properties” dialog, and then running the AppImage:

Run Login Manager Settings AppImage

3. The tool has many useful configuration options. In this case, go to ‘Miscellaneous’ tab from left pane, then turn on the toggle switch for “Disable User List”.

Finally, click on ‘Apply’ button and type user password to confirm and done!

Merilyn Ne
Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.