How to Remove Guest Session in Ubuntu 16.04 Login Screen

April 14, 2016 — 3 Comments

Remove Guest Session

This is a quick guide for beginners that shows how to remove / disable the Guest account login from Ubuntu 16.04 Unity Greeter.

LightDM configuration files are located in /usr/share/lightdm and /etc/lightdm. Disabling Guest account can be easily done by adding a rule into one of the two directories. And below I made a change in /etc/lightdm:

1. Open terminal from Unity Dash, or via Ctrl+Alt+T combination key.

When it opens, paste below command and run to create a sub folder:

sudo mkdir /etc/lightdm/lightdm.conf.d


Type in your password (no visual feedback on typing) when it asks and hit Enter to continue.

2. Running below command to create a “50-no-guest.conf” file under this folder and write the rule allow-guest=false.

sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" > /etc/lightdm/lightdm.conf.d/50-no-guest.conf'


Now restart your computer and the Guest session disappeared.

Guest Session Removed

3. To revert the changes, just remove the configuration file via command:

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

That’s it. Enjoy!

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to

3 responses to How to Remove Guest Session in Ubuntu 16.04 Login Screen

  1. Michael Edwards May 27, 2016 at 4:46 am

    On my install of Ubuntu 16.04 (amd64) the location of the lightdm.conf.d directory is in /usr/share/lightdm.. so use the following command:

    sudo sh -c ‘printf “[SeatDefaults]\nallow-guest=false\n” > /etc/lightdm/lightdm.conf.d/50-no-guest.conf’

    and to remove:

    sudo rm /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf

  2. Hi Guys,

    On the latest official release in Ubuntu 16.04, they changed
    [SeatDefaults] to [Seat:*]
    Using the first one gives nothing or a bug.

    That change in the syntax can be checked in the other files in

    If other files show [Seat:*] instead of [SeatDefaults], the 50-no-guest.conf file is to be filled up as following:


    That change was initially found by Thee Mahn, builder of Linux Ultimate Edition. Latest version is 5.0 and I suggest anybody to have a blink on it.

    Hope this will help.

Leave a Reply


Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>