How to disable the user list or guest session in Ubuntu 15.10, Ubuntu 14.04 and Ubuntu Derivatives. Hide guest session in Ubuntu login screen and hide users list in Ubuntu login screen.
The default Ubuntu Login (LightDM login) screen shows the users list and Guest Session. For security concerns or on personal computers you may want to disable or hide or remove the guest session/user list from the login screen in Ubuntu Systems
There is a way to disable and hide the users list and Guest Session from the Ubuntu login screen. You can add a rule into the LightDM display manager configuration file and disable the login options on Ubuntu Systems – Ubuntu 15.04, Ubuntu 14.04, Ubuntu 14.10 and Derivatives.
Step 1 – Install GKSu
I assume you have installed GKSu. The GKSu can be insatlled via Ubuntu Software Center. Open Ubuntu Software Center and search for gksu and install it.
GKSu is a Gtk+ frontend to su and GKSudo is a frontend to sudo. Their primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly.
If no command is given, the gksu program will display a small window that allows you to type in a command to be run, and to select what user the program should be run as.
Step 2 – Edit LightDM Configuration File
Open terminal and run the following commands to edit the LightDM display manager configuration file:
gksu gedit /etc/lightdm/lightdm.conf
Hide The User List From Ubuntu Login Screen
To hide the Ubuntu login screen user list, paste the following code in the file:
[SeatDefaults] greeter-hide-users=true
greeter-show-manual-login=true
Disable The Guest Session From Ubuntu Login Screen
To disable the Ubuntu login screen Guest Session, paste the following code in the file:
[SeatDefaults] greeter-session=unity-greeter
allow-guest=false
Then save the file and restart your computer to apply changes.
You can also add the two codes in one.
[SeatDefaults] greeter-hide-users=true
greeter-show-manual-login=true
allow-guest=false