8

I'm using the latest Ubuntu 18.04 LTS bionic.

When I login it shows my username and I just need to type a password.

I don't want usernames to be shown. I want to be forced to type a username and password.

How do I do that? All I found is info for old versions or lightdm (18 uses gdm).

muru
  • 197,895
  • 55
  • 485
  • 740
lonix
  • 2,438
  • I tried using "dconf editor" to edit the org/gnome/login-screen/disable-user-list but that didn't help. – lonix May 17 '18 at 07:03
  • Did you try any of the other solutions recommended by the answers to the linked question, namely the first part of ravery's answer which is nearly the the same as one of Rinzwind's suggestions? – David Foerster May 31 '18 at 07:46

1 Answers1

5

Settings for gdm3 are done in /usr/share/gdm/greeter.dconf-defaults.

Uncomment these 2 lines:

[org/gnome/login-screen]
disable-user-list=true

(Only un-commenting the 2nd line will crash your login: bugreport confirming it works for 18.04) and restart the login manager with

sudo dpkg-reconfigure gdm3

and reboot (or restart with sudo systemctl stop gdm and log out).

Make a backup 1st so in case something get messed up and you can not log in you can use tty3 to redo your changes. edit: this wont work; gdm also takes care of the tty sessions so tty3 is dead too... you will need to user a live session or grub rescue prompt.


Another way that works for 17.10 and 18.04 (from comment #7 by fprietog in the bug report):

Using root:

  • Create a file named /etc/dconf/profile/gdm with this contents:

     user-db:user   
     system-db:gdm
    
  • Create a file named /etc/dconf/db/gdm.d/50-disable-user-list with this content:

    [org/gnome/login-screen]   
    disable-user-list=true
    
  • Execute the command sudo dconf update

Rinzwind
  • 299,756