ldap-preg_replace.pl README
---------------------------
This is a brief description of ldap-preg_replace.pl, a tool written in perl
that you can use to change values of attributes in a directory service online.
Because it uses regular expressions it is very powerful but remains easy.
It is able to process very much entries, and should be only limited to
the sizelimit configuration of your LDAP server.
TODOs:
- None at the moment, it should be feature complete already :)
Please feel free to suggest new features via ths SF-Tracker.
I. Prerequisites and installing
Installation is not neccessary. Just make the file executable
if it is not already, or run the script through `perl`.
However, before you can run this program, you need:
* PERL installed (perl.org)
* PERL modules 'Net::LDAP' and 'Getopt::Std'. Both should be available
in your linux distributions package archive, otherwise fetch them from
CPAN (this applies also for windows users)
II. General
Usage is very easy. Just call the script and provide the neccessary
command line parameters. To learn what parameters are available, call
`ldap-preg_replace.pl -h` which will print out basic usage and some extended
informations including usage examples.
Calling just ldap-preg_replace.pl without parameters gives you the
short version (usage information).
III. Internals
The tool first connects and binds to the LDAP server you provide using
parameters. Then it searches with some LDAP filter that differs wether you
provided some extra filter component or not.
If you provided some extra filter, the filter will look like this:
(&($attribute=*)$extrafilter)
where $attribute is the value of parameter "-a" and $extrafilter the value
of parameter "-f". so for example `ldap-preg_replace.pl -a foo -f 'bar=123'`
will search with the filter '(&(foo=*)(bar=123))'.
The filter becoms more easy if you are not providing some extra filter:
($attribute=*)
This allows for a very flexible and performant replacement since only those
entries are considered at all, that have some values inside the attribute
you want to replace something in.
After the tool performed the search, it will run through every entry.
For each entry it will loop through all values of the named attribute and
tries to apply the regular expression given by parameter "-r". If something
changed after processing all values the entry will be updated.
Then the next entry will be processed.
For more information on regular expressions, feed your favorite search engine
with something like "perl regular expressions replace syntax".
Try also `ldap-preg_replace.pl -h` which gives some short examples.
Have fun!
ldap-preg-replace-0.9.2.tar.gz
需积分: 0 26 浏览量
2008-12-11
17:29:09
上传
评论
收藏 10KB GZ 举报
辛鹤
- 粉丝: 272
- 资源: 978
最新资源
- 基于opencv的人脸识别考勤系统python源码+数据.zip
- IOT安装包 iotech-iot-1.5-dev-1.5.0-amd64.deb
- 基于物品的协同过滤算法(推荐视频)工具类(见仁见智)
- 21信管2班 武学芹组+独立样本T检验数据分析案例.zip
- demo_ccms_global_open_wlan.py
- 小程序项目源码-小契约(交友互动小程序).zip
- 小程序项目源码-健身房预约课程小程序.zip
- 小程序项目源码-wechat-app-xiaoyima-master小程序.zip
- 小程序项目源码-滑动选项卡小程序.zip
- 小程序项目源码-学习Demo影视推荐、音乐播放、地图小程序.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈