Project

General

Profile

Feature #4017

Add support for pgsql "peer" authentication

Added by mikl over 5 years ago. Updated over 5 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
postgresql handler
Target version:
-
Start date:
07/31/2012
Due date:
% Done:

0%

QA Check:

Description

I can't get the PostgreSQL backup working on Ubuntu 12.04.

Here's what I get when I try to run the command:

Info: >>>> starting action /etc/backup.d/20.pgsql (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_20.pgsql
Debug: chown 103 /srv/backups/postgres
Debug: chmod 700 /srv/backups/postgres
Debug: su - postgres -s /bin/bash -c "set -o pipefail ; /usr/bin/pg_dumpall | /bin/gzip --rsyncable > '/srv/backups/postgres/rain.example.com-all.sql.gz'" 
Warning: -su: /srv/backups/postgres/rain.example.com-all.sql.gz: Permission denied No directory, logging in with HOME=/
Warning: Failed to dump pgsql cluster
Warning: <<<< finished action /etc/backup.d/20.pgsql: WARNING

This is with the standard Ubuntu configuration of PostgreSQL that uses "peer" authentication for local connections. From pg_hbe.conf:

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer

History

#1 Updated by intrigeri over 5 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from pgsql backup fails on Ubuntu 12.04 to Add support for pgsql "peer" authentication
  • Status changed from New to Confirmed
  • Assignee deleted (intrigeri)

Yes, the pgsql handler currently only supports the "ident" authentication method. I would be happy to review a pull request that adds support for the "peer" authentication method.

Also available in: Atom PDF