How to Disable the Guest Session Account in Ubuntu

How to remove guest session from the login options on ubuntu.

1486 views

Edited: 2017-04-10 21:43

Disable Ubuntu guest session

To disable the guest session account on Ubuntu, the first place one would expect to look, is in the account manegment tool – but for some reason the option is missing – fear not! All you need to do, is to edit the /etc/lightdm/lightdm.conf file in you ubuntu installation.

To edit the lightdm.conf file, simply open a new terminal window and enter the below command:

gksudo gedit /etc/lightdm/lightdm.conf

Doing this will pompt you for your password to edit the file. After typing your password, you can edit the file. The content of the file should look like below:


[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter

Now, to disable the guest option from the login screen, simply place the following somewhere last in the file.

allow-guest=false

Thee are two ways to make the changes thake effect, either you need to reboot your computer – which is a small inconviance – espicially if your disk is encrypted, and you need to re-enter your encryption key on each reboot – the other way is to restart lightdm by entering the below command

sudo restart lightdm

If you later want to re-enable your guest account, all you need to do is to go through all the above steps, only backwards.

Video

Tell us what you think:

  1. Understanding file permissions in Unix / Linux based systems, and how to make files immutable.
  2. How to search a directory and subdirectories for a given string of text in Linux with the grep command.
  3. Worth knowing in order to make a bootable USB memory stick with Windows on from Linux.
  4. This is why I decided to encrypt my new Flash Drive, and why I think you should too.
  5. About the problem with using sudo with graphical programs in Linux.

More in: Linux Tutorials