Skip to content

Get path of pg_hba.conf #3

@tukusejssirs

Description

@tukusejssirs

You have hardcoded the path of pg_hba.conf to /var/lib/pgsql/data/pg_hba.conf, but it can be in /var/lib/pgsql/data/*/pg_hba.conf where * is psql version (like 10). From here I’ve got the following command which does not ask for postgres password with the default config.

pg_hba_path=$(sudo -u postgres psql -t -P format=unaligned -c 'show hba_file;')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions