2012-02-27 11 views
21

मैं SSL/TLS कनेक्शन पर ldapsearch उपयोग करने के लिए कोशिश कर रहा हूँ काम नहीं करता है, लेकिन यह काम नहीं करता है:ldapsearch

ldapsearch -ZZ -d 5 -b "cn=Users,dc=my,dc=server,dc=com" -s sub -D 
"cn=mydevice,cn=Users,dc=my,dc=server,dc=com" -h my.server.com -p 3269 
-w "mypass" -x "(cn=test)" 

ldap_create 
ldap_url_parse_ext(ldap://my.server.com:3269) 
ldap_extended_operation_s 
ldap_extended_operation 
ldap_send_initial_request 
ldap_new_connection 1 1 0 
ldap_int_open_connection 
ldap_connect_to_host: TCP my.server.com:3269 
ldap_new_socket: 3 
ldap_prepare_socket: 3 
ldap_connect_to_host: Trying 10.199.46.70:3269 
ldap_connect_timeout: fd: 3 tm: -1 async: 0 
ldap_open_defconn: successful 
ldap_send_server_request 
ber_scanf fmt ({it) ber: 
ber_scanf fmt ({) ber: 
ber_flush: 31 bytes to sd 3 
ldap_result ld 0x95ff590 msgid 1 
wait4msg ld 0x95ff590 msgid 1 (infinite timeout) 
wait4msg continue ld 0x95ff590 msgid 1 all 1 
** ld 0x95ff590 Connections: 
* host: my.server.com port: 3269 (default) 
refcnt: 2 status: Connected 
last used: Mon Feb 27 10:59:43 2012 

** ld 0x95ff590 Outstanding Requests: 
* msgid 1, origid 1, status InProgress 
outstanding referrals 0, parent count 0 
** ld 0x95ff590 Response Queue: 
Empty 
ldap_chkResponseList ld 0x95ff590 msgid 1 all 1 
ldap_chkResponseList returns ld 0x95ff590 NULL 
ldap_int_select 
read1msg: ld 0x95ff590 msgid 1 all 1 
ber_get_next 
ldap_perror 
ldap_start_tls: Can't contact LDAP server (-1) 

त्रुटि संदेश है कि क्या पर enought संकेत नहीं देता है गलत। इसके विपरीत, पोर्ट 38 9 पर किसी भी समस्या के बिना एक सरल बाध्यकारी और खोज अच्छी तरह से चला जाता है।

कोई संकेत?

पीएस यहाँ मेरी ldap.conf है:

TLS_REQCERT demand 
TLS_CACERT ./cacert.pem 

मैं भी never को TLS_REQCERT बदलने की कोशिश की है, लेकिन यह अभी भी काम नहीं करता। :-(

+1

यह टीएलएस का उपयोग करने की कोशिश की तरह दिखता नहीं है। आप इसके बजाय -एच स्विच का उपयोग कर सकते हैं, एलडीएपी यूआरएल के साथ: ldapsearch -ZZ -d 5 -b "सीएन = उपयोगकर्ता, डीसी = मेरा, डीसी = सर्वर, डीसी = कॉम" -एस सब-डी "सीएन = mydevice , सीएन = उपयोगकर्ता, डीसी = मेरा, डीसी = सर्वर, डीसी = कॉम "-एच ldaps: //my.server.com: 3269 -w" माइपास "-x" (सीएन = परीक्षण) " – dearlbry

उत्तर

44

सबसे पहले, (मेरे उबंटू 13.04 पर या /etc/ldap/ldap.conf) -H ldaps://my.server.com:3269 साथ -h my.server.com -p 3269 की जगह के रूप में @dearlbry ने सुझाव दिया

फिर, /etc/openldap/ldap.conf में इस जोड़कर प्रमाणपत्र सत्यापन को अक्षम:।

HOST my.server.com 
PORT 3269 
TLS_REQCERT ALLOW 

यदि आप पूरे सिस्टम को प्रभावित नहीं करना चाहते हैं तो आप उसी निर्देशिका के साथ वर्तमान निर्देशिका में ldaprc फ़ाइल भी बना सकते हैं।

यह विल एल एसएसएल पर ldapsearch सक्षम, लेकिन सत्यापन के बिना। मिश्रण में इन steps to add certificate validation का पालन करें।

 संबंधित मुद्दे

  • कोई संबंधित समस्या नहीं^_^