

Md5 or password which operates similarly except for the way that the password is transmitted across the connection, namely MD5-hashed and clear-text respectively. Try one of the following methods if you want to use password-based authentication. Client connections are authenticated based on client host address, database, and user Postgres provides many different client authentication methods including password-based authentication. To control the Client authentication, use the /etc/postgresql/11/main/pg_hba.conf configuration file. Except for this file, Postgres uses two other manually-edited configuration files, which control client authentication. In this step, you will review the main Postgres configuration file, which is located at /etc/postgresql/11/main/nf. Now, you can exit the postgres account to proceed with the guide. su - postgres sql -c "ALTER USER postgres WITH PASSWORD 'securepass_here' " Note: Remember to set a strong and secure password. Now switch to the postgres system user account and postgres role as shown.

You also need to secure it with a password. passwd postgresīesides, the Postgres role is not secured by default.

to do this you can create a password using the passwd utility. You need to secure the Postgres system user account as it is not protected using a password. To explain more, the user is a role that can be a user or a group, and a role that has login right. The Postgres uses the concept of roles to manage database access permissions and database roles are conceptually completely separate from operating system users by default. Securing and Configuring PostgreSQL Database
