14

I am trying to get tinyRSS running on my own server using PostgreSql. However I keep getting this error:

LOG:  provided user name (tinyrss) and authenticated user name (apache) do not match
FATAL:  Peer authentication failed for user "tinyrss"

I understand that postgresql uses host based authentication and since I do not have the same account name(tinyrss) as the host machine I needed to use a username map so I added this line into pg_ident.conf:

# MAPNAME       SYSTEM-USERNAME         PG-USERNAME
tinyrss hongyi tinyrss

and under pg_hba.conf:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
# local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident map=tinyrss
# IPv6 local connections:
host    all             all             ::1/128                 ident

Can I know what I am doing wrong and the solution to this? Thanks in advance!

1
  • 2
    Replace the ident with trust in pg_hba.conf and try again
    – wurtel
    Oct 28, 2014 at 13:27

2 Answers 2

5

Since you're using ident authentication and connecting with a user that has the operating system account name of apache, you need to have an entry mapping tinyrss to apache, as the message is hinting at.

The following line should work for you in your pg_ident.conf:

tinyrss apache tinyrss

1

I'm leaving my hint here since this question got high in google at the time I was searching for an answer.

If you are using ssl authentication make sure your ~/.postgresql/postgresql.crt common name is the same as the user you are trying to connect as. This user must be defined in pg_hba.conf on the server you are trying to connect to. Also your client must be connecting from allowed IP/host.

Hope this helps someone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .