Would you like to learn how to configure the Radius 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 Radius protocol on a computer running Ubuntu Linux.
• Ubuntu 20.04
• Ubuntu 19.04
• Ubuntu 18.04
• MariaDB 10.3
• Freeradius 3.0.20
In our example, the Radius server IP address is 192.168.15.10.
In our example, the MariaDB server IP address is 192.168.15.11.
Tutorial – FreeRadius Server Installation on Ubuntu Linux
• IP – 192.168.15.10
• Operacional System – Ubuntu 20
• Hostname – FREERADIUS
Install the FreeRadius service.
Now, we need to add clients to the Radius configuration file.
Locate and edit the Radius clients configuration file.
Add the following lines at the end of the clients.conf file.
In our example, we are adding 1 client device:
The device was named MARIADB and has the IP address 192.168.15.11.
Now, we need to add FreeRadius users to the USERS configuration file.
Locate and edit the Freeradius users configuration file.
Add the following lines at the end of the file
Restart the Freeradius server.
You have finished the Freeradius installation on Ubuntu Linux.
Tutorial MariaDB – Radius authentication using Freeradius
• IP – 192.168.15.11
• Operacional System – Ubuntu 20
• Hostname – MARIADB
Install the required packages to enable the Radius authentication.
Edit the configuration file named pam_radius_auth.conf.
Here is the file, before our configuration.
Here is the file, after our configuration.
We performed the following configuration:
• Radius Server IP – 192.168.15.10
• Radius Secret – kamisama123
You need to change the IP address to your Freeradius server IP.
You need to change the Radius secret to your Radius secret.
Test your Radius authentication using the following command.
You need to change the IP address to your Freeradius server IP.
You need to change the Radius secret to your Radius secret.
You need to change the admin user account and the password 123qwe.. to reflect your user account.
Here is the command output:
Tutorial MariaDB – Radius authentication
• IP – 192.168.15.11
• Operacional System – Ubuntu 20
• Hostname – MARIADB
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 Radius account password.
Enable the MariaDB service to read the Radius file.
Access the MariaDB command-line.
Enable the PAM authentication plugin.
Create a new user account.
In our example, we create a MariaDB account named ADMIN.
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 have finished the MariaDB service Radius authentication configuration.