https://github.com/python-ldap/python-slapd
Controls a slapd process in a pythonic way
https://github.com/python-ldap/python-slapd
ldap openldap openldap-slapd python python-ldap slapd
Last synced: 3 months ago
JSON representation
Controls a slapd process in a pythonic way
- Host: GitHub
- URL: https://github.com/python-ldap/python-slapd
- Owner: python-ldap
- License: mit
- Created: 2020-11-18T16:22:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-01T10:12:55.000Z (over 1 year ago)
- Last Synced: 2024-06-11T00:54:16.082Z (12 months ago)
- Topics: ldap, openldap, openldap-slapd, python, python-ldap, slapd
- Language: Python
- Homepage: https://slapd.readthedocs.io
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.rst
- License: LICENSE.md
Awesome Lists containing this project
README
# python-slapd [](https://slapd.readthedocs.io/en/latest/?badge=latest)
Controls your OpenLDAP process in a pythonic way.```
pip install slapd
``````python
>>> import slapd
>>> process = slapd.Slapd()
>>> process.start()
>>> process.init_tree()
>>> process.ldapwhoami().stdout.decode("utf-8")
'dn:cn=manager,dc=slapd-test,dc=python-ldap,dc=org\n'
>>> process.stop()
```# Troubleshooting
On distributions like Ubuntu, apparmor may restrict *slapd* to access some files that
*python-slapd* has generated. This situation can be solved by passing slapd in complain mode:```bash
sudo apt install --yes apparmor-utils
sudo aa-complain /usr/sbin/slapd
```