Re: I need to know password for postgres

Поиск
Список
Период
Сортировка
От David Robertson
Тема Re: I need to know password for postgres
Дата
Msg-id 3D5AB7C6.3050201@robertsonphoto.fsnet.co.uk
обсуждение исходный текст
Ответ на I need to know password for postgres  (David Robertson <david@robertsonphoto.fsnet.co.uk>)
Ответы Re: I need to know password for postgres  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-novice
Oliver,
              There are no uncommented entries in  pg_hba.conf.  Surely
I need to uncomment some of these?

I have managed to give postgres a password but I can't access database.

To be honest I screwed up and have reinstalled my Redhat partition so
I'm back to square one ie. the postgresql and gphotocoll RPMs installed.

Thanks for taking the trouble.

Dave


Oliver Elphick wrote:

>On Tue, 2002-08-13 at 21:31, Chad Thompson wrote:
>
>>from a prompt type
>>"passwd postgres" (no quotes)
>>
>>this will prompt you to change the password for postgres
>>
>...
>
>>>The setup insructions are
>>>
>>>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.
>>>
>
>No he doesn't need to change the Unix password for postgres; he had
>already got access to that by using su.
>
>If you really need a database password, do this:
>
>    To get access to the database, edit pg_hba.conf, which is stored in
>    the top-level data directory.  I don't know where its default
>    location is on Red Hat.
>
>    There should be a lot of explanatory comment in that file.  That
>    should help you understand what it does.  Presumably the first line
>    that matches the way gphotocoll is trying to access it is a line
>    that specifies password or crypt.
>
>    To set the database password for postgres, add this line at the top
>    of pg_hba.conf:
>
>      local all trust
>
>    Connect to PostgreSQL with psql from the postgres Unix account:
>
>      psql -d template1
>
>    Change the postgres password:
>
>      ALTER USER postgres WITH PASSWORD 'this_is_my_password';
>
>    Type Ctrl-D or \q to come out of psql
>
>    Edit pg_hba.conf again and remove the trust line.
>
>But I'm not sure you do need a password with the set up you described;
>you said that createdb worked and you did not have to supply a password.
>If you had universal password access control, createdb would have asked
>you for a password.
>
>Perhaps you should post the contents of your pg_hba.conf (without the
>comments!).  It may be that you need to do something to allow a Unix
>user who is not "postgres" to access the database as "postgres".  I
>would also want to know why gphotocoll has to be user "postgres", since
>this gives it administration rights over the whole database
>installation.
>



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

Предыдущее
От: "paul butler"
Дата:
Сообщение: Re: disappearing tables
Следующее
От: "Norman Khine"
Дата:
Сообщение: What is wrong with this SQL