How to Disable Auto Login in Ubuntu
Last Updated :
30 May, 2024
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
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 TerminalStep 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 FileIn 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 LinesStep 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 EditorUsing GUI
Step 1: Open Settings
To open the Settings in Ubuntu using the graphical user interface (GUI), click on the Activities menu at the top-left corner of the screen or press the Super key (Windows key). Then, type "Settings" in the search bar and click on the "Settings" icon when it appears in the search results. This will open the Settings application, where you can configure various system settings.
Open SettingsStep 2: Navigate to Users Section
After opening the Settings application, navigate to the "Users" section. You can usually find this section under the "Details," "Accounts," or "Users & Groups" category, depending on the Ubuntu version and desktop environment you are using. In the "Users" section, you can manage user accounts, passwords, and authentication settings.
Navigate to Users SectionStep 3: Unlock the Configuration Setting of Disabling Auto Login
In the "Settings" application, go to the "Users" section and find the auto-login or authentication settings. If these settings are locked, click the lock icon, enter your password to unlock, and then disable auto-login to enforce user authentication on login.
Unlock the Configuration Setting of Disabling Auto LoginStep 4: Disable Auto Login
After unlocking the auto-login settings in the "Users" section of the "Settings" application, find the option related to auto-login or automatic login. Toggle the switch or checkbox to disable auto-login for your user account. This action ensures that your system will require manual authentication on login, enhancing security.
Disable Auto LoginConclusion
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.
Similar Reads
How to Disable Unlock Login Keyring in Linux
The login keyring in Linux is a security feature that stores sensitive information like passwords and encryption keys. It ensures your system is secure by requiring authentication to access stored credentials. However, it can sometimes prompt users for a password when the desktop environment starts,
5 min read
How to Disable SSH Root Login in Linux?
SSH or secure shell is a network protocol established between two computers on a network to communicate with each other and share data. This protocol is useful in the case of remote access to the machine. SSH makes the work easy and accessible anywhere. Here we will see how to disable SSH Root Login
3 min read
How to Disable Incognito Mode
Incognito Mode or Private Browsing modes are designed to protect user privacy to avoid any tracking. Today, over 20% of the users are relying on the Incognito Mode for their usage. However, there are certain fields such as Schools, Universities, or Businesses where disabling Incognito Mode becomes a
7 min read
How to Change Default Display Manager in Ubuntu
In Linux desktop systems, the display manager is a crucial component that handles user authentication and manages user sessions. The display manager is responsible for presenting the login screen and loading the desktop environment after successful authentication. Some popular display managers inclu
4 min read
How to Disable Radio Button in HTML?
This article will show you how to disable Radio Button in HTML. The disabled attribute is used to disable a radio button in HTML. This attribute prevents the radio button from being selected by the user. Using the disabled AttributeThe disabled attribute is used to disable the input fields. To disab
2 min read
How to Block or Disable Normal User Logins in Linux?
Here we will see how to block or disable normal user logins in Linux. This is a good idea to prevent Normal users from connecting to your system. We will see how to block Normal user logins using /etc/nologin file. We are going to tell the users that what is actually happening by showing them a mess
2 min read
How to disable input type text area?
To disable an input type=text by using the input disabled attribute. A disabled input is un-clickable and unusable. It is a Boolean attribute. The disabled elements are not submitted in the form. Syntax: <input type="text" disabled>Example 1: To disable an input field of type "text" by using
2 min read
How to Export Login Data in Firefox?
When you browse on the internet using the Web Browser, every data is stored in the application which will help to open the same webpage in the future. If you are accessing any webpage where you have to use Login Data that also gets saved in Web Browsers like Firefox. Moreover, you can Export Login D
3 min read
How to Enable Hibernate in Ubuntu 22.04 LTS
Hibernate is a power-saving feature in Ubuntu that saves your open programs and files before completely shutting down. It allows restoring your previous session as it was when you powered on again. This means you don't have to reopen your work after restarting Ubuntu. Enabling hibernate makes this u
5 min read
How to Disable Input in JavaScript ?
Disabling input fields in JavaScript is a common task when you want to restrict users from interacting with specific form elements. This can be useful in various scenarios, such as preventing modifications to fields that are conditionally locked or ensuring certain inputs are controlled programmatic
2 min read