Thread: md5 is invalid?

md5 is invalid?

From
Robert C Paulsen Jr
Date:
I am trying to setup postgresql 7.4.2 on Red Hat Enterprise ver 3.0.

I installed every rpm from the download directory:

        $ rpm -qa | grep postgres
        postgresql-docs-7.4.2-1PGDG
        postgresql-contrib-7.4.2-1PGDG
        postgresql-test-7.4.2-1PGDG
        postgresql-libs-7.4.2-1PGDG
        postgresql-debuginfo-7.4.2-1PGDG
        postgresql-pl-7.4.2-1PGDG
        postgresql-7.4.2-1PGDG
        postgresql-devel-7.4.2-1PGDG
        postgresql-python-7.4.2-1PGDG
        postgresql-server-7.4.2-1PGDG
        postgresql-tcl-7.4.2-1PGDG
        postgresql-jdbc-7.4.2-1PGDG

I did "initdb -W -D /var/lib/pgsql/data" and it apparently worked.

I added a line to pg_hba.conf:

        host    all     192.168.0.0     255.255.255.0   md5

I started the server via "service postgresql start" and it appears to be
running OK.

I tried to log into the server (from userid postgres) but it failed:

        $ psql template1
        psql: FATAL:  missing or erroneous pg_hba.conf file
        HINT:  See server log for details.

The log file shows:

        LOG:  invalid entry in pg_hba.conf file at line 67, token "md5"
        FATAL:  missing or erroneous pg_hba.conf file
        HINT:  See server log for details.





Re: md5 is invalid?

From
Tom Lane
Date:
Robert C Paulsen Jr <robert@paulsenonline.net> writes:
> I added a line to pg_hba.conf:
>         host    all     192.168.0.0     255.255.255.0   md5

You're a field short ... apparently you are reading pre-7.4
documentation about the format of pg_hba.conf.  It's unhappy because
"md5" doesn't look like a valid IP mask.

            regards, tom lane