Re: I need to know password for postgres

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: I need to know password for postgres
Дата
Msg-id 1446.1029274503@sss.pgh.pa.us
обсуждение исходный текст
Ответ на I need to know password for postgres  (David Robertson <david@robertsonphoto.fsnet.co.uk>)
Список pgsql-novice
David Robertson <david@robertsonphoto.fsnet.co.uk> writes:
> 1. login as postgres - which I can only do by su  and then su postgres.
> 2. createdb - no problem
> 3. launch gphotocoll as postgres.  I have to supply the password for
> postgres and I don't know it.

If you are the postgres OS user then you can force your way in anyway.
Temporarily change $PGDATA/pg_hba.conf to allow "trust" login, then
connect to the database with psql, then use ALTER USER command to
set the database password for postgres to whatever you want.  Then
you can revert pg_hba.conf to a less insecure setting.  (Or read the
admin guide and work out what connection security policy suits your
needs.  On a single-user box, "trust" might be perfectly okay.)

BTW, I'd suggest creating an unprivileged database user for gphotocoll
to run as.  If you don't run gphotocoll as Linux root, you probably
shouldn't run it as a database superuser either.

            regards, tom lane

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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Newbie trying to load table with data...
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: I need to know password for postgres