Re: Incorrect password using pg_ctl

Lamar Owen <lamar.owen@wgcr.org>

From: Lamar Owen <lamar.owen@wgcr.org>
To: Matthew Stanfield <matthew@propertyknowledge.com>, PostgreSQL General Mailing List <pgsql-general@postgresql.org>
Date: 2002-04-17T10:27:02Z
Lists: pgsql-general
On Wednesday 17 April 2002 11:46 am, Matthew Stanfield wrote:
> I've just reinstalled linux (RedHat 7.2) and PostgreSQL (latest version).

> When I use pg_ctl in a line such as:

> su -c 'pg_ctl start -l /var/lib/pgsql/logs/serverlog
> -D /var/lib/pgsql/data -o -i' postgres

> I get an 'incorrect password' error. On further examination I've found that
> even if using root privileges I can't successfully change the postgres user
> password. Since this user was created by the RPM installation of postgres I
> have no idea what the password is. How do I change the user postgres
> password?

su
passwd postgres
type in your desired password.

The default RPM installation has an invalid password for postgres -- this is 
OK, by the way, as an su from root to postgres still works.  It's used in the 
RPM's initscripts -- it does indeed work.  If for some reason an su to 
postgres from a root shell does not work, you have other problems.  I've 
never run into that before -- su to ANY user from root bypasses password 
checking.

-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11