Cannot change password for user postgres in postgresql
Posted
by dhaval
on Server Fault
See other posts from Server Fault
or by dhaval
Published on 2010-03-01T17:08:22Z
Indexed on
2010/03/28
21:03 UTC
Read the original article
Hit count: 280
postgresql-8.3
|password
I have made the following entry in pg_hba.conf
local all all trust
but still
su postgres
does not accept blank as password. I am not able to run psql nor pg_ctl for same reason as most of the files are owned by postgres.
EDIT1
dhaval@ubuntu:~$ su -c "pg_ctl reload -D template1"
Password:
su: Authentication failure
dhaval@ubuntu:~$ su -c psql
Password:
su: Authentication failure
I am giving the root password above but I guess its expecting "postgres" superuser password. I dont have the same. I need to reset it.
EDIt2
dhaval@ubuntu:~$ sudo -i -u postgres
[sudo] password for dhaval:
postgres@ubuntu:~$ psql
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
The above has taken me postgreSQL command prompt. But I am still not sure why the "trust" was not working.
© Server Fault or respective owner