ldap-preg_replace is a Perl tool to modify LDAP attribute values using a regular expression.
It is a small tool written in perl that allows you to easily modifiy LDAP attribute values based on a regular expression (RegEx). Sometimes an administrator needs to modify many entries at once that fit some common criteria, for example remove every special character from the telephoneNumber attribute. This is the ideal chance to save time by using ldap-preg_replace.pl.
Regular expressions are patterns describing text systematics. For example, the pattern "/Number: d/" matches each string, that has the fixed string "Number: " followed by a digit.
Regular expressions (RegEx) are a simple but very powerful method to describe text. This allows for maximum flexibility to describe what exaclty you want to replace.
LDAP is a protocol used to communicate with directory servers such as OpenLDAP. Directory servers are database servers that store the data hierarchical instead of a tabular representation. This makes them the ideal choice for central user management, but also other demands.
How does it work?
It is very simple since it runs from command line. Just download it and call it without parameters. This will give you all options that can be set. Calling it with the "-h" parameter even gives some more advice.
Additionally, you can find a more detailed documentation in the release package.
What's New in This Release: [ read full changelog ]
· New -A parameter
· Added description of -A to README
Slightly changed default behavior:
· providing -a now only operates on present values like in 0.9.2
· providing an empty pattern (s/^$/...) must be used now to indicate value addition if emtpys attribute is not set
· A together with an empty pattern indicates that value addition should also occur if the entries attribute already contains values
· Some comment changes