Clean-up uniqueMember entries in groupOfUniqueNames
Currently this script interactively asks what to do for every group. There is no unattended mode yet.
Install dependencies
pipenv installExecute the script directly
pipenv run ./px-ldap-group-cleanupor activate the venv-first
pipenv shell
./px-ldap-group-cleanupInstall dependencies
pip install -r requirements-devel.txtDynamically linking to the repo
python3 setup.py developInstall dependencies
pip install -r requirements.txtStatically install the script
python setup.py installAll parameters set via command-line can also be set in the config.
~/.config/px-ldap-group-cleanup.yaml:
---
# the ldap-servers domain-name or IP
host: ldap.example.org
# where to start searches
search_base: dc=example,dc=org
# user-dn for bind
bind_dn: cn=my-script-user,ou=admins,dc=example,dc=org
# user password
bind_pw: <better-use-stdin>
...
If no password is is defined it will be requested via getpass:
px-ldap-group-cleanup \
--host='ldap.example.org' \
--search-base='dc=example,dc=org' \
--bind-dn='cn=my-script-user,ou=admins,dc=example,dc=org'