I had enabled automatic login for the primary user when I installed Ubuntu. This means that the primary user still has a password, but does not need it during login or when unlocking. After using Ubuntu for a few days, I decided that the primary user needed to have normal login using password.
The typical way to disable automatic login is to go to System Settings > User Accounts. Click on the primary user, unlock the dialog and disable the Automatic Login option. I did this, but Ubuntu would still allow the primary user to login without a password.
The User Accounts dialog is not actually disabling automatic login. To disable it correctly, open the
/etc/group file as
sudo. Find a line that reads
joe is your username. Delete this line and automatic login should be disabled now.
Tried with: Ubuntu 14.04