Thread: I cant add a new user to pgSQL.. What is wrong?

I cant add a new user to pgSQL.. What is wrong?

From
"Paul Ottar Tornes"
Date:
I get this:
 
idle:/www/maloyportalen.no$ createuser remi
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
Password:
psql: FATAL 1:  Password authentication failed for user "postgres"
 
createuser: creation of user "remi" failed
 
 
I think it might have something to do with pg_hba.conf, so here it is:
 
local        all                                                                    password
host         all            127.0.0.1            255.0.0.0                 password
host         maloy       62.101.192.200  255.255.255.0          password
host         maloy       80.202.101.84    255.255.255.0         password
host         all              0.0.0.0              0.0.0.0                   reject

Re: I cant add a new user to pgSQL.. What is wrong?

From
Roj Niyogi
Date:
Paul,

change the first line in the pg_hba.conf file from password to trust

Then, run createuser

You might also want to give postgres a password with the command: ALTER USER postgres WITH PASSWORD 'blahblahblah';

Then you can change it back from trust to password in the pg_hba.conf file.

-roj
niyogi@pghoster.com

Paul Ottar Tornes wrote:
I get this:
 
idle:/www/maloyportalen.no$ createuser remi
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
Password:
psql: FATAL 1:  Password authentication failed for user "postgres"
 
createuser: creation of user "remi" failed
 
 
I think it might have something to do with pg_hba.conf, so here it is:
 
local        all                                                                    password
host         all            127.0.0.1            255.0.0.0                 password
host         maloy       62.101.192.200  255.255.255.0          password
host         maloy       80.202.101.84    255.255.255.0         password
host         all              0.0.0.0              0.0.0.0                   reject

Re: I cant add a new user to pgSQL.. What is wrong?

From
Christoph Dalitz
Date:
>
> Date: Thu, 31 Oct 2002 02:03:28 +0100
> From: "Paul Ottar Tornes" <critical@tiscali.no>
>
> I get this:
>
> idle:/www/maloyportalen.no$ createuser remi
> Shall the new user be allowed to create databases? (y/n) y
> Shall the new user be allowed to create more new users? (y/n) n
> Password:
> psql: FATAL 1:  Password authentication failed for user "postgres"
>
I had a similiar problem. In my case it was the password input of the
createuser script that seems to be seriously broken (I had to enter the
password four(!) times until it was accepted).

Log in with psql as postgres and issue a CREATE USER command.
That should work reliably.

Christoph Dalitz