How to enable / disable automatic login in Debian 10

If your system is in a secure location, without any privacy threats, you can avoid the hassle of providing credentials when logging in.

As a rule, users are required to provide credentials to log into the Linux system. This helps keep all files, emails and sensitive data secure on the system.

However, if your system is in a secure location, without any privacy threats, you can avoid the hassle of providing credentials when logging in.

This article provides you with two ways to enable / disable automatic login to Debian systems.

Enable / disable automatic login via command line

As a superuser, you can enable automatic login for yourself or any other Debian user, by making some configuration changes in the daemon.conf file as follows:

Open Terminal via Application Launcher Search (using the Super / Windows key).

Open the daemon.conf file in the Nano editor via the following command:

 $ sudo nano /etc/gdm3/daemon.conf 

Please note that you need to be a superuser to edit most system configurations.

When you enter the password, the following file will open:

How to enable / disable automatic login in Debian 10 Picture 1How to enable / disable automatic login in Debian 10 Picture 1
File opens when password is entered

In this file, the selected lines are noted (you can identify them by the presence of a # character at the beginning of the line). The interpreter ignores these comments when reading the configuration file. This means that in the example file, the automatic login for user1 has been disabled.

You can simply delete the # character from the last two selected lines and provide the username instead of the value 'user1' for the user you want to enable automatic login.

For example:

How to enable / disable automatic login in Debian 10 Picture 2How to enable / disable automatic login in Debian 10 Picture 2
The value of user1 is replaced by sana

In this tutorial, we replace user1 with sana . You can see the color change of the feature currently enabled.

Now, save the file by pressing Ctrl + X and then Y

Now, when you restart the computer, the specified user will log in without asking for any authentication details.

Disable automatic login for users

To turn off automatic login for a given user, simply add the # character to the lines in daemon.conf, where AutomaticLoginEnable = true and Automatic Login = [user1] have been specified.

How to enable / disable automatic login in Debian 10 Picture 3How to enable / disable automatic login in Debian 10 Picture 3
Disable automatic login for users

You can see that the color change of the feature is currently disabled. Please save the file by pressing Ctrl + X and then selecting Y Now, when you restart the computer, the specified user will be required to provide authentication details to log in.

Enable / Disable automatic login via GUI

You can enable / disable automatic login for yourself or any other Debian user through the graphical interface as follows.

Click the down arrow located in the upper right corner of the Debian screen and then click your username. The following options are displayed:

How to enable / disable automatic login in Debian 10 Picture 4How to enable / disable automatic login in Debian 10 Picture 4
The options will be displayed

Select the Account Settings option.

The following Users dialog box will open. Because you need to be a super user to configure these settings, the Automatic Login button will be disabled by default. Click the Unlock button located at the top right of the dialog box to enable this button.

How to enable / disable automatic login in Debian 10 Picture 5How to enable / disable automatic login in Debian 10 Picture 5
Click the Unlock button

Provide authentication details via the following dialog and click Authenticate :

How to enable / disable automatic login in Debian 10 Picture 6How to enable / disable automatic login in Debian 10 Picture 6
Click Authenticate

Now, you can switch the Automatic Login button to OFF or ON depending on whether you want to enable or disable automatic login.

How to enable / disable automatic login in Debian 10 Picture 7How to enable / disable automatic login in Debian 10 Picture 7
Switch the Automatic Login button to OFF or ON

When you restart the computer, the login authentication process will depend on the selection you have made here.

By following the simple steps described in this guide, you can turn on / off the automatic login utility for yourself or for other users (with admin rights). This way, you can set secure access to your computer as needed.

4 ★ | 51 Vote