Sunday , April 28 2024

How To Check Password Policy In PostgreSQL

In today’s article, we will learn how to determine your password policy in the parameters determined by Postgresqlcheck on Postgresql13.

When accessing the database, we may sometimes want to make our passwords short and not in compliance with password policies, but there are some packages in Postgresql databases to enforce this.

One of these is the postgresqlcheck package.

First we need to install the postgresql13-contrib package.

After downloading PostgreSQL’s contrib package, we go to the postgresql contrib directory as follows.

After going to the directory, we download the postgresqlcheck package and other packages with the following command.

After the file is downloaded, we enter the passwordcheck_extra directory in pg_plugins.

After entering the passwordcheck_extra directory, we run the following command to ensure that the passwordcheck_extra package is installed in Postgresql.

We change the shared_preload_libraries parameter in Postgresql.conf as follows.

We are restarting our service because this process requires a restart in PostgreSQL.

After the service is restarted, we connect to Postgresql and run the load command below.

After running the above command, we determine our password policy via Postgresql as follows.

In the password above, we specify the parameters that it must be uppercase and lowercase letters, must contain a minimum of 6 characters, must be a maximum of 18 characters long and must use special characters.

As seen above, it gave us an error message because we did not create it according to the rules we specified.

Loading

About Faruk Erdem

Leave a Reply

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

Categories