Disable guest account in Ubuntu 12.04

Guest account is enabled in Ubuntu 12.04 by default so that anyone can log in with guest account without a password.Below steps will show you how to disable guest account in Ubuntu 12.04(LightDM)

1.Open a terminal by pressing Ctl+Alt+t or searching “terminal” from Dash

2.Open file /etc/lightdm/lightdm.conf using below command in terminal

sudo gedit /etc/lightdm/lightdm.conf

3.Append below line the this file ,then click Save and exit

allow-guest=false

4.Restart service lightdm using below command from your terminal

sudo service lightdm restart

Note:All your running GUI applications will be closed

5.You are done,guest account is disabled.You will not see Guest Session on log-in screen now.

6 thoughts on “Disable guest account in Ubuntu 12.04

  1. Unable to save lightdm.conf

    for disabling guest user i have type
    sudo gedit /etc/lightdm/lightdm.conf
    then it opens a file i add new line
    allow-guest=false
    but after it i am unable to save this file error is
    “this is read only file unable to change”
    Please help

    Reply
    1. Admin Post author

      Please run below command in your terminal then try again.

      sudo chmod u+w /etc/lightdm/lightdm.conf
      Reply
  2. Nikolay

    Not working here, I still see “Guest” on the login screen.
    I’ve edited the file, saved it, restarted lightdm, but the Guest is still there.
    Any ideas?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *