Re: Post Install / Secure PostgreSQL

Поиск
Список
Период
Сортировка
От Carlos Mennens
Тема Re: Post Install / Secure PostgreSQL
Дата
Msg-id AANLkTi=Z7VXV1z9ce5baKs8h_uPwnA7FyzFGJa-dFr4M@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Post Install / Secure PostgreSQL  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Post Install / Secure PostgreSQL  (Richard Broersma <richard.broersma@gmail.com>)
Re: Post Install / Secure PostgreSQL  (Alan Hodgson <ahodgson@simkin.ca>)
Re: Post Install / Secure PostgreSQL  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
On Mon, Sep 13, 2010 at 9:58 PM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> craig$ sudo -u postgres psql
> postgres=> CREATE USER craig WITH PASSWORD 'somepassword'
>           CREATEDB CREATEROLE;
> postgres=> CREATE DATABASE craig WITH OWNER craig;
> postgres=> \q

So I set a Linux shell password on my newly auto created 'postgres'
system user which is what I use to login to the database as
'superuser'. Now I know my password for 'postgres' in the Linux shell
but I still don't understand what the database password is for
'postgres'. In MySQL there is a root shell user (obviously) and then
rather than 'postgres' for the database super user, there is a 'root'
database user and I can set that password individually from the
matching shell account.

So maybe I am still lost but it appears that the database user
'postgres' has a password unique to PostgreSQL, right?

postgres=# SELECT * from pg_user;
 usename  | usesysid | usecreatedb | usesuper | usecatupd |  passwd  |
valuntil | useconfig
----------+----------+-------------+----------+-----------+----------+----------+-----------
 postgres |       10 | t           | t        | t         | ******** |
         |
 carlos   |    16384 | t           | t        | t         | ******** |
         |

Obviously there appears to be a specific password for both accounts
which I think are completely seperate from the Linux shell passwords,
right?

Secondly I am unable to find any information in the docs that show me
how to set just the user password for 'carlos'. In MySQL I would use:

SET PASSWORD FOR 'carlos'@'localhost' = PASSWORD('newpass');

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

Предыдущее
От: Satoshi Nagayasu
Дата:
Сообщение: Re: Monitoring Object access
Следующее
От: Richard Broersma
Дата:
Сообщение: Re: Post Install / Secure PostgreSQL