Re: confusion about user paring with pg_hba and pg_ident

Поиск
Список
Период
Сортировка
От arnaud gaboury
Тема Re: confusion about user paring with pg_hba and pg_ident
Дата
Msg-id CAK1hC9v5J7WOCe4yXk36qcLEXhPkp7kkv2mbwR7_uqBo1_pGZg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: confusion about user paring with pg_hba and pg_ident  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: confusion about user paring with pg_hba and pg_ident  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general


On Tue, Oct 11, 2016 at 4:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
arnaud gaboury <arnaud.gaboury@gmail.com> writes:

> I am a little confused about some of my settings when it comes to map

> linux/psql users.



I think you're misunderstanding what the user-mapping stuff does.

It does not silently translate the username in the connection request

to something else; rather, it checks whether a user having the given

external name is allowed to log in as a particular Postgres user.

So there's nothing particularly wrong with your config files, but your

Then, if my files are correct, why can't I connect ?

 % psql --dbname=mattermost --username=mmuser
psql: FATAL:  Peer authentication failed for user "mmuser"

login with postgres is OK (pg_hba.conf settings: local   all                 postgres       trust):
 % psql --dbname=mattermost --username=postgres
psql (9.5.4)
Type "help" for help.

mattermost=# \q

I can't see why I can't connect as Postgresuser mmuser.


expectation about how your Linux users should log in to the database is

mistaken.  dovecot needs to specify that it wants to log in as mailman,

and likewise mattermost needs to specify mmuser.



If it's not practical to make the client applications send non-default

user names, you'll need to rename the Postgres roles to match the

external user names.



                        regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: arnaud gaboury
Дата:
Сообщение: Re: confusion about user paring with pg_hba and pg_ident
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: SERIALIZABLE and INSERTs with multiple VALUES