Обсуждение: Problems with authentication

Поиск
Список
Период
Сортировка

Problems with authentication

От
Orlando Eloy Gentil
Дата:
    Hi all,

         I changed the last two lines from my pg_hda.conf (
 "trust" to "crypt") in order to improve my security.
        I did the following after "su -l postgres"
        1-> createdb postgres
        2-> chmod 600 pg_pwd
        3-> psql
        4-> alter user postgres with password postgres_pw
        5-> \q
        6-> changed the file pg_hda.conf as described later
        7-> /etc/rc.d/init.d/postgresql restart

        After this when I try to use "psql -u -d postgres" or "psql -u",
it
 says that connection to database failed and failed authentication.
    My Postmaster starts OK with -S -i -p 5432....
    What can be happening?
         Thanks in advance,

         Orlando

Re: Problems with authentication

От
Tom Lane
Дата:
Orlando Eloy Gentil <gentil@cdludi.com.br> writes:
>         After this when I try to use "psql -u -d postgres" or "psql -u",
> it
>  says that connection to database failed and failed authentication.
>     My Postmaster starts OK with -S -i -p 5432....
>     What can be happening?

Can't tell from that much info.  The postmaster's log output might tell
more about why it's refusing the connection.  Right now you are sending
that log to the bit bucket, however :-(.  Restart the postmaster
*without* -S, and with output redirection, eg
    postmaster -i -p 5432 ... >/path/to/handy/logfile 2>&1 &
and then see what it puts in the logfile when you try to connect.

BTW, you do not need to restart the postmaster after changing
pg_hba.conf.

            regards, tom lane