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
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
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.)
Best Answer
Try this. To disable autologin, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
In the fist few line, you will see something like
autologin=username
change it to the original state of# autologin=dgod
. Save the file, and then reboot your machine.Also try to go to System Settings --> Users and Groups, click on change next to Password
Make sure that the box is unchecked next to Don't ask for password on login
Try to edit
sudo leafpad /etc/lightdm/lightdm.conf
with these contents:Remove or comment out the following lines
For 14.04 everything works. The
/etc/lightdm/lightdm.conf
doesn't exist in 14.04, but the other ways work. See image below: