This article is going to take you through on how to enable and disable automatic login on Ubuntu 22.04. The automatic login feature allows a user to log in without entering a password. When you install Ubuntu, you can choose whether or not to use a password to log in to the system in which that option can be changed later.
How to enable and disable automatic login on Ubuntu 22.04
This article is going to show you how to enable and disable automatic login on Ubuntu 22.04 using two methods;
Enable and disable automatic login on Ubuntu 22.04 using GUI
- On the application menu, search for users then click it to open users settings as shown below.
- Next click the user name you want to enable and disable automatic login(In my case I will select Ubuntu desktop). Then on the top right side click unlock button.
- You will be required to enter your user password to continue.
- You should now be able to toggle Automatic Login button to enable or disable.
- Restart your system for changes to take effect.
Enable and disable automatic login on Ubuntu 22.04 using Terminal
- To enable and disable automatic login on Ubuntu 22.04 using terminal, start by opening the following file.
sudo nano /etc/gdm3/custom.conf
Sample file that will open
# GDM configuration storage # # See /usr/share/gdm/gdm.schemas for a list of availa> [daemon] # Uncomment the line below to force the login screen > #WaylandEnable=false # Enabling automatic login # AutomaticLoginEnable = true # AutomaticLogin = user1 # Enabling timed login # TimedLoginEnable = true # TimedLogin = user1 # TimedLoginDelay = 10 AutomaticLoginEnable=False AutomaticLogin=kigz [security] [xdmcp] [chooser] [debug] # Uncomment the line below to turn on debugging # More verbose logs # Additionally lets the X server dump core if it cras> #Enable=true
- You will get the AutomaticLoginEnable set to false with your user name e.g.
- Change it to true to enable it as shown below.
ctrl+sto save the file and
ctrl+xto close the file.
- Then reboot your system for changes to take effect.
- To disable automatic login, repeat the above process and change true to false then reboot your system.
- You can also enable automatic login for other users. Under the enabling automatic login option that is commented out, uncomment by removing the
#from the file and replace user1 with your user name. The uncommented option should like the one below.
# Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = ubuntudesktop
- Save the file and reboot your machine.
- In case you want to disable the automatic login just comment out the uncommented part above
# Enabling automatic login # AutomaticLoginEnable = true # AutomaticLogin = ubuntudesktop
- Then reboot your system to make the changes.
- You have reached the end of the article, Congratulations. You have learned how to Enable and disable automatic login on Ubuntu 22.04.
Read more on Ubuntu Documentation
Install Docker on Ubuntu 22.04
Install VS Code Editor on Ubuntu 22.04
1 thought on “Enable and disable automatic login on Ubuntu 22.04”
Maybe tell someone to install gdm3…..