Disable, Remove Guest Account in Ubuntu 16.10 Login Screen

Remove Guest Login

For personal computers, one of the first things to do on a fresh Ubuntu installation is to disable or remove the Guest Account from Unity Login Screen.

And this quick tutorial is going to show you how to do it in Ubuntu 16.10 Yakkety Yak.

The default configuration files of the LightDM display manager are located in /usr/share/lightdm and /etc/lightdm/. Changes to the former location will be overridden when an upstream update of LightDM is available.

So below is how to edit the configuration file under /etc/lightdm/ to disable Guest Account:

1. First open terminal (Ctrl+Alt+T) and run command to install gksu:

sudo apt install gksu

gksu is graphical front-end for su to allow users to run graphical applications from terminal via root user privilege.

2. Run command to create and open a configuration file for LightDM using Gedit text editor:

gksudo gedit /etc/lightdm/lightdm.conf.d/50-no-guest.conf

When the blank file opens, paste below lines and save it:

[SeatDefaults]
allow-guest=false

disable-guest

That’s it. You won’t see the Guest Account any more.

Restore:

For any reason you want to restore the Guest Account, just remove the configure file you created via command:

sudo rm -rf /etc/lightdm/lightdm.conf.d/50-no-guest.conf

And the Guest session reappear at next boot.