Issue #853 has been updated by David Coutadeur.

I tried to update ltb-wiki with a mini tutorial, but it seems I don't have 
account yet.

Here are the helpfull information for making no-operation search work:


# Installation
apt-get install openldap-ltb-contrib-overlays
(or whatever package manager / OS you use)

# Configuration

Add these directives to /usr/local/openldap/etc/openldap/slapd.conf:

include         /usr/local/openldap/etc/openldap/schema/core.schema
include         /usr/local/openldap/etc/openldap/schema/cosine.schema
include         /usr/local/openldap/etc/openldap/schema/inetorgperson.schema

modulepath      /usr/local/openldap/libexec/openldap
moduleload noopsrch.so

Restart OpenLDAP:
/etc/init.d/slapd restart

Then populate some entries:

vim base.ldif

dn: dc=my-domain,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: my-domain
dc: my-domain

dn: ou=users,dc=my-domain,dc=com
objectClass: top
objectClass: organizationalUnit
ou: users

dn: ou=groups,dc=my-domain,dc=com
objectClass: top
objectClass: organizationalUnit
ou: groups

dn: uid=test1,ou=users,dc=my-domain,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: test1
sn: test1
uid: test1
userPassword: secret

dn: uid=test2,ou=users,dc=my-domain,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: test2
sn: test2
uid: test2
userPassword: secret

Finally, add these entries into OpenLDAP:
ldapadd -H 'ldap://localhost:389' -D 'cn=Manager,dc=my-domain,dc=com' -w secret 
-f base.ldif


# Usage

Search for all entries:

ldapsearch -x -H 'ldap://localhost:389' -D 'cn=Manager,dc=my-domain,dc=com' -w 
secret -b 'dc=my-domain,dc=com' '(objectClass=*)' -e 
'!1.3.6.1.4.1.4203.666.5.18'

search: 2
result: 0 Success
control: 1.3.6.1.4.1.4203.666.5.18 false MAkCAQACAQUCAQA=




Search for branch entries :

ldapsearch -x -H 'ldap://localhost:389' -D 'cn=Manager,dc=my-domain,dc=com' -w 
secret -b 'dc=my-domain,dc=com' '(objectClass=organizationalUnit)' -e 
'!1.3.6.1.4.1.4203.666.5.18'

search: 2
result: 0 Success
control: 1.3.6.1.4.1.4203.666.5.18 false MAkCAQACAQICAQA=



Some explanation:
- no operation is done,
- instead, the number of operation is displayed, on the "control" line
- how to verify the number of operations ?

echo -n 'MAkCAQACAQUCAQA=' | base64 -d | od -x --endian=big
0000000 3009 0201 0002 0105 0201 0000

0x30 ber sequence
0x09 length (9 bytes)

0x02 ber int
0x01 length (1 byte)
0x00 "0" (value of would be search result code)

0x02 ber int
0x01 length (1 byte)
0x05 "5" (number of would be returned entries) --> Ok, there are 5 entries 
returned

0x02 ber int
0x01 length (1 byte)
0x00 "0" (number of would be returned search refs)



echo -n 'MAkCAQACAQICAQA=' | base64 -d | od -x --endian=big
0000000 3009 0201 0002 0102 0201 0000


0x30 ber sequence
0x09 length (9 bytes)

0x02 ber int
0x01 length (1 byte)
0x00 "0" (value of would be search result code)

0x02 ber int
0x01 length (1 byte)
0x02 "2" (number of would be returned entries) --> Ok, there are 2 
organizational entries returned

0x02 ber int
0x01 length (1 byte)
0x00 "0" (number of would be returned search refs)


----------------------------------------
Feature #853: slapo-noosrch
http://tools.lsc-project.org/issues/853

Author: Clément OUDOT
Status: Assigned
Priority: Normal
Assigned to: David Coutadeur
Category: OpenLDAP DEB
Target version: openldap-deb-?


It would be handy to have slapo-noosrch enabled in 
openldap-ltb-contrib-overlays in builds for all platforms.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________
ltb-dev mailing list
[email protected]
http://lists.ltb-project.org/listinfo/ltb-dev

Reply via email to