PostgreSQL SSPI authentication - FATAL: 2801: password authentication failed for user "xxx"

chris

I'm pretty new to PostgreSQL, having a fair amount of experience with MS SQL Server. One feature of PostgreSQL that has caught my eye is SSPI authentication, which I hoped would make the transition from MS SQL easier. However, I can't seem to get it to work.

For now, both server and client are running on the same Windows 7 machine, which is not a member of a domain. If I understand correctly, SSPI auth falls back from Kerberos to NTLM, so it should work without a domain - am I right?

When I try to connect (from a .NET application via Npgsql), I get an NpgsqlException with the message: Fatal: 28P01: password authentication failed for user "xxx" The message is a bit puzzling to me because I'm not using password authentication.

My pg_hba.conf:

host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
host    all             all             127.0.0.1/32            sspi

Npgsql connection string:

Server=127.0.0.1;Port=5432;Database=mydb;Integrated Security=true;

What am I doing wrong here? Or is it that it just doesn't work without a domain?

chris

Ok, got it. I can't allow MD5 and SSPI authentication at the same time. So be it There is no "fall-through" mechanism - only the first authentication method that matches the request is attempted. So all that was left to do was to remove the first two lines from pg_hba.conf and create a role with the same name as my Windows login. What's bugging me is that what is obviously a configuration error is silently ignored, not even a warning in the log - is there any reason behind this?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

FATAL: password authentication failed for user "postgres" (postgresql 11 with pgAdmin 4)

From Dev

FATAL: password authentication failed for user "postgres"

From Java

Postgresql: password authentication failed for user "postgres"

From Dev

psql: FATAL: Ident authentication failed for user "xxx" with method trust

From Dev

psql: FATAL: password authentication failed for user windows 8

From Dev

PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

From Dev

Redshift connection issue: FATAL: password authentication failed for user

From Dev

FATAL: password authentication failed for user "postgres" Ubuntu v20.10

From Dev

remote: Invalid username or password, fatal: Authentication failed for

From Java

psql: FATAL: Peer authentication failed for user "dev"

From Dev

psql: FATAL: PAM authentication failed for user

From Dev

FATAL: Peer authentication failed for user "rails"

From Dev

FATAL: Peer authentication failed for user "shop"

From Dev

Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

From Dev

psql: FATAL: password authentication failed for user error while trying to access psql

From Dev

PostgreSQL: MD5 Authentication in pg_hba.conf gives me FATAL: Peer authentication failed for user "postgres"

From Dev

PSQL - password authentication failed for user "postgres"

From Dev

error: password authentication failed for user "myuser"

From Dev

jitterbit-password authentication failed for user "postgres"

From Dev

Password authentication failed for a user not in my role list

From Dev

PostgreSQL password authentication failed for user "postgres", not the same user as specified in my app config

From Java

git remote: Invalid username or password. fatal: Authentication failed - ubuntu

From Dev

remote: Invalid username or password. fatal: Authentication failed for

From Java

I tried to change postgresql md5 to scram-sha-256 and I get FATAL password authentication failed

From Dev

How to solve " django.db.utils.OperationalError: FATAL: password authentication failed for user "Oeloun-pc" " in Pycharm Windows?

From Dev

Fatal! Authentication for user postgres failed, multiples OS, nothing work

From Dev

PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

From Dev

fatal: Authentication failed Git Bash

From Dev

Fatal: authentication failed for [GIT client]

Related Related

  1. 1

    FATAL: password authentication failed for user "postgres" (postgresql 11 with pgAdmin 4)

  2. 2

    FATAL: password authentication failed for user "postgres"

  3. 3

    Postgresql: password authentication failed for user "postgres"

  4. 4

    psql: FATAL: Ident authentication failed for user "xxx" with method trust

  5. 5

    psql: FATAL: password authentication failed for user windows 8

  6. 6

    PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

  7. 7

    Redshift connection issue: FATAL: password authentication failed for user

  8. 8

    FATAL: password authentication failed for user "postgres" Ubuntu v20.10

  9. 9

    remote: Invalid username or password, fatal: Authentication failed for

  10. 10

    psql: FATAL: Peer authentication failed for user "dev"

  11. 11

    psql: FATAL: PAM authentication failed for user

  12. 12

    FATAL: Peer authentication failed for user "rails"

  13. 13

    FATAL: Peer authentication failed for user "shop"

  14. 14

    Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

  15. 15

    psql: FATAL: password authentication failed for user error while trying to access psql

  16. 16

    PostgreSQL: MD5 Authentication in pg_hba.conf gives me FATAL: Peer authentication failed for user "postgres"

  17. 17

    PSQL - password authentication failed for user "postgres"

  18. 18

    error: password authentication failed for user "myuser"

  19. 19

    jitterbit-password authentication failed for user "postgres"

  20. 20

    Password authentication failed for a user not in my role list

  21. 21

    PostgreSQL password authentication failed for user "postgres", not the same user as specified in my app config

  22. 22

    git remote: Invalid username or password. fatal: Authentication failed - ubuntu

  23. 23

    remote: Invalid username or password. fatal: Authentication failed for

  24. 24

    I tried to change postgresql md5 to scram-sha-256 and I get FATAL password authentication failed

  25. 25

    How to solve " django.db.utils.OperationalError: FATAL: password authentication failed for user "Oeloun-pc" " in Pycharm Windows?

  26. 26

    Fatal! Authentication for user postgres failed, multiples OS, nothing work

  27. 27

    PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

  28. 28

    fatal: Authentication failed Git Bash

  29. 29

    Fatal: authentication failed for [GIT client]

HotTag

Archive