Skip to main content

myldapsync - fork of pgldapsync by EnterpriseDB Corporation adopted for MySQL and MariaDB

This Python module allows you to synchronize MySQL or MariaDB users with users in an LDAP directory.

Require MySQL 8 with installed and configured simple or sasl LDAP Authentication Plugin or PAM plugin (pam also supported in MySQL 5.7 and MariaDB).

Percona Server for MySQL:

https://docs.percona.com/percona-server/8.0/ldap-authentication

https://docs.percona.com/percona-server/8.0/pam-plugin.html

MySQL:

https://dev.mysql.com/doc/refman/8.0/en/ldap-pluggable-authentication.html

https://dev.mysql.com/doc/refman/8.0/en/pam-pluggable-authentication.html

MariaDB:

https://mariadb.com/kb/en/authentication-plugin-pam/

myldapsync is supported on Python 3.8 or later.

In order to use it, you will need to create a config.ini file containing the site-specific configuration you require. See config.ini.example for a complete list of all the available configuration options. This file should be copied to create your own configuration.

Once configured, simply run myldapsync like so:

python3 myldapsync.py /path/to/config.ini

In order to test the configuration (and dump the SQL that would be executed to stdout), run it like this:

python3 myldapsync.py --dry-run /path/to/config.ini

Creating a virtual environment for dev/test

python3 -m venv /path/to/myldapsync
source /path/to/myldapsync/bin/activate
pip install -r /path/to/myldapsync/requirements.txt

Adapt the first command as required for your environment/Python version.

Creating a package

To create a package (wheel), run the following in your virtual environment:

cd /path/to/myldapsync
pip install wheel
python3 setup.py sdist bdist_wheel

Installation from PyPI

Via pip:

pip install myldapsync

Via pipx:

pipx install myldapsync

Configuration

Example with some annotations - https://github.com/6eh01der/myldapsync/blob/main/myldapsync/config.ini.example

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myldapsync-1.0.11.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myldapsync-1.0.11-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file myldapsync-1.0.11.tar.gz.

File metadata

  • Download URL: myldapsync-1.0.11.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for myldapsync-1.0.11.tar.gz
Algorithm Hash digest
SHA256 f6aab080a695794fa202d6b9500ccd150204b43b1f34d0621dea14ac3264753e
MD5 c5b2cd64ee0cf75259c3296182f35cad
BLAKE2b-256 47e478f3f9e0d77c32b72d814f7beb01b0a24965cd01ae3cd48b820d92184622

See more details on using hashes here.

File details

Details for the file myldapsync-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: myldapsync-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for myldapsync-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 96822135f96327daa5d429df66ebfa20cc8d5b9ae742b015674eb02a117ee996
MD5 575d12bd46ce847659ebf7c4e18f57d8
BLAKE2b-256 d3229c7f53efbcbe139106bc142d4a4dd62024ca3421005874d27ed3cb74e015

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.11 This release

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

3 files

1.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page