How to Remove Guest Session in Ubuntu 16.04 Login Screen

Last updated: April 14, 2016

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

lightdmconf

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'

allow-guest

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!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

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
    /usr/share/lightdm/lightdm.conf.d/

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

    [Seat:*]
    allow-guest=false

    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.

    • Great ! .This one worked. The [Seat:*] was a new changed. Thankfully some had noticed. Thanks for the help.