Would you like to learn how to configure the PAM authentication on the MariaDB server? In this tutorial, we are going to show you how to configure the MariaDB service to authenticate users using the Plugable Authentication module also known as PAM on a computer running Ubuntu Linux.
• Ubuntu 20.04
• Ubuntu 19.04
• Ubuntu 18.04
• MariaDB 10.3
Tutorial MariaDB – PAM Authentication
Install the MariaDB service.
Create the PAM configuration file.
Here is the file content.
In our example, we are going to authenticate the MariaDB service access using the local account passwords.
Enable the MariaDB service to read the SHADOW file.
Reboot the computer.
Create a local user account.
Access the MariaDB command-line.
Enable the PAM authentication plugin.
Create a new user account.
In our example, we create a user account named TEST1.
In our example, we configured this user account to authenticate using the PAM file named MARIADB.
Access the MariaDB command-line using the new account.
Verify the user account.
Here is the command output.
Congratulations! You finished the MariaDB service PAM authentication configuration.