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.

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
Ubu
  • 381

3 Answers3

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?

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
Ubu
  • 381
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).

Seth
  • 59,332
dolt
  • 375
2

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

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

Pujan Dave
  • 21
  • 1