Table of Contents
In general, users are required to authentication before logging on to a Linux device. This helps in ensuring that sensitive and personal information on the device is safe.
But, if you are so sure that the Linux system is placed in a secure environment and can be adequately monitored, then you can enable automatic login for your Linux device.
Automatic Login Greyed Out in Ubuntu
But when you enable automatic login from Users settings window as shown below. As you can see, the option to disable automatic logon is grayed out.
To do this, you will have to click on the button as shown below in order to change the user settings. Then you will be prompted to enter your password to apply the changes. Without entering the password, you will not be able to enable the automatic logon.
Upon authentication, you should be able to switch on the Automatic login as shown below. That is all that is needed to enable automatic login in Ubuntu.
Enable automatic login using Terminal
Alternatively, you can enable automatic login using Terminal instead of using GUI.
1. Open Terminal then run the following command:
sudo nano /etc/gdm3/custom.conf
2. In the custom.conf file opened, you will have to uncomment some selected lines out by removing the pound symbol # at the beginning of each line. This will ensure the interpreter ignores the commented lines when reading through a configuration file.
If it is already uncommented, you need to change False to True and replace the username with yours or the desired username.
# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.
[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false
# Enabling automatic login
# AutomaticLoginEnable = true
# AutomaticLogin = user1
# Enabling timed login
# TimedLoginEnable = true
# TimedLogin = user1
# TimedLoginDelay = 10
AutomaticLoginEnable=True #Change from False to True
AutomaticLogin=bonben
[security]
[xdmcp]
[chooser]
[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true
3. Save the file then restart your Ubuntu machine to verify it works.