2

I just installed Postgres 9.2 on CentOS 7. I want to keep peer authentication for all my users except one, which I would like to be able to access via "psql" through any user's account. I tried editing my /var/lib/pgsql/data/pg_hba.conf to be this

local   all             all                                     ident
local   all             scale                                   md5

but I'm still unable to login with the user "scale" unless I'm in that user's account. What do I need to do to set up md5 authentication for this one user only?

1

pg_hba.conf looks only for the first match. Try switching the order..

local   all             scale              md5
local   all             all                ident

You'll have to reload the conf

SELECT pg_reload_conf();

Or, using something like

service postresql reload

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.