The official definition of guest session goes as follow: This package adds support for starting a guest session through gdm’s flexiserver, which any already logged in user can launch. It creates a temporary guest account with a temporary home directory and some restricted privileges (such as not being able to read any home directory or do any permanent change to the system). However, you would like to disable the guest session feature for some reason. This how-to tutorial will tell you how to disable/enable guest sessions on Ubuntu 16.04 LTS. Step 1. Open a terminal session (Control+Alt+T) and go to lightdm configuration directory /etc/lightdm/lightdm.conf.d Step 2. With sudo access, using vi editor open a file with name 50-no-guest.conf as follows: Step 3: When the new file opens, add below lines and exit after saving the file.
[SeatDefaults] allow-guest=false
This will create the new file name 50-no-guest.conf in /etc/lightdm/lightdm.conf.d directory. Step 4: Restart the machine, that’s it. You won’t see guest sessions anymore on the Ubuntu. In case you would like to restore the guest session, just remove the file 50-no-guest.conf from the directory /etc/lightdm/lightdm.conf.d and restart the machine. You will get the guest session back!
Conclusion
Anyone who uses the guest session to sign in to your Ubuntu machine has no privileges to change the file belonging to other users. However, there was a security issue reported earlier with a lightdm package that allows a guest user to access restricted files of the system. You may feel that having a guest account does not make sense when you know that you are the only person who accesses your Ubuntu machine. In either case, I hope this tutorial helps you to get rid of the guest account.