13

When I first installed Ubuntu I choose NOT to ask me for a password at login. That was ok for that moment cause it didn't ask me any password at login. But now I want to be asked for a login password. I changed the settings to Not start automatically but it doesn't work. My Ubuntu doesn't ask me password at login. What should I do now?

In the automatic login box (in the user accounts setting window) I have it checked to off (0 or Off), the thing is that my LightDM login screen gives me only a "Start Session" button below my user name, instead of the usual password field.

4
  • Can you try checking the box as that answer recommends? Jan 30, 2012 at 21:54
  • In the automatic login box (in the user accounts setting window) i have it checked to off (0 or Off), the thing is that my LightDM login screen gives me only a "Start Session" button below my user name, instead of the usual password field.
    – Ubu
    Jan 30, 2012 at 22:02
  • no updates yet??
    – Ubu
    Feb 1, 2012 at 21:57
  • I've got a similar problem. I got a computer with Ubuntu which I hadn't ever used before. Initially, I disabled the function of using password upon log-in, but then changed my mind and set a password in Terminal. The result is that when logging in, I'm never asked for password. I spent hours searching in forums for help and found that lots of people had issues with passwords. Automatic login option in System Settings is Off. I've established and disabled various keyrings, but nothing changes. I used the command "sudo gpasswd -d username nopasswdlogin". No change. As an ultimate irony, when the
    – user152977
    Apr 27, 2013 at 18:01

3 Answers 3

25

Thanks to user sisco311 from ubuntuforums.org for this answer.

I didn't try it but the link posted above shows a command line:

sudo gpasswd -d $USER nopasswdlogin 

that should work. I did it using the GUI.

The thing is that my user was in the nopasswdlogin group. I had to install the gnome-system-tools which has the GUI to manage users and groups. Then I ran the users-groups manager and change my user to NOT be part of the nopasswdlogin group. Problem Solved. I do have a remaining question: why or how did my user got into that group?

1
  • Awesome. Thanks for the info. Had a heck of a time finding this for some reason. For those gui users who don't know, find the terminal program in your program list (or for unity-like search for term). You can then use the above command without extra tools. I also did try searching for the reference of lightdm.conf (like the next post), but in my setup I didn't have that file (my sons pc is setup with edubuntu).
    – SiLeNCeD
    Aug 19, 2014 at 2:15
4

On distributions that use lightdm (xubuntu, ubuntu-studio, ...) you can simply edit

/etc/lightdm/lightdm.conf

If you want user "blah" to auto-login, add the line:

autologin-user=blah

If you want to be prompted for a password when the system boots, just remove that line, or comment it out (ie. place a # sign at the beginning).

1
  • This helped me. Removing user from nopasswdlogin did not help. Sep 12, 2016 at 12:51
2

To add a user to nopasswdlogin group: sudo gpasswd -a $USER nopasswdlogin

To remove a user from it: sudo gpasswd -d $USER nopasswdlogin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .