A swiss-army knife to synchronize PostgreSQL roles and privileges from YAML or LDAP, supporting creation, update, deletion, and privilege management.
- v6.6.0
- Published at
- Jul 7, 2026
- 237
- Stars
- 6,991
- Download
- Synced at
- 15d ago
Latest release
v6.6.0Jul 7, 2026, 09:20 AMDownloads slow? Switch the source anytime above
README
Project Overview
ldap2pg is a swiss-army knife to synchronize Postgres roles and privileges from YAML or LDAP. Postgres can check passwords against LDAP out of the box. ldap2pg automates the creation, update, and removal of PostgreSQL roles from an enterprise directory.
Key Features
- Supports PostgreSQL 17 down to 9.5
- Reads settings from an expressive YAML config file
- Creates, alters, and drops PostgreSQL roles from LDAP searches
- Creates static roles from YAML to complete LDAP entries
- Manages role parents (alias groups)
- Grants or revokes privileges statically or from LDAP entries
- Dry run and check mode
- Logs LDAP searches as
ldapsearch(1)commands - Logs every SQL statement
Target Audience
- PostgreSQL database administrators
- Operations engineers who need to sync users from enterprise directories
- Teams using LDAP as an identity source
Quick Start
- Download from the Releases page
- Install:
sudo yum install https://github.com/dalibo/ldap2pg/releases/download/v6.1/ldap2pg_6.1_linux_amd64.rpm - Create an
ldap2pg.ymlconfig file - Run:
ldap2pg --real
Core Advantages
- Automates role synchronization between enterprise directories and PostgreSQL
- Supports privilege granting and revocation
- Dry run and check mode for safety
System Requirements
- OS: Cross-platform (Linux, macOS, Windows)
- Architectures: x86_64, arm64
Release history
Sort