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!
|
|
Updated: 2016-Aug For Ubuntu 16.04 LTS (15.10 or later)Adapted from: LightDM Ubuntu Wiki - Configuration
Just run this (once) at terminal:
To undo (restore Guest option), remove the file created:
For Ubuntu 14.04 LTS (up to 15.04)Adapted from: Ubuntu Forums - lightdm config files location in 14.04 Just run this (once) at terminal:
You will no longer have 'Guest' as login option, on your next login. To undo (restore Guest option), remove the file created:
For Ubuntu 12.04 LTS (up to 13.10)Simplest method. Just run this (once) at terminal:
You will no longer have 'Guest' as login option, on your next login.
To undo (restore Guest option):
|
|||||||||||||||||||||
|
If you're using the default LightDM, edit
If you're using GDM (which was the default in previous Ubuntu releases), uninstall gdm-guest-session. For Ubuntu 13.10 to 14.10, the file has moved to For Ubuntu 14.10 or higher, the file has moved to
|
|||||||||||||||||||||
|
|
Change You can then either reboot or restart the service in the terminal:
Assuming you are using |
||||
|
|
How to disable this option in the futureI just ran into the same problem on my new trusty/14.04 installation. Also to my surprise I couldn't find the Investigation
Aha, there you are. What's in there?
Okay, what's in there?
ConclusionWe find a bunch of configuration files similar to the INI format following the naming scheme of We're not going to edit any of these files as these are meant to be managed by the package manager, but now we how we should add and manage our custom configuration bits to SolutionGiven the above, that lightdm is the display manager and the configuration files look like the above. The following solution should work:
Further reading |
|||||
|
|
You can do that using Ubuntu Tweak. To install it, use these commands:
After installing, navigate to Tweaks → Login Settings and switch off the "Guest account".
|
|||||||||
|
|
Open Terminal
Add the following line
Save and exit the file. |
|||||||||
|
13.04 and later
Apparently, it works in 13.10 (can't test myself, but there's a comment here). I'm using 13.04 and all this does it append Originally by david6 from here: https://askubuntu.com/a/169105/176889 |
|||||||||
|
|
For Ubuntu 13.10, add
to the file |
||||
|
|
|
I'm in the same case, the file I try to create the I try to edit the file Edit the file
And enter the lines that you need
And the last one, restart your system
I think that this works fine if you restart only the ligthgdm
|
||||
|
|
|
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. |
|||
|
|
|
Type this in the terminal
You will see the following:
Add
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!)
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. |
||||
|
|
|
Just run
Add the following line
Then (this will immediately log you out, quitting any programs running in your graphical session, so save your work first):
|
||||
|
|
protected by Community♦ Nov 29 '11 at 11:56
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
