11

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.

Abhimanyu
  • 1,423

4 Answers4

18

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...

Abhimanyu
  • 1,423
3

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

1

System -> Administration -> Login Screen

and then tick

show the screen who will login

1

I had the same issue under Xubuntu 16.04 and the solution for me was inspired by this answer.

I had to

sudo nano -w /etc/lightdm/lightdm.conf

and then remove the last two lines from

[Seat:*]
autologin-guest=false
autologin-user=gord
autologin-user-timeout=0

leaving just

[Seat:*]
autologin-guest=false