Re: psql -c "select * from a-user-name-that-exist fails

Поиск
Список
Период
Сортировка
От Jean-Yves F. Barbier
Тема Re: psql -c "select * from a-user-name-that-exist fails
Дата
Msg-id 20100924163006.5df7a252@anubis.defcon1
обсуждение исходный текст
Ответ на Re: psql -c "select * from a-user-name-that-exist fails  (lalebarde <l.alebarde@free.fr>)
Список pgsql-novice
On Fri, 24 Sep 2010 06:59:15 -0700 (PDT), lalebarde <l.alebarde@free.fr>
wrote:

Yeah, as a matter of fact, I just tested and had this PB:

$ createuser test -W     => Cd line, as postgres, p/w='test'
  (Can create DBs + roles)
$ createdb -O test test  => Cd line, as postgres
$ psql -U test -d test   => Auth by p/w failed (!)

the 1st solution I found was to log into 'test' DB as postgres and:
ALTER USER test WITH PASSWORD 'test';
then the connexion was Ok.

As the error msg was:
psql: FATAL:  authentication by password failed for user << test >>
I tested into 'pg_hba.conf' and finally found I must have:
local   test   test        trust
into it to log w/o any trick (but it don't ask for a p/w.)

So, for security reasons I'll keep the 1st solution.

> I could connect only with the postgres role.
>
> To answer your requests :
> # which createdb
> /usr/bin/createdb
> # which createuser
> /usr/bin/createuser
> # createdb --version
> createdb (PostgreSQL) 8.4.4
> # createuser --version
> createuser (PostgreSQL) 8.4.4


--
A fool and his honey are soon parted.

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

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: psql -c "select * from a-user-name-that-exist fails
Следующее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: Re: psql -c "select * from a-user-name-that-exist fails