I'm running a fairly clean install of 12.04. I haven't really installed much software, only VMware tools as I'm running it on a Windows host using VMware workstation.

I am trying to enable automatic login just to save some time more than anything else.

If I go to System Settings > User Accounts I can see my user account in the list but no option to enable automatic login. Even if I unlock it still does not show it.


If I create a new user account the auto login option is displayed for that user account only. If I assign a password then I can enable the auto login option. As well as a 'Standard' user I also tried creating an 'Administrator' account to see if it would work and it does.


Any thoughts anyone?


As a quick test I decided to see if creating a new Administrator account and logging into it would make the auto-login available for my admin account. It does, so I tried unlocking and switching auto-login on. However when I rebooted it did not auto-login, and just went to the login screen as normal.

Is it a security feature of Ubuntu or something to not allow auto-login for Administrator accounts because of the security risks?


If I create a new Administrator account, assign a password and enable auto-login it works as intended. Something else I noticed is that when it carried out the auto-login for the new account it automatically executed /usr/bin/vmware-user which enables VMware tools features like auto-resizing of desktop etc.

This does not get executed automatically when I log in to my original account (I have just always worked around that seemingly separate issue by adding it as a Startup Application). I would guess this means that the real issue is something to do with my user account rather than a problem with lightdm.


I have now fixed this. Apparently I have to wait for another 4 hours before I'm allowed to answer my own question because I'm a new user....answer will be posted then.


Found the cause of this one. I fired up a new blank VM with a view to installing Ubuntu on it and seeing if the issue persisted in a fresh install.

During the install process, on the "Who are you?" screen you get the option to "Log in automatically". You also get the option to "Encrypt my home folder".

I have encryption enabled on the original VM. It appears that you cannot use automatic login if you are using home folder encryption. (The installer will not let you select them both together, it automatically deselects the auto login if you select encryption and vice versa).

I found this post about deactivating home folder encryption. http://ubuntuforums.org/showthread.php?t=1134121

From my original account i did the following:

I opened a terminal (Ctrl-Alt-T).

I issued sudo su to become root.

I issued cp -rp /home/user /home/user.backup to take an unencrypted copy of the home directory (replacing user with my actual username).

while doing the copy i received the error message:

cp: cannot stat /home/tom/.gvfs': Permission denied

I just ignored it. Everything seemed to be copied ok.

I issued gedit /etc/default/grub so I could comment out the lines



I saved, exited gedit and issued update-grub to update GRUB.

I rebooted the VM and selected

Ubuntu, with Linux 3.2.0-26-generic-pae (recovery mode)

from the boot menu. When the Recovery Menu appeared I selected "root".

From the prompt I issued mount -rw -o remount / to remount the root partition with read/write permissions.

I issued rm -rf /home/user to delete the home folder (replacing user with my actual username).

I did not use apt-get to remove ecryptfs-utils as I might want to encrypt the home folder of another user account at a later date.

I issued cp -rp /home/user.backup /home/user to recreate the home directory from the unencrypted backup (replacing user with my actual username).

I issued rm /home/user/.ecryptfs and rm /home/user/.Private to remove the symlinks (replacing user with my actual username).

I issued rm -r /home/.ecryptfs/user to remove the encrypted home folder (replacing user with my actual username).

I issued reboot now to reboot the VM. Doing this returns you to the Recovery Menu; if you wait a few moments it will reboot.

I selected

Ubuntu, with Linux 3.2.0-26-generic-pae

from the boot menu (i.e. to boot normally).

Once booted I went into User Accounts. The auto-login option was now available. I unlocked, cleared up the test accounts, enabled auto-login and rebooted. It worked.

I used gedit to edit /etc/default/grub and return it to normal. (Don't forget to update-grub after editing.)


fisrt open /etc/lightdm/lightdm.conf (in case you use lightdm as your display manager) then add the following

autologin-user=Your User Name    

Now save the file and restart lightdm

sudo service lightdm restart
  • When I opened lightdm.conf it already had the entry in there, presumably from when I enabled auto-login using the newly created Administrator account. I added the autologin-user-timeout=0 line for good measure, but it still just comes to the login screen at boot up. – cowgoesmoo Jul 12 '12 at 9:36

I think the issue here (from your screenshot) is that you have created 2 account and both are enabled. For auto login you should only have one account enabled.

Try to disable one of the accounts and you will see the option to select Auto-logon,

  • No, I deleted the test account before creating the new Administrator account that I subsequently used to enable auto-login on my original account. Also, the User Accounts dialog will not let you have auto-login selected for more than one account at a time. – cowgoesmoo Jul 12 '12 at 10:39
  • OK, My answer was based what I saw on the screen shot. Did you have a look at the "possible duplicate" link provided above? – stephenmyall Jul 12 '12 at 10:42
  • Thanks for the suggestion, I think the real issue is probably with the original user account as new accounts behave correctly with auto-login and auto-execution of things like VMware tools, which doesn't happen properly when logging into the original user account. I guess I'll have to reinstall as I don't know where to start looking for problems relating to user accounts. – cowgoesmoo Jul 12 '12 at 10:52

Open this file with root /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf

Then append the following code:


Remember to replace username with your username.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.