pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Ident authentication failed
14+ messages / 9 participants
[nested] [flat]

* Ident authentication failed
@ 2006-01-03 03:17  Lucky Leavell <pgsql@UniXpress.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Lucky Leavell @ 2006-01-03 03:17 UTC (permalink / raw)
  To: pgsql-general

v8.0.3
OS: SuSE 10.0 Pro

I am new to PostgreSQL but fairly familiar with other RDBMS' such as 
Ingres, Informix and MySQL.

I am attempting to switch from using MySQL to PostgreSQL with postfix. I 
have created the postfix user using createuser with a password but denying 
the ability to create databases or other users. However when I attempt to 
login even using psql:

	psql -W -U postfix

it prompts me for the password and I enter the one that user was created 
with. The resulting error is:

	psql: FATAL: Ident authentication failed for user 'postfix'

I know I must be missing something simple but I cannot find it in the docs 
or FAQs. Please point me in the right direction.

Thank you,
Lucky



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2006-01-03 04:10  Madison Kelly <linux@alteeve.com>
  parent: Lucky Leavell <pgsql@UniXpress.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Madison Kelly @ 2006-01-03 04:10 UTC (permalink / raw)
  To: pgsql-general

Lucky Leavell wrote:
> v8.0.3
> OS: SuSE 10.0 Pro
> 
> I am new to PostgreSQL but fairly familiar with other RDBMS' such as 
> Ingres, Informix and MySQL.
> 
> I am attempting to switch from using MySQL to PostgreSQL with postfix. I 
> have created the postfix user using createuser with a password but denying 
> the ability to create databases or other users. However when I attempt to 
> login even using psql:
> 
> 	psql -W -U postfix
> 
> it prompts me for the password and I enter the one that user was created 
> with. The resulting error is:
> 
> 	psql: FATAL: Ident authentication failed for user 'postfix'
> 
> I know I must be missing something simple but I cannot find it in the docs 
> or FAQs. Please point me in the right direction.
> 
> Thank you,
> Lucky

By default, PostgreSQL won't let you connect unless your system user 
account matches the user account in postgres... You can either 'su' to 
the 'postfix' user or edit your 'pg_hba.conf' file to have the line:

local all all      trust

Usually there will already be the line:

local all all      ident sameuser

Be aware though that this essentially opens postgres access to anyone 
with shell access. There are a few other ways to deal with them but the 
PostgreSQL docs do a better job at explaining it than I can.

HTH!

Madison

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
           Madison Kelly (Digimer)
    TLE-BU; The Linux Experience, Back Up
Main Project Page:  http://tle-bu.org
Community Forum:    http://forum.tle-bu.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2006-01-03 04:30  Lucky Leavell <pgsql@UniXpress.com>
  parent: Madison Kelly <linux@alteeve.com>
  0 siblings, 0 replies; 14+ messages in thread

From: Lucky Leavell @ 2006-01-03 04:30 UTC (permalink / raw)
  To: pgsql-general



On Mon, 2 Jan 2006, Madison Kelly wrote:

> Lucky Leavell wrote:
> > v8.0.3
> > OS: SuSE 10.0 Pro
> > 
> > I am new to PostgreSQL but fairly familiar with other RDBMS' such as Ingres,
> > Informix and MySQL.
> > 
> > I am attempting to switch from using MySQL to PostgreSQL with postfix. I
> > have created the postfix user using createuser with a password but denying
> > the ability to create databases or other users. However when I attempt to
> > login even using psql:
> > 
> >  psql -W -U postfix
> > 
> > it prompts me for the password and I enter the one that user was created
> > with. The resulting error is:
> > 
> >  psql: FATAL: Ident authentication failed for user 'postfix'
> > 
> > I know I must be missing something simple but I cannot find it in the docs
> > or FAQs. Please point me in the right direction.
> > 
> > Thank you,
> > Lucky
> 
> By default, PostgreSQL won't let you connect unless your system user account
> matches the user account in postgres... You can either 'su' to the 'postfix'
> user or edit your 'pg_hba.conf' file to have the line:
> 
> local all all      trust
> 
> Usually there will already be the line:
> 
> local all all      ident sameuser
> 
> Be aware though that this essentially opens postgres access to anyone with
> shell access. There are a few other ways to deal with them but the PostgreSQL
> docs do a better job at explaining it than I can.
>
I tried your suggestion except substituting "password" for "trust" and 
it seems to work without giving the farm away! 

Many thanks,
Lucky



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Ident authentication failed
@ 2020-03-26 19:29  Ted To <wintrymix@theo.to>
  0 siblings, 2 replies; 14+ messages in thread

From: Ted To @ 2020-03-26 19:29 UTC (permalink / raw)
  To: pgsql-general

Hi,

I'm trying to configure miniflux and am struggling to figure out how to 
configure postgres for that purpose.  (The miniflux instructions are 
very terse.)  Regardless of whether I run the command as the postgres 
user or the miniflux user, I get similar errors.  I am running Centos 7 
using the updated scl version of postgres (9.6.10).

With the following, the postgres user "miniflux" along with the password 
are specified in /etc/miniflux.conf.

$ miniflux -c /etc/miniflux.conf -migrate
Current schema version: 0
Latest schema version: 26
Migrating to version: 1
[FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"

I have no problems logging into postgres as the miniflux user using the 
same password specified in /etc/miniflux.conf.

Running the same command without specifying the configuration file uses 
the postgres user and also fails

$ miniflux -migrate
[INFO] The default value for DATABASE_URL is used
Current schema version: 0
Latest schema version: 26
Migrating to version: 1
[FATAL] [Migrate] pq: Ident authentication failed for user "postgres"

My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes

# TYPE  DATABASE        USER            ADDRESS METHOD

local   miniflux   miniflux      trust
local   miniflux   postgres      trust

# "local" is for Unix domain socket connections only
local   all             all peer
# IPv4 local connections:
host    all             all             127.0.0.1/32 trust

I'm at a complete loss.

Any suggestions?

Thanks,

Ted To

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 19:35  Ron <ronljohnsonjr@gmail.com>
  parent: Ted To <wintrymix@theo.to>
  1 sibling, 1 reply; 14+ messages in thread

From: Ron @ 2020-03-26 19:35 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

You're only allowing "trust" authentication, not "ident" authentication.

On 3/26/20 2:29 PM, Ted To wrote:
>
> Hi,
>
> I'm trying to configure miniflux and am struggling to figure out how to 
> configure postgres for that purpose.  (The miniflux instructions are very 
> terse.)  Regardless of whether I run the command as the postgres user or 
> the miniflux user, I get similar errors.  I am running Centos 7 using the 
> updated scl version of postgres (9.6.10).
>
> With the following, the postgres user "miniflux" along with the password 
> are specified in /etc/miniflux.conf.
>
> $ miniflux -c /etc/miniflux.conf -migrate
> Current schema version: 0
> Latest schema version: 26
> Migrating to version: 1
> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>
> I have no problems logging into postgres as the miniflux user using the 
> same password specified in /etc/miniflux.conf.
>
> Running the same command without specifying the configuration file uses 
> the postgres user and also fails
>
> $ miniflux -migrate
> [INFO] The default value for DATABASE_URL is used
> Current schema version: 0
> Latest schema version: 26
> Migrating to version: 1
> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>
> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>
> # TYPE  DATABASE        USER            ADDRESS METHOD
>
> local   miniflux   miniflux      trust
> local   miniflux   postgres      trust
>
> # "local" is for Unix domain socket connections only
> local   all             all peer
> # IPv4 local connections:
> host    all             all             127.0.0.1/32 trust
>
> I'm at a complete loss.
>
> Any suggestions?
>
> Thanks,
>
> Ted To
>

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 19:35  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ted To <wintrymix@theo.to>
  1 sibling, 1 reply; 14+ messages in thread

From: Adrian Klaver @ 2020-03-26 19:35 UTC (permalink / raw)
  To: Ted To <wintrymix@theo.to>; pgsql-general

On 3/26/20 12:29 PM, Ted To wrote:
> Hi,
> 
> I'm trying to configure miniflux and am struggling to figure out how to 
> configure postgres for that purpose.  (The miniflux instructions are 
> very terse.)  Regardless of whether I run the command as the postgres 
> user or the miniflux user, I get similar errors.  I am running Centos 7 
> using the updated scl version of postgres (9.6.10).
> 
> With the following, the postgres user "miniflux" along with the password 
> are specified in /etc/miniflux.conf.
> 
> $ miniflux -c /etc/miniflux.conf -migrate
> Current schema version: 0
> Latest schema version: 26
> Migrating to version: 1
> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
> 
> I have no problems logging into postgres as the miniflux user using the 
> same password specified in /etc/miniflux.conf.
> 
> Running the same command without specifying the configuration file uses 
> the postgres user and also fails
> 
> $ miniflux -migrate
> [INFO] The default value for DATABASE_URL is used
> Current schema version: 0
> Latest schema version: 26
> Migrating to version: 1
> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"

Can you show the entire connection string used by miniflux?

Did you reload/restart the server after making the changes below?

> 
> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
> 
> # TYPE  DATABASE        USER            ADDRESS METHOD
> 
> local   miniflux   miniflux      trust
> local   miniflux   postgres      trust
> 
> # "local" is for Unix domain socket connections only
> local   all             all peer
> # IPv4 local connections:
> host    all             all             127.0.0.1/32 trust
> 
> I'm at a complete loss.
> 
> Any suggestions?
> 
> Thanks,
> 
> Ted To
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 19:40  Ted To <ted@theo.to>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 3 replies; 14+ messages in thread

From: Ted To @ 2020-03-26 19:40 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Thank you -- I added two lines to the hba file to allow for ident 
authentication, restarted postgres and still the same errors.

On 3/26/20 3:35 PM, Ron wrote:
> You're only allowing "trust" authentication, not "ident" authentication.
>
> On 3/26/20 2:29 PM, Ted To wrote:
>>
>> Hi,
>>
>> I'm trying to configure miniflux and am struggling to figure out how 
>> to configure postgres for that purpose.  (The miniflux instructions 
>> are very terse.)  Regardless of whether I run the command as the 
>> postgres user or the miniflux user, I get similar errors.  I am 
>> running Centos 7 using the updated scl version of postgres (9.6.10).
>>
>> With the following, the postgres user "miniflux" along with the 
>> password are specified in /etc/miniflux.conf.
>>
>> $ miniflux -c /etc/miniflux.conf -migrate
>> Current schema version: 0
>> Latest schema version: 26
>> Migrating to version: 1
>> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>>
>> I have no problems logging into postgres as the miniflux user using 
>> the same password specified in /etc/miniflux.conf.
>>
>> Running the same command without specifying the configuration file 
>> uses the postgres user and also fails
>>
>> $ miniflux -migrate
>> [INFO] The default value for DATABASE_URL is used
>> Current schema version: 0
>> Latest schema version: 26
>> Migrating to version: 1
>> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>>
>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>>
>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>
>> local   miniflux   miniflux      trust
>> local   miniflux   postgres      trust
>>
>> # "local" is for Unix domain socket connections only
>> local   all             all peer
>> # IPv4 local connections:
>> host    all             all             127.0.0.1/32 trust
>>
>> I'm at a complete loss.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Ted To
>>
>

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 19:43  Ted To <ted@theo.to>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Ted To @ 2020-03-26 19:43 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


On 3/26/20 3:35 PM, Adrian Klaver wrote:
> Can you show the entire connection string used by miniflux?
The miniflux command is binary so, no, not easily.
>
> Did you reload/restart the server after making the changes below?
Yes.
>
>>
>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>>
>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>
>> local   miniflux   miniflux      trust
>> local   miniflux   postgres      trust
>>
>> # "local" is for Unix domain socket connections only
>> local   all             all peer
>> # IPv4 local connections:
>> host    all             all             127.0.0.1/32 trust
>>
>> I'm at a complete loss.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Ted To
>>
>
>

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 19:45  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ted To <ted@theo.to>
  2 siblings, 0 replies; 14+ messages in thread

From: Adrian Klaver @ 2020-03-26 19:45 UTC (permalink / raw)
  To: Ted To <ted@theo.to>; pgsql-general@lists.postgresql.org

On 3/26/20 12:40 PM, Ted To wrote:
> Thank you -- I added two lines to the hba file to allow for ident 
> authentication, restarted postgres and still the same errors.

Without knowing how the client is trying to connect to the server this 
issue will be difficult to solve.

> 
> On 3/26/20 3:35 PM, Ron wrote:
>> You're only allowing "trust" authentication, not "ident" authentication.
>>
>> On 3/26/20 2:29 PM, Ted To wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to configure miniflux and am struggling to figure out how 
>>> to configure postgres for that purpose.  (The miniflux instructions 
>>> are very terse.)  Regardless of whether I run the command as the 
>>> postgres user or the miniflux user, I get similar errors.  I am 
>>> running Centos 7 using the updated scl version of postgres (9.6.10).
>>>
>>> With the following, the postgres user "miniflux" along with the 
>>> password are specified in /etc/miniflux.conf.
>>>
>>> $ miniflux -c /etc/miniflux.conf -migrate
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>>>
>>> I have no problems logging into postgres as the miniflux user using 
>>> the same password specified in /etc/miniflux.conf.
>>>
>>> Running the same command without specifying the configuration file 
>>> uses the postgres user and also fails
>>>
>>> $ miniflux -migrate
>>> [INFO] The default value for DATABASE_URL is used
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>>>
>>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>>>
>>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>>
>>> local   miniflux   miniflux      trust
>>> local   miniflux   postgres      trust
>>>
>>> # "local" is for Unix domain socket connections only
>>> local   all             all peer
>>> # IPv4 local connections:
>>> host    all             all             127.0.0.1/32 trust
>>>
>>> I'm at a complete loss.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> Ted To
>>>
>>


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 20:21  Rob Sargent <robjsargent@gmail.com>
  parent: Ted To <ted@theo.to>
  0 siblings, 0 replies; 14+ messages in thread

From: Rob Sargent @ 2020-03-26 20:21 UTC (permalink / raw)
  To: Ted To <ted@theo.to>; +Cc: pgsql-general@lists.postgresql.org



> On Mar 26, 2020, at 1:43 PM, Ted To <ted@theo.to> wrote:
> 
> 
> 
> On 3/26/20 3:35 PM, Adrian Klaver wrote:
>> Can you show the entire connection string used by miniflux? 
> The miniflux command is binary so, no, not easily.
>> 
>> Did you reload/restart the server after making the changes below? 
> Yes.
>> 
>>> 

Do you have psql client?  Connect as postgres user?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 20:24  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ted To <ted@theo.to>
  2 siblings, 1 reply; 14+ messages in thread

From: Adrian Klaver @ 2020-03-26 20:24 UTC (permalink / raw)
  To: Ted To <ted@theo.to>; pgsql-general@lists.postgresql.org

On 3/26/20 12:40 PM, Ted To wrote:
> Thank you -- I added two lines to the hba file to allow for ident 
> authentication, restarted postgres and still the same errors.

Alright from here:

https://miniflux.app/docs/configuration.html
The Golang Postgres client pq is being used and:

"The default value for DATABASE_URL is user=postgres password=postgres 
dbname=miniflux2 sslmode=disable."

 From here:

https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters

"host - The host to connect to. Values that start with / are for unix
   domain sockets. (default is localhost)"

So unless you have specified a host in the conf file you need to be 
paying attention to the lines in pg_hba.conf that start with host.

Where the two lines you added above for host?

You can check what is happening on the server end by looking in the 
Postgres logs. That will also show you the connection string.


Do you have more then one instance of Postgres on the machine?

> 
> On 3/26/20 3:35 PM, Ron wrote:
>> You're only allowing "trust" authentication, not "ident" authentication.
>>
>> On 3/26/20 2:29 PM, Ted To wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to configure miniflux and am struggling to figure out how 
>>> to configure postgres for that purpose.  (The miniflux instructions 
>>> are very terse.)  Regardless of whether I run the command as the 
>>> postgres user or the miniflux user, I get similar errors.  I am 
>>> running Centos 7 using the updated scl version of postgres (9.6.10).
>>>
>>> With the following, the postgres user "miniflux" along with the 
>>> password are specified in /etc/miniflux.conf.
>>>
>>> $ miniflux -c /etc/miniflux.conf -migrate
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>>>
>>> I have no problems logging into postgres as the miniflux user using 
>>> the same password specified in /etc/miniflux.conf.
>>>
>>> Running the same command without specifying the configuration file 
>>> uses the postgres user and also fails
>>>
>>> $ miniflux -migrate
>>> [INFO] The default value for DATABASE_URL is used
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>>>
>>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>>>
>>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>>
>>> local   miniflux   miniflux      trust
>>> local   miniflux   postgres      trust
>>>
>>> # "local" is for Unix domain socket connections only
>>> local   all             all peer
>>> # IPv4 local connections:
>>> host    all             all             127.0.0.1/32 trust
>>>
>>> I'm at a complete loss.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> Ted To
>>>
>>


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 20:33  Christoph Moench-Tegeder <cmt@burggraben.net>
  parent: Ted To <ted@theo.to>
  2 siblings, 1 reply; 14+ messages in thread

From: Christoph Moench-Tegeder @ 2020-03-26 20:33 UTC (permalink / raw)
  To: Ted To <ted@theo.to>; +Cc: pgsql-general@lists.postgresql.org

## Ted To (ted@theo.to):

> Thank you -- I added two lines to the hba file to allow for ident
> authentication, restarted postgres and still the same errors.

You probably don't want "ident" authentication - that's the thing
with "identd" (see RfC 1413), which even 20 years ago was only used
in connection with IRC, but not really for "authentication".

You'd rather want "scram-sha-256" as the authentication method (hoping
that whatever-go-uses can do that - come on, we got that in version 10),
or (if that's not possible) "md5". See
https://www.postgresql.org/docs/12/auth-methods.html and
https://www.postgresql.org/docs/12/auth-pg-hba-conf.html .
Note that "password_encryption" has to match that authentication method
from pg_hba.conf, that's described in
https://www.postgresql.org/docs/12/auth-password.html .

Regards,
Christoph

-- 
Spare Space





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-26 20:54  Ted To <ted@theo.to>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 14+ messages in thread

From: Ted To @ 2020-03-26 20:54 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Thanks for the many responses I've gotten!  What a useful and welcoming 
community!

I finally managed to get it configured following: 
https://github.com/miniflux/miniflux/issues/80#issuecomment-375996546

On 3/26/20 4:24 PM, Adrian Klaver wrote:
> On 3/26/20 12:40 PM, Ted To wrote:
>> Thank you -- I added two lines to the hba file to allow for ident 
>> authentication, restarted postgres and still the same errors.
>
> Alright from here:
>
> https://miniflux.app/docs/configuration.html
> The Golang Postgres client pq is being used and:
>
> "The default value for DATABASE_URL is user=postgres password=postgres 
> dbname=miniflux2 sslmode=disable."
>
> From here:
>
> https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters
>
> "host - The host to connect to. Values that start with / are for unix
>   domain sockets. (default is localhost)"
>
> So unless you have specified a host in the conf file you need to be 
> paying attention to the lines in pg_hba.conf that start with host.
>
> Where the two lines you added above for host?
>
> You can check what is happening on the server end by looking in the 
> Postgres logs. That will also show you the connection string.
>
>
> Do you have more then one instance of Postgres on the machine?
>
>>
>> On 3/26/20 3:35 PM, Ron wrote:
>>> You're only allowing "trust" authentication, not "ident" 
>>> authentication.
>>>
>>> On 3/26/20 2:29 PM, Ted To wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to configure miniflux and am struggling to figure out 
>>>> how to configure postgres for that purpose.  (The miniflux 
>>>> instructions are very terse.)  Regardless of whether I run the 
>>>> command as the postgres user or the miniflux user, I get similar 
>>>> errors.  I am running Centos 7 using the updated scl version of 
>>>> postgres (9.6.10).
>>>>
>>>> With the following, the postgres user "miniflux" along with the 
>>>> password are specified in /etc/miniflux.conf.
>>>>
>>>> $ miniflux -c /etc/miniflux.conf -migrate
>>>> Current schema version: 0
>>>> Latest schema version: 26
>>>> Migrating to version: 1
>>>> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>>>>
>>>> I have no problems logging into postgres as the miniflux user using 
>>>> the same password specified in /etc/miniflux.conf.
>>>>
>>>> Running the same command without specifying the configuration file 
>>>> uses the postgres user and also fails
>>>>
>>>> $ miniflux -migrate
>>>> [INFO] The default value for DATABASE_URL is used
>>>> Current schema version: 0
>>>> Latest schema version: 26
>>>> Migrating to version: 1
>>>> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>>>>
>>>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file 
>>>> includes
>>>>
>>>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>>>
>>>> local   miniflux   miniflux      trust
>>>> local   miniflux   postgres      trust
>>>>
>>>> # "local" is for Unix domain socket connections only
>>>> local   all             all peer
>>>> # IPv4 local connections:
>>>> host    all             all             127.0.0.1/32 trust
>>>>
>>>> I'm at a complete loss.
>>>>
>>>> Any suggestions?
>>>>
>>>> Thanks,
>>>>
>>>> Ted To
>>>>
>>>
>
>

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Ident authentication failed
@ 2020-03-29 23:21  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Christoph Moench-Tegeder <cmt@burggraben.net>
  0 siblings, 0 replies; 14+ messages in thread

From: Peter J. Holzer @ 2020-03-29 23:21 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2020-03-26 21:33:51 +0100, Christoph Moench-Tegeder wrote:
> ## Ted To (ted@theo.to):
> > Thank you -- I added two lines to the hba file to allow for ident
> > authentication, restarted postgres and still the same errors.
> 
> You probably don't want "ident" authentication - that's the thing
> with "identd" (see RfC 1413),

Depends on the type of socket. For unix sockets it's the same as peer
authentication.

> which even 20 years ago was only used in connection with IRC, but not
> really for "authentication".

I don't think there are any linux distributions which install identd by
default any more, so it wouldn't work anyway.


> You'd rather want "scram-sha-256" as the authentication method (hoping
> that whatever-go-uses can do that - come on, we got that in version 10),
> or (if that's not possible) "md5".

Actually, for local connections I prefer "peer". I'm already
authenticated by the OS, no need for a (second) password.

I should add that you shouldn't use "trust" unless 
* no connection from other hosts is allowed, and
* all users on this host should have full access anyway.
This is rarely the case.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2020-03-29 23:21 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-03 03:17 Ident authentication failed Lucky Leavell <pgsql@UniXpress.com>
2006-01-03 04:10 ` Madison Kelly <linux@alteeve.com>
2006-01-03 04:30   ` Lucky Leavell <pgsql@UniXpress.com>
2020-03-26 19:29 Ident authentication failed Ted To <wintrymix@theo.to>
2020-03-26 19:35 ` Ron <ronljohnsonjr@gmail.com>
2020-03-26 19:40   ` Ted To <ted@theo.to>
2020-03-26 19:45     ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-03-26 20:24     ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-03-26 20:54       ` Ted To <ted@theo.to>
2020-03-26 20:33     ` Christoph Moench-Tegeder <cmt@burggraben.net>
2020-03-29 23:21       ` Peter J. Holzer <hjp-pgsql@hjp.at>
2020-03-26 19:35 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-03-26 19:43   ` Ted To <ted@theo.to>
2020-03-26 20:21     ` Rob Sargent <robjsargent@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox