[Quick Tip] Hide User List in Ubuntu 18.04 Login Screen

Last updated: May 23, 2020

gnome shell

The Gnome login screen normally shows a list of available users to log in as. For those who want to disable showing the user list, and manually type a username to login with, below I will show you how.

Open terminal by pressing Ctrl+Alt+T on keyboard, when it opens, run following commands one by one:

1. Run command to get access to root:

sudo -i

Type in your password (no visual feedback while typing) when it prompts and hit Enter.

2. In the terminal, run command to allow gdm to make connections to the X server:

xhost +SI:localuser:gdm

3. Then switch to user gdm, which is required to run gsettings to configure gdm settings.

su gdm -l -s /bin/bash

Update May 2020: For Ubuntu 20.04, you may need to run one more command:

export DISPLAY=:0

4. Finally hide user list from login screen using Gsettings:

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

After that, restart your computer and enjoy!

How to Restore

To restore the change, open terminal and re-do previous steps, except running the last command with:

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

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

6 responses to [Quick Tip] Hide User List in Ubuntu 18.04 Login Screen

  1. Can you write about installing Sopcast and Viber in Ubuntu 18.04?
    Thank you!

  2. Does NOT work. Still have list even after reboot.

    (process:2057): dconf-CRITICAL **: 09:42:20.969: unable to create directory ‘/run/user/0/dconf’: Permission denied. dconf will not work properly.

    (process:2057): dconf-CRITICAL **: 09:42:20.969: unable to create directory ‘/run/user/0/dconf’: Permission denied. dconf will not work properly.

    (process:2057): dconf-CRITICAL **: 09:42:20.970: unable to create directory ‘/run/user/0/dconf’: Permission denied. dconf will not work properly.

  3. Works like a champ. You NEVER want to display a list of available users unless you care less than zero about security!

  4. Thank you. Work without problems.

  5. Something has changed, I’ve used this plenty of times, but it stopped working.
    I had to include -l (lowercase L) when switching to gdm or I got the permission denied that joe received.

    su gdm -l -s /bin/bash