Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Created March 5, 2016 22:05
Show Gist options
  • Save jameswhite/4564d844a27f83dbd8be to your computer and use it in GitHub Desktop.
Save jameswhite/4564d844a27f83dbd8be to your computer and use it in GitHub Desktop.
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
################################################################################
# install replication module
/usr/bin/ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" "(olcModuleLoad=back_bdb.la)" | /bin/grep "olcModuleLoad: {[0-9]*}back_bdb.la" ||\
/bin/cat<<EOF | /usr/bin/ldapadd -Y EXTERNAL -H ldapi:///
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
# olcModulePath: /usr/lib64/openldap
olcModulePath: /usr/lib/ldap
olcModuleLoad: back_bdb.la
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment