Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music
All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => Trick เกี่ยวกับการแก้ปัญหา เกี่ยวกับ compiler gcc c++ c build make install => Topic started by: golfreeze on กุมภาพันธ์ 15, 2011, 06:29:01 pm
-
##openldap no wrap บน Centos
ปัญหาคือ มี application 1 ตัว เวลาสั่ง ldapsearch แล้วมันตัดบันทัด
ตามที่หาอ่านดู command ของ ldapsearch ใน openldap ไม่สามารถทำได้
OpenLDAP does not define these:
* LDIF_OPT_NOWRAP - implemented in SLAPI as an option around the OpenLDAP function - will "unwrap" the buffer formatted by OpenLDAP - other apps will need to do something similar
แก้ปัญหาโดยลง module ของ mozldap ไปซึ่งมีชุดคำสั่งใน การ nowrap คือ
parameter "-T" don't fold (wrap) long lines (default is to fold)
ลงโดย
#yum -y install mozldap-tools
#updatedb
แล้ว test โดย
/usr/lib64/mozldap/ldapsearch -LLL -x -T -h "localhost" -D "cn=xxxx,o=xxx,dc=xx,dc=com" -w "xx" -b "o=xxx,dc=xx,dc=com" "(mail=golf@xxx.com)" vacationStart vacationEnd
ก็จะสามารถแก้ปัญหาได้ครับ อิอิ ;)
Special Thank :
http://directory.fedoraproject.org/wiki/Use_OpenLDAP_Clients_In_389
http://www.ldapguru.com/
-
#yum -y install openldap-client_x86-64
จะทำให้มองเห็น
command "/usr/bin/ldapsearch"
-
ldapsearch ดูเพิ่มเติม => http://docs.oracle.com/cd/E19450-01/820-6169/ldapsearch-examples.html (http://docs.oracle.com/cd/E19450-01/820-6169/ldapsearch-examples.html)
$ ldapsearch --hostname localhost --port 1389 --bindDN "cn=Directory Manager" --bindPassword password --baseDN dc=example,dc=com "(&(sn=jensen)(l=Cupertino))
$ ldapsearch --hostname localhost --port 1389 --bindDN "cn=Directory Manager" \
--bindPassword password --baseDN dc=example,dc=com --filename myfilter.txt
$ ldapsearch --hostname localhost --port 1389 -b "dc=example,dc=com" \
--sizeLimit 5 "objectclass=*" 1.1
-
ถ้าในกรณีใช้งานเป็น ldapsearch บน openldap 2.4.4 แล้วจะให้ search ออกมาเกิน limit ที่ตั้งไว้
เราสามารถใช้ "-E pr=1000/noprompt -x" ไปด้วยครับดังนี้
ldapsearch -E pr=1000/noprompt -x
8)