This is for gdm3.

GDM (GNOME Display Manager).

GDM is the display manager for GNOME, a popular desktop environment for Linux operating systems. GDM is responsible for managing user authentication, login, and splash screen configuration.

GNOME (GNU Network Object Model Environment) is a free and open-source desktop environment for Unix-like operating systems such as Linux and BSD. It is one of the most popular and widely used desktop environments in the free software community.

GNOME is characterized by its intuitive and easy-to-use user interface, which includes:

  • Desktop: A work area where you can place icons, windows, and other items.
  • Taskbar: A bar that displays and accesses open windows.
  • Menu: A menu that provides access to applications and system settings.
  • Panel: A panel that displays information about the system, such as the time, date, and processor load.

Ubuntu Server is a version of Ubuntu designed for servers, and it does not include GNOME by default. In fact, Ubuntu Server focuses on being a lightweight and minimalist platform for servers, and does not include a desktop environment like GNOME.

By default, Ubuntu Server uses a command-line environment, without a graphical desktop environment like GNOME. This is because servers typically require a minimalistic and lightweight setup, and do not need a graphical desktop environment to run.

This will install the GNOME desktop environment, along with other associated applications and tools.

sudo apt install ubuntu-desktop

In addition to GNOME, there are other desktop environment options that you can install on Ubuntu Server, such as:

  • XFCE: A lightweight and minimalist desktop environment.
  • KDE: A desktop environment with a more traditional user interface.
  • LXDE: A lightweight and minimalist desktop environment.
  • MATE: A desktop environment that is based on GNOME 2.

Ubuntu Server does not include GNOME by default, but you can install a desktop environment like GNOME if you wish.

In Ubuntu Server, GDM is used to manage user sessions and provide a user interface for login.

These commands will allow you to check if LightDM or GDM is installed on your Ubuntu Server system:

lightdm is like gdm.

sudo dpkg -l | grep lightdm
sudo dpkg -l | grep gdm

To install GDM, you need to run the following command:

sudo apt install gdm3

you need to configure it to start automatically when the system boots. To do this, you need to run the following command:

sudo dpkg-reconfigure gdm3

GDM is a display manager used to manage user sessions on Linux operating systems.

In Ubuntu Server, GDM is used to provide a user interface for logging in and managing user sessions. Although Ubuntu Server is an operating system designed for servers, GDM is included by default to provide a way to access the system graphically.

  • sudo dpkg-reconfigure gdm3: Reconfigures GDM.
  • sudo service gdm3 restart: Restarts the GDM service.
  • sudo service gdm3 stop: Stops the GDM service.
  • sudo service gdm3 start: Starts the GDM service.

in /etc/gdm3/custom.conf the content:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=root

[security]
AllowRoot=true

It automatically starts with the root user without asking for a password.

The lines AutomaticLoginEnable=true and AutomaticLogin=root in the GDM configuration file (/etc/gdm3/custom.conf) are used to enable automatic login with the root user.

then:

sudo service gdm3 restart

then reboot the system


sudo reboot

Other useful commands:

sudo gdm3 --version
sudo service gdm start

/etc/shadow is the file that stores user passwords, including root.

  • /etc/pam.d/gdm-password is the authentication configuration file for GDM.
  • /etc/gdm3/custom.conf is the GDM configuration file we mentioned earlier.

On Linux systems, the /etc/pam.d/gdm-password file is a Pluggable Authentication Modules (PAM) configuration that is used to authenticate users to the GNOME Display Manager (GDM) login interface. PAM is a framework that allows system administrators to flexibly and modularly configure how users will be authenticated to the system.

/etc/shadow contains sensitive password information, while /etc/passwd contains general user information.

/etc/passwd is readable by all users, while /etc/shadow is only readable by the superuser (root).

/etc/passwd contains information about the user’s name, UID, GID, home directory, and shell, while /etc/shadow contains information about the password, date of last change, and other data related to account security.

/etc/passwd and /etc/shadow are complementary files that work together to provide secure user authentication and management on Linux and Unix systems.

On most modern Linux and Unix systems, the /etc/passwd file does not contain information about user passwords. Instead, the /etc/shadow file stores sensitive password information, such as the password hash, the date of the last password change, and other data related to account security.

In the past, the /etc/passwd file did contain password information, but this was a major security issue as any user could read the file and gain access to the password information. To address this issue, the /etc/shadow file was created, which is only readable by the superuser (root).

Why is the password field in /etc/passwd x?
In the /etc/passwd file, the password field is commonly represented by an x. This is because the password information is stored in the /etc/shadow file, and not in /etc/passwd.

/etc/passwd does not contain password information, and the /etc/shadow file is the one that stores sensitive password information. The password field in /etc/passwd is x because the password information is stored in /etc/shadow

/etc/pam.d/gdm-autologin is used to configure auto-authentication in GDM3.

/etc/gdm3/greeter.dconf-defaults default settings for the greeter.

/etc/gdm3/gdm.schemas

/var/lib/gdm3/.cache This directory contains configuration caches and other data that GDM3 uses to function properly.

/usr/share/gdm/greeter/themes: Directory containing login themes for GDM3.
/usr/share/gdm/greeter/backgrounds: Directory containing wallpapers for GDM3.
/etc/X11: Directory containing X11 settings, which are used to configure the desktop environment.

Below are important directories and files they contain:

/etc/

passwd, shadow, x11 (is /etc/X11/)

/etc/gdm3/

custom.conf permission: rw-r—– (640)

, greeter.dconfs-defaults,

 gdm.schemas

/etc/pam.d/

gdm-password, gdm-autologin

/var/lib/gdm3/

.cache

/usr/share/gdm/greeter/

themes, backgrounds

  • /etc/gdm3: Directory containing GDM3 configurations and files.
  • /etc/gdm3/custom.conf: Main GDM3 configuration file.
  • /etc/gdm3/gdm.conf: GDM3 configuration file containing general configuration options.
  • /etc/gdm3/greeter.dconf-defaults: File containing default settings for the GDM3 greeter (login screen).
  • /etc/gdm3/gdm.schemas: File containing configuration schemes for GDM3.
  • /var/lib/gdm3: Directory containing GDM3 data and configurations.
  • /var/lib/gdm3/.cache: Directory containing configuration caches and other data that GDM3 uses to function properly.
  • /usr/share/gdm: Directory containing GDM3 files and configurations.
  • /usr/share/gdm/greeter: Directory containing themes and settings for the GDM3 greeter.
  • /usr/share/gdm/greeter/themes: Directory containing login themes for GDM3.

As for the PAM configuration files, the following are created:
/etc/pam.d/gdm-password: PAM configuration file used to authenticate users in GDM3.
/etc/pam.d/gdm-autologin: PAM configuration file used to configure automatic authentication in GDM3.

/etc/passwd: File containing general information about the system users.
/etc/shadow: File containing sensitive information about user passwords.
/etc/group: File containing information about the system user groups.

These files are created by default when you install a Linux system and configure the system’s users and groups.

GDM File Permissions
GDM files require specific permissions to function properly. Below are some of the most common files and permissions:
/etc/gdm/gdm.conf: This configuration file requires read and write permissions for the root user and read permissions for the gdm group.
Permission: rw-r—– (640)
/etc/gdm/gdm.schemas: This schemas file requires read permissions for the root user and read permissions for the gdm group.
Permission: r–r—– (440)
/usr/lib/gdm: This libraries directory requires execute permissions for the root user and execute permissions for the gdm group.
Permission: r-xr-x— (750)
/var/lib/gdm: This data directory requires read and write permissions for the gdm user and read and write permissions for the gdm group.
Permission: rw-rw—- (660)
/var/log/gdm: This log directory requires read and write permissions for the gdm user and read and write permissions for the gdm group.
Permission: rw-rw—- (660)

It is important to note that permissions may vary depending on the Linux distribution and version of GDM being used.

Changing GDM File Permissions
To change the permissions of GDM files, the chmod command can be used. For example, to change the permission of the /etc/gdm/gdm.conf file to rw-r—– (640), the following command can be run:
sudo chmod 640 /etc/gdm/gdm.conf
It is important to be careful when changing the permissions of GDM files, as this can affect the security and functionality of the system.

GDM File Owners
GDM files must have the following owners:
/etc/gdm/gdm.conf: root:root
/etc/gdm/gdm.schemas: root:root
/usr/lib/gdm: root:root
/var/lib/gdm: gdm:gdm
/var/log/gdm: gdm:gdm
To change the owner of a file, the chown command can be used. For example, to change the owner of the file /var/lib/gdm to gdm:gdm, the following command can be run:
sudo chown gdm:gdm /var/lib/gdm

gdm:gdm: is the specification of the new owner and group. In this case, the owner and group are being set to gdm

  • The owner of the /var/lib/gdm directory will be changed to gdm.
  • The group of the /var/lib/gdm directory will be changed to gdm.
  • The user gdm and the group gdm will have read, write, and execute permissions on the /var/lib/gdm directory.
  • Other users and groups will not have read, write, or execute permissions on the /var/lib/gdm directory unless explicitly granted.