Ubuntu is a popular Linux distribution and one of the most popular operating systems in the world. It’s also one of the most popular distributions for guest sessions, which are accounts that are used by people who don’t have full access to the system. Guest sessions can be used to run programs that you wouldn’t be able to run on the main system, or to use software that is not available on the main system. There are a few ways to disable Ubuntu’s guest session account. One way is to edit ~/.profile and add a line that says “no guest session”. Another way is to use sudo apt-get remove -y gdm3 && sudo apt-get install gdm3 . The last way is more complicated and requires root privileges. The first way works if you have an Ubuntu 14.04 or 15.10 computer and you want to disable Ubuntu’s guest session account. To do this, you need to open up your computer’s Settings panel and go to Accounts > Users > Guest Session > Disable . You will need to enter your user name and password for the account you want disabled, and then click on Disable . If everything goes well, your computer will start up without any problems and your Guest Session Account will be disabled. If there are any problems, you can try again later by opening up your computer’s Settings panel and going back into Accounts > Users > Guest Session > Enable .


Ubuntu and Linux Mint come with a “Guest Session” account, which anyone can log into from the login screen – no password required. If you’d rather restrict access to your computer, you can disable the guest account.

This guest account is locked down and changes to it don’t persist between sessions – everyone that logs in gets a fresh desktop. Still, you may want to disable it to prevent other people from using your computer.

Disabling the Guest Account

Ubuntu doesn’t expose an easy option to disable this feature. If you poke around the User Accounts configuration tool, where you might expect to find such an option, you won’t find one. To disable it, we’ll have to edit lightdm.conf, which controls the LightDM display manager (login screen)’s settings.

Open LightDM’s configuration file in a text editor by pressing Alt+F2, typing the following command, and pressing Enter:

You’ll be prompted to enter your password. After you do, you’ll see the contents of the file.

Add the following line to the end of the file, in the [SeatDefaults] section:

Save the file after adding the line.

The changes will take effect when you restart your computer. You can also run the following command in a terminal to restart LightDM and have the changes take effect without restarting your system:

Warning: Running this command will restart your graphical desktop environment. All open graphical programs will close and you’ll lose unsaved work in all of them.

After restarting the computer or running the command, the Guest Session will vanish from your login screen.

Re-Enabling the Guest Account

To re-enable the guest account in the future, run the gksu gedit /etc/lightdm/lightdm.conf command again and remove the allow-guest=false line from the file. After you do, save it and restart your computer (or run the above sudo restart lightdm command) and the guest account will re-appear.