By default ubuntu 12.04 comes with guest account.You can disable this account using the following procedure.Guest account is a paswordless account which allow users to get access to Ubuntu machine
Open /etc/lightdm/lightdm.conf file from your terminal using the following command
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line
allow-guest=false
Save and exit the file
After adding the above line you should see similar to the following in lightdm.conf file
[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
Finally you have to restart lightdm using the following command from your terminal
sudo restart lightdm
Note:- After executing above command all graphical programs running will be closed (Thanks to sergio)
Incoming search terms:
- ubuntu disable guest account
- ubuntu disable guest
- disable guest account ubuntu
- disable guest account ubuntu 12 04
- ubuntu remove guest account
- ubuntu guest account
- how to disable guest account in ubuntu
- remove guest account ubuntu
- disable guest ubuntu
- ubuntu disable guest login





You might add to this the fact that there is a bug in lightdm that affects some of us that causes lightdm to ONLY boot to the guest account unless the above action is taken.
[Reply]
Please add a warning saying that after executing sudo restart lightdm all graphical programs running will be closed.
[Reply]
ruchi Reply:
May 10th, 2012 at 3:32 pm
Thank you and i have updated in the main article
[Reply]
Thanks a lot for this piece of information.
[Reply]
Thanks a lot. I have to do it. Thanks very much.
[Reply]
Hi,
I’ve made the changes but guest account is not disabled mean it’s login.
Thanks,
–Kalimuthu
[Reply]
Sarthak Reply:
May 7th, 2013 at 11:55 pm
Copy paste the below lines. It will work.
[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
[Reply]
Thank you for this. All I really wanted was to prevent my kids from guest login w/o permission. So, I really wanted to just be able to make it like 10.04LTS, where I’d have to be logged in to allow the guest access; but, this works just fine.
However, if you know how to allow guest access from an admin account please let me know. So far, this is the only option I’ve found. Thanks
[Reply]
Thanks, works fine!
[Reply]
As danrgmc says, there’s a bug in lightdm, it only boot in guest account.
For writing that file, we need the default root password. Do you know what is the default root password in the prebuilt images?
[Reply]
@Alberto:
There is nothing as such as a default root password in Ubuntu. The OS was designed to enforce the use of your user account, rather than using root for every admin task. Instead the system relies on SUDO to run any process that requires root privileges. In plain english, it means that to run any process requiring root privileges, you must use the following syntax:
#sudo + command + commmand’s options
e.g: sudo apt-get dist-upgrade
You will then be asked for the admin password, which is in fact your own user account password, the one you’ve created when you installed the system for the first time. That account was automatically added to the admin list in SUDO (/etc/sudoers – don’t mess with this file unless you know exactly what you’re doing!)
Having said that, sometimes it can be obviously annoying to not being able to log in as root. To do so, you must first ‘activate’ that account, which consist in allocating a password to root :
#sudo passwd root
Then enter your new password (a strong one).
Now the root account is ‘activated’ and you can use the command “su – root” to open a shell session with root.
Opening a new shell session with “su” is a safer way to use the system than to log on as the root user, something I personally do not recommend.
Of course, if you make a mistake when using the root account you will feel sorry for yourself…
With great power comes great responsibilities. ;o)
[Reply]
thanks alot, but i cannot edit lightdm.conf
i don’t have permission for that
what should i do?
[Reply]
Thanks.
[Reply]
Thanks!
[Reply]