Re: Permissions to users ??? (FATAL: Ident authentication - Mailing list pgsql-novice

From Ronni
Subject Re: Permissions to users ??? (FATAL: Ident authentication
Date
Msg-id 3352.83.72.128.86.1142117813.squirrel@83.72.128.86
Whole thread Raw
In response to Re: Permissions to users ??? (FATAL: Ident authentication failed for user)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
> Where did you put those lines in the pg_hba file?  I'll bet they are
> after a more general line that specifies ident authorization.  pg_hba
> is order-sensitive, see the docs.
>

The bottom of my pg_hba.conf look like this:
------------------------------------------------------------------------------------
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database
# super user can access the database using some other method.
# Noninteractive
# access to all databases is required during automatic maintenance
# (autovacuum, daily cronjob, replication, and similar tasks).
#
# Database administrative login by UNIX sockets
local   all         postgres                          ident sameuser

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident sameuser
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    wt          wt_admin    127.0.0.1/32          md5
host    wt          wt_public   127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
# Reject all other connection attempts
host    all     all     0.0.0.0 0.0.0.0 reject
------------------------------------------------------------------------------------

And as you can see I put it under #IPv4 local connections:

I've tried to make a new user called web, grant all privileges on a table
in database wt, and added web like wt_admin above, with the same result, I
dont get to log in.

I made the users with createuser, and answered no to every question. My
own user, which I created the same way, but answered yes to every question
have no problems at all.

Regards
Ronni



> "Ronni" <rofe@mailme.dk> writes:
>> I then created a database called wt, and added the following to
>> pg_hba.conf:
>> host    wt          wt_admin    127.0.0.1/32          md5
>> host    wt          wt_public   127.0.0.1/32          md5
>
>> Then restarted postgresql and tried to login with:
>> psql -U wt_admin -W wt
>> but I get the following error:
>> psql: FATAL:  Ident authentication failed for user "wt_admin"
>
> Where did you put those lines in the pg_hba file?  I'll bet they are
> after a more general line that specifies ident authorization.  pg_hba
> is order-sensitive, see the docs.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>



pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Permissions to users ??? (FATAL: Ident authentication failed for user)
Next
From: Joao Miguel Ferreira
Date:
Subject: Automatic date/time