====== Veeam Upgrade: PostgreSQL SSPI Authentication Failed ======
**Summary:**
After upgrading Veeam Backup & Replication, the PostgreSQL service may fail authentication for the **postgres** user when using SSPI (Windows integrated authentication).
**Symptoms:**
During upgrade or Veeam service startup, the following error appears in logs:
FATAL: SSPI authentication failed for user "postgres"
**Root Cause:**
The local Windows account running the upgrade (often a local Administrator) isn’t mapped to the **postgres** database role.
Veeam’s installer attempts SSPI authentication via the Windows user, which PostgreSQL rejects unless explicitly mapped.
**Solution:**
Add a mapping for the local admin account to the **postgres** role in the PostgreSQL ident map configuration file.
**Steps:**
* 1 - Open the file:
C:\Program Files\PostgreSQL\15\data\pg_ident.conf
* 2 - Append a line mapping your Windows user to the **postgres** role:
# Map local Windows admin to postgres role
map_admin YOUR-PC\Administrator postgres
* 3 - Verify that **pg_hba.conf** uses the matching map:
host all postgres 127.0.0.1/32 sspi map=map_admin
* 4 - Restart the PostgreSQL service:
net stop postgresql-x64-15
net start postgresql-x64-15
**Verification:**
Run the following test to confirm:
psql -U postgres -h localhost
You should connect without SSPI authentication errors.
**Notes:**
* This typically happens on standalone or lab environments using local Windows accounts.
* In domain environments, ensure the domain account is mapped instead.
* File paths may differ depending on PostgreSQL version or Veeam installation directory.
**References:**
* [[https://www.postgresql.org/docs/current/auth-sspi.html|PostgreSQL Docs: SSPI Authentication]]
* [[https://www.veeam.com/kb4283|Veeam KB: PostgreSQL Authentication Issues]]