How to disable autologin in Lubuntu?
I like to switch sometimes between Lubuntu and Ubuntu 2D on my laptop. But I especially like to choose which one I will use in the session I am about to start. But the only way of choosing is start the laptop up, and the last used thing will show up (as it should), then log out completely, and choose the other thing from the login menu.
I have spent a lot of my lifetime using Windows, and always I was asked a login BEFORE I actually could do anything. Now I think it is weird that anyone can log into a password-protected account without giving any passwords, as long as the last user was the Admin. Also: will logging out before shutdown help?
Here is my default.conf file.
Solution 1:
Try this. To disable autologin, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
sudo leafpad /etc/lxdm/default.conf
In the fist few line, you will see something like autologin=username
change it to the original state of
# autologin=dgod
. Save the file, and then reboot your machine.
Also try to go to System Settings --> Users and Groups, click on change next to Password
Make sure that the box is unchecked next to Don't ask for password on login
Try to edit sudo leafpad /etc/lightdm/lightdm.conf
with these contents:
Remove or comment out the following lines
autologin-user=username
autologin-user-timeout=0
For 14.04 everything works. The /etc/lightdm/lightdm.conf
doesn't exist in 14.04, but the other ways work. See image below:
Solution 2:
So I am using a Lubuntu 14.04.1 LTS installed on a USB stick. And this is how I managed to disable auto loging for Live Session User.
Create e new user (to use for loging): System Tools -> Users and Groups
Open console: System Tools -> XTerm
-
enter command:
sudo leafpad /etc/lightdm/lightdm.conf
the text editor should apear
-
replace line:
autologin-user=lubuntu
with
autologin-user=name_of_user_you_created
optional you could change line
autologin-user-timeout=0
to
autologin-user-timeout=60"
save and close file
reboot
for more info access: https://wiki.ubuntu.com/LightDM
After power up you should see the login screen with the user you created waiting for password.
Atention: user "lubuntu" is still there but is not presented in the dropdown list. if you want to access it you need to chose other then insert user name by hand. Also leave blank for password as user lubuntu does not have a password by deault.
Solution 3:
Ubuntu / Lubuntu 20.10:
First edit
vi /etc/sddm.conf
It looks like this:
[Autologin]
User=<your_user>
Session=Lubuntu
I assume you can just comment out the entries:
[Autologin]
#User=<your_user>
#Session=Lubuntu
Adapt and reboot