Files
ldapsm/README.md
Kevin Veen-Birkenbach 2b86a16fed
Some checks failed
CI - tests / Unit tests (make test) (push) Has been cancelled
docs: switch installation instructions to PyPI
- Replace pkgmgr-based installation with pip install ldapsm
- Document required system dependencies for python-ldap
- Keep usage examples unchanged

https://chatgpt.com/share/695d2615-d664-800f-b821-5705c631bfe8
2026-01-06 16:24:29 +01:00

2.0 KiB

LDAP Schema Manager 🛠️

GitHub Sponsors Patreon Buy Me a Coffee PayPal

A Python-based CLI tool for managing OpenLDAP schema snippets under cn=config, allowing you to create or update schema entries—including custom olcAttributeTypes and olcObjectClasses—via LDAPI.

🚀 Installation (PyPI)

python3 -m pip install --upgrade pip
python3 -m pip install ldapsm

System dependencies (required for python-ldap)

python-ldap requires OpenLDAP development headers and SASL/SSL libraries.

Debian / Ubuntu:

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
  gcc python3-dev libldap2-dev libsasl2-dev libssl-dev

Arch Linux:

sudo pacman -S --needed gcc openldap

📝 Usage

After installation, run:

ldapsm --help

Example

ldapsm \
  -s ldapi:/// \
  -D "" \
  -W "" \
  -n nextcloud \
  -a "( 1.3.6.1.4.1.99999.1 NAME 'nextcloudQuota' DESC 'Quota for Nextcloud' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )" \
  -c "( 1.3.6.1.4.1.99999.2 NAME 'nextcloudUser' DESC 'Auxiliary class for Nextcloud attributes' AUXILIARY MAY ( nextcloudQuota ) )"

📖 Help

For detailed usage and options, run:

ldapsm --help

🛡️ Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues.

📜 License

This project is licensed under the MIT License.


Author: Kevin Veen-Birkenbach