8

I am new to Linux system I am using Ubuntu-Mate Desktop. I have problem with login password, I did enable password and it asks when I try to install apps with sudo even when I log out and try to log in, but it doesn't ask when I turn on or restart computer, even though it did before but don't know what I have touch, can someone help me to enable again through terminal if possible?

singrium
  • 6,880
amir
  • 81
  • 1
  • 1
  • 3
  • Try this: sudoedit /etc/lightdm/lightdm.conf, a file will open, if you find a line like this: autologin-user=alexander (You'll find your username instead of alexander), comment it by adding # in from of it. Save an exit. – singrium Jan 11 '20 at 12:51
  • Or try this : open Control Center > Users and Groups > Select username > Change password > Uncheck Don’t ask for password on login. – singrium Jan 11 '20 at 12:53
  • 1
    The option on control center Don't ask for password it's unchecked that wasn't solution for me. But the first option to change through terminal worked great. Thank You for your time, you helped me for preventing reinstall the whole system. – amir Jan 11 '20 at 13:05

2 Answers2

10

First method:
Go to “System -> Administration -> Users and Groups” on the top panel.
Click on the user you want to set up auto-login for and click “change” on the Password field.

enter image description here

If “Don’t ask for password on login.” is checked, uncheck it.

enter image description here

Second method:
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.
NB: if you don't have that file in your system, try with /etc/lightdm/lightdm.conf.

You can edit that file by running sudo gedit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf (you can change gedit by your favorite editor).
The output of the file will look like this:

[SeatDefaults]
greeter-session=lightdm-gtk-greeter
autologin-user=username  

To enable password on login, comment the line: autologin-user=username by adding # in front of it.
Finally, save and exit.

Credit: How to Enable Automatic Login in Ubuntu

singrium
  • 6,880
0

I also succeeded second method (Mate Ubuntu 22.04) but I have a similar file:

/usr/share/lightdm/lightdm.conf.d/50-arctica-greeter.conf

I added to file next line:

greeter-session=arctica-greeter
autologin-user=myusername

Thank You Very Much!