How to disable Ubuntu’s guest session account – remove guest account in Ubuntu 16.10 login. Learn how to disable guest account in Ubuntu 16.10 Systems.
Disabling Guest Session
Method 1
Ubuntu users can restrict guest access. They can disable the Guest Session feature on Ubuntu System. To do so, open Terminal {press Ctrl+Alt+T} and run the following command:
sudo sh -c 'printf "[Seat:*]\nallow-guest=false\n" >/etc/lightdm/lightdm.conf.d/50-no-guest.conf'
When you execute the above command it creates a configuration file. To apply the changes, restart the system.
Method 2
Ubuntu users can create the configuration file manually and paste the code to restrict guest access.
sudo apt install gksu
gksudo gedit /etc/lightdm/lightdm.conf.d/50-no-guest.conf
When the file opens {blank}, paste the code given below and save the file and exit.
[SeatDefaults]
allow-guest=false
Re-Enabling Guest Session
Ubuntu users can re-enable Guest Session on Ubuntu Systems by removing that configuration file. To do so, run the command:
sudo rm /etc/lightdm/lightdm.conf.d/50-no-guest.conf