Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I disable the guest session in Ubuntu 11.10 or higher? I don't want people to be able to use my computer without using a password to log in!

share|improve this question
Please note that the techniques for disabling this in Ubuntu 11.10 will also work in Ubuntu 12.04 LTS (and probably in future versions). – Eliah Kagan Jun 12 '12 at 1:58

6 Answers

up vote 59 down vote accepted

If you're using the default LightDM, edit /etc/lightdm/lightdm.conf so that it looks like this:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
allow-guest=false

If you're using GDM (which was the default in previous Ubuntu releases), uninstall gdm-guest-session.

share|improve this answer

Type this in the terminal

gksu gedit /etc/lightdm/lightdm.conf

You will see the following:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu

Add allow-guest=false to the end so your final result should look like:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
allow-guest=false

Save the document and quit the text editor.

Back in the Terminal, restart the display manager. (This will end the graphical login session, immediately quitting all programs running in it, so make sure your work--like any open documents--is saved first!)

sudo restart lightdm

With the graphical login session ended, you're returned to the login screen, where you'll notice that guest acount is disabled.

That's it--the guest account is no longer usable.

share|improve this answer

Simplest method.

Just run this (once) at terminal:

sudo /usr/lib/lightdm/lightdm-set-defaults -l false

You will no longer have 'Guest' as login option, on your next login.

  • This simply appends allow-guest=false to /etc/lightdm/lightdm.conf.

  • Confirm works on Ubuntu 12.04; should work for 11.10 and upwards (since those versions use LightDM as well).

To undo (restore Guest option):

sudo /usr/lib/lightdm/lightdm-set-defaults -l true
share|improve this answer

Just run

gksudo gedit /etc/lightdm/lightdm.conf

Add the following line

allow-guest=false

Then (this will immediately log you out, quitting any programs running in your graphical session, so save your work first):

sudo restart lightdm
share|improve this answer

Change allow-guest=trueto 'false' in /etc/lightdm/lightdm.conf

You can then either reboot or restart the service in the terminal: sudo restart lightdm

This is assuming you are using lightdm which is standard in 11.10.

share|improve this answer

Install ubuntu-tweak, get to the tweak tab, turn off the guest button and reboot. That's it!

One may find the terminal easier, but in case the need to turn on the guest account arises then one would have to visit this page again and see the instructions (or rather undo). That's the advantage of the GUI thing... one remembers it easily.

share|improve this answer

protected by Community Nov 29 '11 at 11:56

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.