Open terminal using shortcut Key “ctrl+alt+t”. Type this in the terminal.
gksudo 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 account is disabled.
That’s it the guest account is no longer usable.
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
Ubuntu Tweak is an application to config Ubuntu easier for everyone. It provides many useful desktop and system options that the default desktop environment doesn’t provide with its help, you will enjoy with the experience of Ubuntu!
Install ubuntu-tweak, get to the tweak tab, turn off the guest button and reboot. That’s it!