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.

  • What desktop environment are you using? Feb 5, 2015 at 5:13
  • I'm using Unity.
    – Abhimanyu
    Feb 5, 2015 at 13:08

4 Answers 4


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

  • I have enabled automatic login. Now whenever I boot Ubuntu, I'm logged in automatically (duh). But that's not what I want! I want precisely the opposite thing: being asked for a password . . .
    – Abhimanyu
    Feb 7, 2015 at 14:31
  • 1
    if you want the password prompt to log in , then turn automatic login off Feb 8, 2015 at 0:08
  • . . . Automatic login was off at the time of posting this question . . . You told me to turn it on and now you're telling me to turn it off . . . What's the point?
    – Abhimanyu
    Feb 8, 2015 at 2:53

System -> Administration -> Login Screen

and then tick

show the screen who will login

  • What do you mean by System? System Settings? There's nothing like Administration in System Settings...
    – Abhimanyu
    Feb 5, 2015 at 13:04

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


leaving just

  • nice one, worked for me, +1 :)
    – Sohel0415
    Feb 27, 2018 at 16:40

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.