How to disable guest login in Ubuntu desktop

Last updated on June 1, 2020 by Dan Nanni

Question: By default, Guest Login allows an anonymous person to log in to my Ubuntu desktop. While the guest login will have limited system access, I want to turn it off. How can I disable guest login in Ubuntu Desktop?

In Ubuntu Desktop, Guest Session is provided by a passwordless user account with restricted privileges. A guest login does not have any permanent home directory or UID/GID. When you log out of Guest Session, any file you created in the temporary home directory or associated UID/GID will be destroyed automatically.

Ubuntu Desktop uses LightDM display manager by default. To disable Guest Login in LightDM display manager, do the following.

Disable Guest Session on Ubuntu 13.04 or Earlier

Open the lightdm config file with a text editor.

$ sudo vi /etc/lightdm/lightdm.conf

Append the following entry to the config file.

allow-guest=false

Reboot your machine.

Disable Guest Session on Ubuntu 13.10 or Later

Open a config file at /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf, and add the following.

$ sudo vi /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf
allow-guest=false

Reboot your machine.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean