I used to have a password prompt but then I, from somewhere in User Accounts, unchecked "Require a password for login." Now, I want Ubuntu to prompt for a password again at login screen, mainly because I have to manually unlock the login keyring whenever I access Dash or other services, which is a pain at best.
I also searched another question, namely How do I get Ubuntu to ask me for a password at login again?. It was of no help because the OP's question is "I have a password but Ubuntu doesn't ask for it."
Also, the two answers provided there don't solve my problem at all. They discuss completely other things.
Is there no simple mechanism? Because intuitively, if there's a checkbox option to bypass password requirement, there should be an equally hassle-free facility to again require the password.
Well I found what was wrong. As I made clear, I had a password. Terminal asked for a password when I attempted a
sudo
command. Automatic login was already off, but Ubuntu just didn't ask for password even if it prompted for choosing the user at login screen. I could just click on my username and it will log me in without a password.I was placed in "no login password" group. I did this command:
sudo gpasswd -d myusername nopasswdlogin
And I was removed from this group. Now my account asks for password...
Start by going into System Settings, Then into User Accounts and Click Unlock in the top right corner ( you will be prompted for your user's/root password).
Then select your user from the list on the left of the window then toggle "Automatic Login" to 'off' , when you are done , be sure to re-click Lock in the top right corner
System -> Administration -> Login Screen
and then tick
show the screen who will login
I had the same issue under Xubuntu 16.04 and the solution for me was inspired by this answer.
I had to
and then remove the last two lines from
leaving just