[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: translucent overlay add an attribute to all users in a OU and subtree
- To: openldap-technical@openldap.org
- Subject: Re: translucent overlay add an attribute to all users in a OU and subtree
- From: Nicolas RENAULT <nicolas_renault@yahoo.fr>
- Date: Tue, 21 Oct 2014 14:35:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s2048; t=1413894916; bh=mFLT4By2rA0k9u28uiy2lAjfyHhNo9FJIgtQCyQsmS8=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=E0X8HxqQlDiZSxcON8Hh79GwdDb9dHaCjGvQlnZ413H0dXCXkTe0msU79bJK8+CcO8tjHMftvfP4elozYTe5ygfEL2qnqhuDC1w880HvLBK2B3Sfh8bozn2NdiHQ+Lr2O7K/kU8eyRbLIyQ6tDzKCJNgHjr1Z7FHXHibxKsBIFFH2/xDX623H0A3cf485noZRhCqSc3r/+/3O+HcRzxhaxSTxL8KZPGc6czNPtyvOYc7TxW9tH0hp6bT/QTBPjmb6oa/vu/dZD/PZQEe1WrE4c073dYG8T0KcQ2we755C6kU/ki3XaWOKW/kzilkZHIR+xOeAEB1vVC5CLwMRkGRpA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1413894916; bh=mFLT4By2rA0k9u28uiy2lAjfyHhNo9FJIgtQCyQsmS8=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=rUWiL4U8rthOy8NUzLiAhcM7xltmJtJnsQrxRNlXeRY0CIdKJcuzPVxBTIZqw7GxrgLMHIWtQNRmop45biJe5kGCmzhGdHxLRBQn3ZuI36LmbDXkJVyoye+bxbNtMw4QKX6gBhpHeqfWSvz5bV3KnUe2cntlocbZvjsVksa6Nek=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.fr; b=lSbadX5wOxQe5lX3jrBz6L/LwsXOAusYfRifTQqLzD00v7V9Jll4N9oKPpmVdz3t3ACEDuxA26B1BLRxqbbgafz7BPGNMmoAIHu5DcF0qpDSFLXdGL4zkbHfGE5aQ6Dgp/MoBcURN/ayvF2oOhNB7I0D9UPXwiXbPz70y5zZP4IGIjVYG88p76N8bUXXqDGtjPPXHWFWo8T7EPS1xLp1qhIczcKPXoS0JmF12ccoyQeQzhHqL6+HGYiDiPNBFrJlTwKxQiGARpvGiLyuHSQBlKVIpFHZxnT3RexhzoH1isilyxieSaJRVArYoRuuREstwrPCYUEXQIvaxbiGsXYyDA==;
- In-reply-to: <544609E4.7060003@stroeder.com>
- References: <53E0F6B2.9030302@yahoo.fr> <53E180E9.10005@symas.com> <53E254C7.8030801@yahoo.fr> <20140807090922.3b375d91@pink.avci.de> <543D1935.3090708@yahoo.fr> <20141014171717.09bd5dee@pink.avci.de> <543E22F0.7080208@yahoo.fr> <54413864.3030905@yahoo.fr> <20141017230218.6c3b59fa@pink.avci.de> <5444D6F1.7090405@yahoo.fr> <20141021091811.1d142999@pink.avci.de> <544609E4.7060003@stroeder.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
Le 21/10/2014 09:23, Michael Ströder a écrit :
Dieter Klünter wrote:
collectiveAttrbibuteSubentry is declared in schema_prep.c. When I
tested collective attributes, a few years ago, slapd had to be build
with -DLDAP_COLLECTIVE_ATTRIBUTES. I don't know whether this is still
the case.
I've tested this yesterday and I had to build with
-DLDAP_COLLECTIVE_ATTRIBUTES to make 'collectiveAttrbibuteSubentry' appear in
the subschema subentry.
Ciao, Michael.
thanks for reply
so now the noob question : how do I build with
-DLDAP_COLLECTIVE_ATTRIBUTES ?
with our clue I try to restart the process with :
configure :
./configure --enable-syslog --enable-modules --enable-rewrite
--enable-ldap --enable-meta --enable-collect --enable-dyngroup
--enable-memberof --enable-proxycache --enable-rwm --enable-sssvlv
--enable-valsort -DLDAP_COLLECTIVE_ATTRIBUTES
result :
configure: error: unrecognized option: `-DLDAP_COLLECTIVE_ATTRIBUTES'
so I look on "configure --help" and "less INSTALL" , try to google
DLDAP_COLLECTIVE_ATTRIBUTES and at last try a grep on the directory
openldap-2.4.40/ but cannot find ref on how to build openldap with
DLDAP_COLLECTIVE_ATTRIBUTES ..
finally and for archives :
./configure --enable-syslog --enable-modules --enable-rewrite
--enable-ldap --enable-meta --enable-collect --enable-dyngroup
--enable-memberof --enable-proxycache --enable-rwm --enable-sssvlv
--enable-valsort CFLAGS="-DLDAP_COLLECTIVE_ATTRIBUTES"
after that , make depend, make , make install
Works ! that is the good process ?
now i can add the ldif with the example the you give me without errors.
but it doesn't appli collectives attributes :
I have create this to test overlay collect :
## dcObject is an AUXILIARY objectclass and MUST
## have a STRUCTURAL objectclass (organization in this case)
dn: dc=example,dc=fr
dc: example
o: example proxy LDAP Server
description: Root entry for example proxy LDAP server
objectClass: top
objectclass: dcObject
objectclass: organization
## FIRST Level hierarchy
dn: ou=TOUT,dc=example,dc=fr
ou: TOUT
description: OU pour contenir tout les annuaires
objectClass: top
objectClass: organizationalUnit
## FIRST Level hierarchy - Manager
dn: cn=Manager,dc=example,dc=fr
cn: Manager
description: Rootdn
objectclass: organizationalRole
after that I add this (from example provide in reply) :
dn: cn=office,dc=example,dc=fr
objectClass: subentry
objectClass: extensibleObject
objectClass: collectiveAttributeSubentry
cn: office
subtreeSpecification: {base "ou=TOUT" minimum 2}
c-l: Berlin
c-street: Main Street
and
dn: cn=user_test,ou=TOUT,dc=example,dc=fr
sn: test
cn: user_test
objectClass: user
objectClass: organizationalPerson
objectClass: person
objectClass: top
and in slapd.conf just for tests :
include /etc/openldap/schema/collective.schema
.......
database bdb
suffix "dc=example,dc=fr"
rootdn "cn=Manager,dc=example,dc=fr"
rootpw "xxxxx"
directory /usr/local/var/openldap-base
limits * size=1000
overlay collect
collectinfo cn=office,dc=example,dc=fr l,street
with that , when I do an ldap search :
ldapsearch -H ldap://localhost -x -D "cn=Manager,dc=example,dc=fr" -W -b
"ou=TOUT,dc=example,dc=fr" "(&(objectClass=user)(cn=user_test))"
# extended LDIF
#
# LDAPv3
# base <ou=TOUT,dc=example,dc=fr> with scope subtree
# filter: (&(objectClass=user)(cn=user_test))
# requesting: ALL
#
# user_test, TOUT, example.fr
dn: cn=user_test,ou=TOUT,dc=example,dc=fr
sn: test
cn: user_test
objectClass: user
objectClass: organizationalPerson
objectClass: person
objectClass: top
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
no trace for the l and street attributes. any idea ?
Thanks again for reply
--
Nicolas