How to disable Guest Login On Ubuntu and its Flavours



If you are having trouble disabling guest login on Ubuntu or Lubuntu 16.04+ know that you are not alone, this happened to many users, after editing the lighdm configuration file adding some lines your machine may not boot up, you must have to use live usb/cd to edit that configuration file and remove what you’ve added.

Now lets get on how to remove the guest login simply:

Check /usr/share/ or /etc/lightdm to see if lightdm folder is there, or you can run the command below to create the folder, if its there it will tell you that it has existed.

sudo mkdir /etc/lightdm/lightdm.conf.

Type your password and you are done, After that you need to create “50-no-guest.conf” under this folder. to do that run the command below.

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

Now you have to restart your system and you are done.

If you want to revert this changes execute the command below.

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

this will delete the configuration file, and you can have the guest login back, remember you have to restart your system for the changes to take effect.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s