Changes

Jump to: navigation, search

stoney core: OpenLDAP ldapseach and replace

87 bytes added, 11:00, 14 December 2020
/* Search an replace - Replace the content of sstMailFrom attribute */
== Search an replace - Replace the content of sstMailFrom attribute ==
<source lang='bash'>
# Set the following bash variables
ldap_attribute="sstMailFrom" # The attribute we're interested in. For example: sstMailFrom
ldap_attribute_old="Support stepping stone GmbH <support@stepping-stone.ch>" # Original (old) value of the attribute.
ldap_attribute_new="Support stepping stone AG <support@stepping-stone.ch>" # The new value, that the original (old) value of the attribute is to be replaced with.
 
ldap_bind_password='' # The password of "cn=Manager,o=stepping-stone,c=ch"
# Don't change these bash variables
ldap_server="ldaps://ldapm.stepping-stone.ch:636"
ldap_base="ou=services,o=stepping-stone,c=ch"
</source>
Execute the search:
<source lang='bash'>
# Get all child entries.
</source>
# The result will contain something like:
<source lang=lang='ldif'>
dn: ou=unsuccessful,ou=templates,uid=5000000,ou=reseller,ou=configuration,ou=b
3,368
edits