Thread: ident auth not working on 7.3.1

ident auth not working on 7.3.1

From
Scott Lamb
Date:
I can't get ident auth to work on 7.3.1. I'm using Linux 2.4 (RedHat 7.3).

     [postgres@calvin data]$ unset PGDATABASE PGHOST PGPORT PGUSER
     [postgres@calvin data]$ killall -HUP postmaster
     [postgres@calvin data]$ egrep '^[^#]' pg_hba.conf
     local all all trust
     [postgres@calvin data]$ psql template1
     Welcome to psql 7.3.1, the PostgreSQL interactive terminal.

     Type:  \copyright for distribution terms
            \h for help with SQL commands
            \? for help on internal slash commands
            \g or terminate with semicolon to execute query
            \q to quit

     template1=# \q
     [postgres@calvin data]$ vim pg_hba.conf
     [postgres@calvin data]$ killall -HUP postmaster
     [postgres@calvin data]$ egrep '^[^#]' pg_hba.conf
     local all all ident
     [postgres@calvin slamb]$ id
     uid=26(postgres) gid=26(postgres) groups=26(postgres)
     [postgres@calvin slamb]$ psql template1
     psql: FATAL:  IDENT authentication failed for user "postgres"

What could cause this?

Thanks,
Scott


Re: ident auth not working on 7.3.1

From
Oliver Elphick
Date:
On Sun, 2002-12-22 at 21:45, Scott Lamb wrote:
> I can't get ident auth to work on 7.3.1. I'm using Linux 2.4 (RedHat 7.3).

>      [postgres@calvin data]$ egrep '^[^#]' pg_hba.conf
>      local all all ident
                           ^^^^^^^^
missing parameter, e.g., sameuser


>      [postgres@calvin slamb]$ id
>      uid=26(postgres) gid=26(postgres) groups=26(postgres)
>      [postgres@calvin slamb]$ psql template1
>      psql: FATAL:  IDENT authentication failed for user "postgres"
>
> What could cause this?

You haven't added the map parameter after "ident".  Try "ident
sameuser", so that anyone can connect to PostgreSQL using his Unix login
(provided that he has also been created as a PostgreSQL user).

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "And there were in the same country shepherds abiding
      in the field, keeping watch over their flock by night.
      And, lo, the angel of the Lord came upon them, and the
      glory of the Lord shone around them; and they were
      sore afraid. And the angel said unto them, " Fear not;
      for behold I bring you good tidings of great joy which
      shall be to all people. For unto you is born this day
      in the city of David a Saviour, which is Christ the
      Lord."        Luke 2:8-11


Re: ident auth not working on 7.3.1

From
Scott Lamb
Date:
Oliver Elphick wrote:
> On Sun, 2002-12-22 at 21:45, Scott Lamb wrote:
>
>>I can't get ident auth to work on 7.3.1. I'm using Linux 2.4 (RedHat 7.3).
>
>
>>     [postgres@calvin data]$ egrep '^[^#]' pg_hba.conf
>>     local all all ident
>
>                            ^^^^^^^^
> missing parameter, e.g., sameuser

Yup, that was it. Thanks for the help. I'll run off now to feel stupid
for going from memory and not the docs.

Thanks,
Scott