How to use Config File In Linux

Step 1: Open a Terminal

In the very first step, we need to have an active terminal, through which the entire profile of profiling will be done. In Ubuntu, we can open the terminal by navigating to the Applications Menu or by using the Keyboard shortcut “Ctrl + ALT + T” to open the terminal.

Open a Terminal

Step 2: Open Config File

To open the configuration file for GNOME Display Manager (GDM) in Ubuntu, use the command sudo nano /etc/gdm3/custom.conf. This command opens the file in the Nano text editor with administrative privileges, allowing you to make changes to the auto-login settings.

sudo nano /etc/gdm3/custom.conf 

Open Config File

Step 3: Comment the Auto Login Lines

In the opened /etc/gdm3/custom.conf file, locate the lines related to auto-login settings (usually under the [daemon] section) and comment them out by adding a # at the beginning of each line. This action disables the auto-login feature in Ubuntu’s GNOME Display Manager.

Comment the Auto Login Lines

Step 4: Save and Exit the Editor

To save the changes made in the /etc/gdm3/custom.conf file using the Nano editor, press Ctrl + O to write the changes to the file, then press Enter. Next, press Ctrl + X to exit the editor. This ensures that the modified configuration file is saved and the editor is closed.

Save and Exit the Editor

How to Disable Auto Login in Ubuntu

In Ubuntu, when the user logs in, the system can be configured to automatically log in without requiring a password. This feature is convenient for single-user systems or in situations where security is not a primary concern. However, there are cases where you may want to disable auto-login to enhance system security or enforce user authentication. In this article, we will explore two different methods to Disable Auto Login in Ubuntu.

How to Disable Auto Login in Ubuntu

  • Using Config File
    • Step 1: Open a Terminal
    • Step 2: Open Config File
    • Step 3: Comment the Auto Login Lines
    • Step 4: Save and Exit the Editor
  • Using GUI
    • Step 1: Open Settings
    • Step 2: Navigate to Users Section
    • Step 3: Unlock the Configuration Setting of Disabling Auto Login
    • Step 4: Disable Auto Login

Similar Reads

Using Config File

Step 1: Open a Terminal...

Using GUI

Step 1: Open Settings...

Disable Auto Login in Ubuntu – FAQs

Why should I disable auto-login?...

Conclusion

In conclusion, disabling auto-login in Ubuntu enhances security by requiring manual authentication on login, protecting against unauthorized access. This can be done either through the configuration file or the GUI settings, providing flexibility based on user preferences. Reverting to auto-login is also straightforward if needed, ensuring usability without compromising security measures....