How do disable user list on login screen? (Prompt for username and password) Ubuntu 15.10

I was curious as to if there is a way to disable the user list on the login screen on Ubuntu 15.10, thus making it so that any user would have to enter their username as well as their password to log in.

I have already modified /etc/lightdm/users.conf by adding...

greeter-show-manual-login=true    
greeter-hide-users=true    
allow-guest=false

... and restarting the computer, but I am only prompted for my password, and my user name is already selected. With that, I also have the ability to use a guest session, even though that shouldn't be allowed with the code above. Any help would be much appreciated.


Solution 1:

Create a folder in the /etc/lightdm/ folder called lightdm.conf.d:

sudo mkdir -p /etc/lightdm/lightdm.conf.d

Next, create a file and call it 10-ubuntu.conf:

sudo gedit /etc/lightdm/lightdm.conf.d/10-ubuntu.conf

and add the following lines to it:

[SeatDefaults]
user-session=ubuntu
greeter-show-manual-login=true    
greeter-hide-users=true    
allow-guest=false

For 16.04 or newer:

[Seat:*]
user-session=ubuntu
greeter-show-manual-login=true    
greeter-hide-users=true    
allow-guest=false

Change the line user-session= to whatever desktop you are using, like if you are using Xubuntu, change it to user-session=xubuntu.

After these lines are added, reboot host, and you should see login instead of the user list:

enter image description here

https://wiki.ubuntu.com/LightDM shows information about LightDM and that the file user.conf can be ignored if accountservice is running on the host.

Hope this helps!