• MainMenu
  • Home
  • Cheap VPS
  • Site Tree

Suay.Site

Another web-master's blog

  • Home
  • Cheap VPS
  • Site Tree
Loading...
X

Suay.Site

How to set up automatic login in Linux with LightDM

April 9, 2023

First, make sure you are using the LightDM display manager:

systemctl status display-manager

Line

lightdm.service - Light Display Manager

confirms that this OS uses LightDM.

Logging into Linux with LightDM (style and background images may vary on other Linux distributions):

To automatically login to LightDM, open the configuration text file /etc/lightdm/lightdm.conf:

sudo gedit /etc/lightdm/lightdm.conf

Find the [Seat:*] section there (or it may be called [SeatDefaults]), and in this section there are two commented lines:

#autologin-user=
#autologin-user-timeout=0

Uncomment them (remove the # symbol at the beginning of the line), and after autologin-user enter the username for which automatic login should be performed, for example, if this is the root user, then the lines look like this:

autologin-user=root
autologin-user-timeout=0

If you do not know or have forgotten the username of the Linux system, then you can find it out by running the command in the terminal:

whoami

If the lightdm.conf file does not exist at all, then create it:

sudo gedit /etc/lightdm/lightdm.conf

Copy to this file:

[Seat:*]
autologin-guest=false
autologin-user=mial
autologin-user-timeout=0

Note the autologin-user directive and the username that follows it, “mial”. You, of course, need to replace this name with your own system username.

Now open the /etc/pam.d/lightdm-autologin file:

sudo gedit /etc/pam.d/lightdm-autologin

Find the line there:

    auth      required pam_succeed_if.so user != root quiet_success

and replace it with:

    auth      required pam_succeed_if.so user != anything quiet_success

Reboot – after that, you should be automatically logged in without entering a password.

If it does not work, to check if the settings from the lightdm.conf configuration file are applied, run the command:

/usr/sbin/lightdm --show-config


Related articles:

  • How to enable automatic login in Linux (GDM, LightDM, SDDM) (100%)
  • How to change Display manager and login screen in Linux (86.8%)
  • How to migrate from X11 to Wayland? (86.8%)
  • How to set up automatic login in Linux with SDDM (64.7%)
  • How to set up automatic login in Linux with GDM (64.7%)
  • How to convert a large number of images to AVIF while preserving the directory tree (RANDOM - 50%)

This entry was posted in Linux and tagged in automatic login in Linux, Kali Linux, LightDM, Xfce.

Alex

View more posts from this author
« How to set up automatic login in Linux with GDM
How to enable automatic login in Linux (GDM, LightDM, SDDM) »

Leave Your Observation Cancel observation

Your email address will not be published. Required fields are marked *

Recent Posts

  • How to install any Python version for running AI models on Windows
  • How to run AI models on Windows with any Python version (a simple method)
  • How to create virtual environments with any Python version (Miniconda user guide)
  • How to create virtual environments with any Python version (Micromamba user guide)
  • How to turn images into photos using the Qwen Image Edit neural network on Windows

Recent Comments

  • Stephan Becker on How to change the language of Google Chrome and Chromium on Linux
  • Carin on dtac in Thailand: Mobile Operator User Guide
  • Alex on Menu buttons (toolbar) and status bar are missing in SMPlayer (SOLVED)
  • Alex on Error “PHP Startup: session.sid_length INI setting is deprecated” (SOLVED)
  • Shail on Error “PHP Startup: session.sid_length INI setting is deprecated” (SOLVED)

Search

Tags

Android Apache Arch Linux BlackArch BlackArch / Arch Linux computer network computer performance convert database management systems / DBMS databases DBMS Debian development file conversion file systems hardware ImageMagick IP Kali Linux Linux Mint magick Manjaro MariaDB monitor / display multimedia MySQL package managers pacman photos PHP phpMyAdmin pictures PowerShell Python software errors / problem solutions system administration Ubuntu video VirtualBox webmaster notes Web Server websites Wi-Fi Windows Windows 11

Categories

  • Blog
  • Linux
  • Money and job
  • Notes
  • PowerShell
  • Software, hardware and other IT
  • Thailand

Copyright © 2026 Suay.Site. All Rights Reserved. Capture by Slocum Studio

Scroll Up