Обсуждение: Create user mapping without password
Hello,
I am trying to create a user mapping without password like below :
CREATE USER MAPPING for app_user SERVER testmachine02 OPTIONS (user 'test');
I created a pgpass file with th chmod 600 and I added this lines
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:local_db:test:test123
the host 192.168.56.10 is where the remote_db created with user 'test' and password 'test123'.
the user created but I am having this error message:
local_db=> select * from employee;
ERROR: password is required
DETAIL: Non-superusers must provide a password in the user mapping.
Could you please help me to create the mapping user without password.
Thanks in advance.
Regards,
Aymen Rahal
At Thu, 16 Feb 2023 11:33:47 +0100, Aymen Rahal <aymen.rahal01@gmail.com> wrote in > local_db=> select * from employee; > > ERROR: password is required > > DETAIL: Non-superusers must provide a password in the user mapping. > > Could you please help me to create the mapping user without password. In PostgreSQL 13 or higher, there's an option "password_requried". Setting it to 'false' does that for you. By the way, the message might be more informative if it included a mention of the option? > DETAIL: Non-superusers must provide a password in the user mapping unless the option 'password_required' is set to false. regards. -- Kyotaro Horiguchi NTT Open Source Software Center