Re: Linux Users vs PostgreSQL Users

Поиск
Список
Период
Сортировка
От Michael Convey
Тема Re: Linux Users vs PostgreSQL Users
Дата
Msg-id CACbnAKacByZTbb13L5CgjvwC_=nbKCcOXr4KHhJcfLB_49KoJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Linux Users vs PostgreSQL Users  (Felipe Santos <felipepts@gmail.com>)
Ответы Re: Linux Users vs PostgreSQL Users  (Alan Hodgson <ahodgson@simkin.ca>)
Список pgsql-novice
On Tue, Nov 10, 2015 at 10:59 AM, Felipe Santos <felipepts@gmail.com> wrote:
AFAIK there isn´t such a thing.

You are free to create users/roles/groups in Postgres without a match in the Linux system.

They are completely separate things, and you would only end up with the same OS users and DB users if you intended to do so by naming them equally, but still they are different kinds of objects, like cars and fruits.

For convenience and security, the POSTGRES OS user is usually created in the installation process and is related to the POSTGRES DB user by the configuration set in PG_HBA.CONF

On Tuesday, November 10, 2015 12:24:14 PM Alan Hodgson wrote:
> It is common, though, that distributions will setup PostgreSQL in such a way
> that it automatically trusts connections from identically named systems
> accounts via the Trust authentication method. You can change that in
> pg_hba.conf.

That should be the "ident" authentication method. "trust" trusts any account.  


​Thanks Alan & Felipe. So, in the following line, what does the last "postgres" do and is it necessary?

sudo -u postgres psql postgres


Wouldn't this be the same?

sudo -u postgres psql

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

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Linux Users vs PostgreSQL Users
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: Linux Users vs PostgreSQL Users