PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 Général » create user mapping without password,how to configure authentication ? » 17/02/2023 15:14:46

Aymenr
Réponses : 0

I am trying to create a user mapping in PostgreSQL without a password, but I am encountering an error that says

local_db=> select * from employee;
ERROR:  could not connect to server "testmachine02"
DETAIL:  connection to server at "192.168.56.10", port 5432 failed: fe_sendauth: no password supplied
local_db=> exit

when I try to access a table. Here is the command that I used to create the user mapping:

CREATE USER MAPPING for app_user SERVER testmachine02 OPTIONS (password_required 'false');


I also created a pgpass under /root/.pgpass file with the following entries:

localhost:5432:local_db:app_user:app_user123
192.168.56.10:5432:admin:admin:admin123
192.168.56.10:5432:remote_db:test:test123
testmachine02:5432:remote_db:test:test123

Despite these steps, I am still unable to access the table without a password. How can I create a user mapping without a password and access the table?

Pied de page des forums

Propulsé par FluxBB