[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conflict ? password authentication failed for user "postgres"





On 9/11/07, Joseph <..hidden..> wrote:
I'm trying to create dataset and I'm getting an error:
LedgerSMB/User.pm:386
FATAL: password authentication failed for user "postgres"

It seems like password for "postgres" is not recognized, even though it
is correct.

I think there is a conflict.  The system I'm trying to install LedgerSMB
runs SQL-Ledger as well, so when I was creating  user:
createuser --createdb -U postgres --pwprompt --encrypted ledgersmb

file: pg_hba.conf was:
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32         trust

and password for user "postgres" worked; after
$ psql -U ledgersmb -d ledgersmb
ledgersmb=> UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;

This worked as well, next in order to login I had to change file:
pg_hba.conf to:
local   all         all                               md5
# IPv4 local connections:
host    all         all         127.0.0.1/32        md5

at this point I can login but I can not create "dataset"
I think the password for "postgres" is getting encrypted where as
originally it was set unencrypted.


change the auth types back to trust for a moment.
Then log in as postgres
run the following command:
ALTER USER postgres WITH PASSWORD '[secret]';

Then change the auth types back to md5 (note that any change to the pg_hba.conf requires restarting PostgreSQL.
 
Best Wishes,
Chris Travers