cookbook 'ldapknife', '= 0.0.14'
ldapknife (9) Versions 0.0.14 Follow3
Installs ldapknife.pl to /usr/local/bin
cookbook 'ldapknife', '= 0.0.14', :supermarket
knife supermarket install ldapknife
knife supermarket download ldapknife
DESCRIPTION
ldapknife.pl is a command-line utility mainly used to do mass deletions
from an OpenLDAP/AD directory by building an LDIF on-the-fly and using it as input.ldapknife.pl will be mostly useful during the test/dev phase of building
an OpenLDAP directory.You may also find it useful when doing mass deletions or purging of old
data from an OpenLDAP directory.
ATTRIBUTES
- There are currently no attributes for this cookbook.
USAGE
The primary function of ldapknife.pl is to delete ALL distinguished names ( e.g. DNs ) from a given search base.
This option is envoked by the --delall option. NOTE: --delall requires -b, -D, -H & --obj options to be given.
You can also execute ./ldapknife.pl --help for the help menu.
EXAMPLE1: ./ldapknife.pl --delall yes -D "cn=Manager,dc=example,dc=com" -b "cn=TestUsers,dc=example,dc=com" -H ldap://ldap.example.com --obj objectclass=person --dir /tmp -w SECRET_PASS_HERE
In EXAMPLE1, ldapknife.pl will DELETE ALL objects of type person in the container cn=TestUsers,dc=example,dc=com by connecting to ldap server ldap://ldap.example.com,
building the file /tmp/delete_ldif.ldif and using it as input to build another LDIF which will contain changtype:delete for each DN found in the TestUsers container.
The password for the admin account "cn=Manager,dc=example,dc=com" is specified with the -w option.
NOTE: If the --dir option is not given, files delete_all_dn_formatted.ldif, delete_all_dn.ldif, deleteAllDN.ldif, and delete_ldif.ldif will get written to PWD.
NOTE ABOUT *.LDIF FILES
- delete_dn.ldif - LDIF produced by calling ldapsearchand passing it required parameters.
- delete_all_dn_formatted.ldif - Same as delete_dn.ldif with line wrapping removed.
- delete_all_dn.ldif - LDIF of all DNs from delete_all_dn_formatted.ldif of changetype:delete.
- deleteAllDN.ldif - Same as delete_all_dn.ldif with last blank line removed.
TO-DO-LIST
- Implement ability to backup an OpenLDAP directory using slapcat.
- Implement ability to delete OpenLDAP database transaction database logs using slapd_db_archive.
Dependent cookbooks
perl >= 0.0.0 |
yumrepo >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.