1. Never allow any Temporary User without a password to gain Access Control of your computer!
FIRST Make a policy to prevent the single user guest from making system wide changes
open text editor gksu gedit /etc/polkit-1/localauthority/50-local.d/10-desktop-policy.pkla
insert text
[guest-policy]
Identity=unix-user:guest
Action=*
ResultAny=no
ResultInactive=no
ResultActive=no
2. open terminal and start typing
sudo addgroup --system --quiet --gid 126 guest
sudo useradd -c Guest,,, -d /tmp/guest-home.UBUNTU -m -s /bin/bash -g guest guest
sudo usermod --uid 117 --gid 126 guest
to create blank password for this account:
sudo usermod --password U6aMy0wojraho guest
to create Not asked for password on login for this account:
sudo usermod --groups nopasswdlogin guest
Edit /etc/gdm/gdm.schemas
type:
gksu gedit /etc/gdm/gdm.schemas
and add guest to greeter/Include
default
<schema>
<key>greeter/Include</key>
<signature>s</signature>
<default>guest</default>
</schema>
now sudo restart gdm
NOTE: you will no longer be abel login to guest sessions from user accounts
this is the new guest session
and you will only be able to login from login screen any changes to this account will remain on logout until the computer restarts.
to restore open terminal and type:
sudo userdel guest
then sudo restart gdm
to copy your settings for guest session
sudo cp -R ~/.gconf/desktop /etc/gconf/gconf.xml.system/
sudo cp -R ~/.gconf/apps /etc/gconf/gconf.xml.system/
sudo chmod 777 -R /etc/gconf/gconf.xml.system/desktop
sudo chmod 777 -R /etc/gconf/gconf.xml.system/apps
Updated: 2016-Aug
For Ubuntu 16.04 LTS (15.10 or later)
Adapted from: LightDM Ubuntu Wiki - Configuration
- System provided configuration files in
/usr/share/lightdm/
are not intended to be user editable. Instead users should use: /etc/lightdm/
- Newer versions of LightDM (Ubuntu 15.10, or later) use
[Seat:*]
instead of [SeatDefaults]
Just run this (once) at terminal:
sudo sh -c 'printf "[Seat:*]\nallow-guest=false\n" >/etc/lightdm/lightdm.conf.d/50-no-guest.conf'
To undo (restore Guest option), remove the file created:
sudo rm /etc/lightdm/lightdm.conf.d/50-no-guest.conf
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:
sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'
You will no longer have 'Guest' as login option, on your next login.
To undo (restore Guest option), remove the file created:
sudo rm /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf
For Ubuntu 12.04 LTS (up to 13.10)
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.
To undo (restore Guest option):
sudo /usr/lib/lightdm/lightdm-set-defaults -l true
Best Answer
The guest session was intentionally disabled by default due to a security issue, where the guest session was not contained by the AppArmor profile that usually limits guest sessions. This AppArmor profile, among other things, prevents a guest user from using
su
to switch to other users, or viewing other users' home directories.You can enable it, if you consider the issue to be manageable on your system, as explained in comment #24 of the bug report or by using this one liner:
To reverse it back to the disabled state, simply do: