Linux Tutorials

Remove GUEST Session From Ubuntu Login Screen

Remove GUEST Session From Ubuntu Login Screen

A guest session on Ubuntu allows having a temporary user account and access the Ubuntu machine.  The desktop of a guest session looks like it does when a regular user logs in.  Behind the scenes, Ubuntu controls the access privileges for a guest session.

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.

ubuntu login screen

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:

remove guest session
remove guest session

Step 3: When the new file opens, add below lines and exit after saving the file.

[SeatDefaults]
allow-guest=false
Picture

This will create the new file name 50-no-guest.conf in /etc/lightdm/lightdm.conf.d directory.

update lightdm

Step 4: Restart the machine, that’s it. You won’t see guest sessions anymore on the Ubuntu.

guest session
guest session

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.



LinuxAndUbuntu hosting is sponsored by massiveGRID

2 comments

ipfactor July 13, 2019 at 6:49 am

Didn’t work for me.

Reply
Shane April 2, 2020 at 8:42 pm

Used it now as a first time linux Ubuntu user. modified certain things but works perfect. Thanks so much.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This website uses cookies to improve your experience. We'll assume you're ok with this. Thank you! Ok Read More