Hello, I have compiled openldap-2.4.23 from source. Recently I am learning
to use shell database so I try running searchexample.sh script file provided
with the openldap sources. But I am not successful in doing so. I think
script is not getting executed and I am not getting any search results.
Search gives the following result-:
#ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -W -b 'dc=shell1,dc=com'
'(uid=root)'
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <dc=shell1,dc=com> with scope subtree
# filter: (uid=root)
# requesting: ALL
#
# search result
search: 2
result: 0 Success
# numResponses: 1
---------------------------------------------------------------------------
My slapd.conf section for shell database is as follows-:
database shell
suffix "dc=shell1,dc=com"
search /usr/local/openldap-test/etc/openldap/searchexample.sh
----------------------------------------------------------------------------
When started slapd with -d 1 option, I am getting following debugging
information upon executing above search example-:
--------------------------------------------------------------------------------------------------------------
<output truncated>..
send_ldap_response: msgid=1 tag=97 err=0
ber_flush2: 14 bytes to sd 17connection_get(17): got connid=1002
connection_read(17): checking for input on id=1002
ber_get_next
ber_get_next: tag 0x30 len 53 contents:
op tag 0x63, time 1291033804
ber_get_next
conn=1002 op=1 do_search
ber_scanf fmt ({miiiib) ber:
>>> dnPrettyNormal: <dc=shell1,dc=com>
<<< dnPrettyNormal: <dc=shell1,dc=com>, <dc=shell1,dc=com>
ber_scanf fmt ({mm}) ber:
ber_scanf fmt ({M}}) ber:
==> limits_get: conn=1002 op=1 self="cn=manager,dc=example,dc=com"
this="dc=shell1,dc=com"
execv failed
shell: fgets failed: Success (0)
str2result () expecting "RESULT"
send_ldap_result: conn=1002 op=1 p=3
send_ldap_response: msgid=2 tag=101 err=0
ber_flush2: 14 bytes to sd 17
connection_get(17): got connid=1002
connection_read(17): checking for input on id=1002
ber_get_next
ber_get_next: tag 0x30 len 5 contents:
op tag 0x42, time 1291033804
ber_get_next
conn=1002 op=2 do_unbind
connection_close: conn=1002 sd=17
----------------------------------------------------------------------------------------------------------------------
Please help me to got shell database working.
Thanks.