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.