Re: Incorrect password using pg_ctl

Поиск
Список
Период
Сортировка
От Matthew Stanfield
Тема Re: Incorrect password using pg_ctl
Дата
Msg-id 3CBD9AAF.1C52FC0@propertyknowledge.com
обсуждение исходный текст
Ответ на Incorrect password using pg_ctl  (Matthew Stanfield <matthew@propertyknowledge.com>)
Список pgsql-general
Lamar Owen wrote:
>
> 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.

Thanks Lamar.

If I login as 'su' and then use 'passwd postgres' to change the password it
appears to change the password but I still get 'incorrect password' when I
try to start the database using "su -c 'pg_ctl start...' postgtres"
regardless of whether I type in my postgres user password or my root
password (although I am pretty sure it doesn't want my root password here
anyway). I had tried this before I posted the list with this problem and
have tried the process several times so I am sure it's not a trivial
problem like misspelling my password.

The only way I can now start the postgresql server properly (IE. as user
'postgres') is to log in as root using 'su' and then use 'su postgres'
which then doesn't require me to enter the postgres user password.

What I really want is to be able to start/stop/status the server from my
normal account the way I always used to by using aliases for the long
command lines of "su -c 'pg_ctl start/stop...' postgres".

Any ideas what I should try and do next?

Many thanks and regards,

..matthew

В списке pgsql-general по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Incorrect password using pg_ctl
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Incorrect password using pg_ctl