Add support for pgsql "peer" authentication
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
#1 Updated by intrigeri about 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 (
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.