Re: Sorry, real newbie question about connecting to a database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sorry, real newbie question about connecting to a database
Дата
Msg-id 22803.1566226504@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Sorry, real newbie question about connecting to a database  (stan <stanb@panix.com>)
Список pgsql-general
stan <stanb@panix.com> writes:
> But I cannot conect, or swith to user
> employee:

> stan@smokey:/etc/postgresql/11/main$ psql -U employee
> psql: FATAL:  Peer authentication failed for user "employee"

This means that you've set pg_hba.conf to specify "peer" authentication,
which by default only lets you connect as a PG role named the
same as your OS account.  (This is about are-you-who-you-say-you-are;
whether who-you-say-you-are has privilege to connect is independent.)

You could use some other auth method, or you could set up a mapping
file that says you (stan) are allowed to connect as "employee".

            regards, tom lane



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

Предыдущее
От: stan
Дата:
Сообщение: Sorry, real newbie question about connecting to a database
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Sorry, real newbie question about connecting to a database