How to enable / disable automatic login in Debian 10

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 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 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 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 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 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 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 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

May be interested

  • How to Compile a C ProgramPhoto of How to Compile a C Program
    this wikihow teaches you how to compile your c program in windows and macos. if you're using linux, check out how to compile a c program using the gnu compiler. go to https://cygwin.com/install.html. cygwin is a free windows tool that...
  • How to Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote UsersPhoto of How to Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users
    this how-to will enable you to set up a custom banner message to users who read your banner message and decide to enter your system at their own risk, else be warned about not trying to log in. we will be first editing a file called...
  • How to Create and Use ISO Files on LinuxPhoto of How to Create and Use ISO Files on Linux
    learn how to create, mount, or burn iso images using linux. most linux distributions come with software to create, mount, or burn iso images. using these steps, you will learn to do this, and maybe even understand how it works. create the...
  • How to Set up a Dial up Internet Connection in Linux Via the Command LinePhoto of How to Set up a Dial up Internet Connection in Linux Via the Command Line
    a walkthrough of dial-up internet with linux command line. your modem should be detected automatically by your distribution.
  • How to Play Windows Games in LinuxPhoto of How to Play Windows Games in Linux
    let's be honest: most windows games will not currently run on linux, but there are methods available to play some games. if you want to play simcity or bejeweled there is hope. if, however, you are thinking about porting over world of...
  • How to End a Program on a PCPhoto of How to End a Program on a PC
    have you ever had a program hang and waiting for the computer to sort the problem out was not an option? this puts in effect the immediate termination of almost any irritating, hanging, unresponsive program on your pc. kill ===windows===