You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Demet Dinc Oguz <D....@dtg.nl> on 2014/10/16 17:07:58 UTC

Defining an new attribute

Dear Sir/Madam
I am trying to extend LDAP entities with a new attribute(isActive). Can you explain that how can i add a new attribute (isActive)  to an existing entity with ldif file.
Here is the ldif file i run to create my sample entity

dn: dc=dtg,dc=nl
objectClass: domain
objectClass: top
dc: dtg

dn: ou=Users,dc=dtg,dc=nl
objectClass: organizationalUnit
objectClass: top
ou: Users

dn: ou=Groups,dc=dtg,dc=nl
objectClass: organizationalUnit
objectClass: top
ou: Groups

dn: cn=ESB Dev,ou=Users,dc=dtg,dc=nl
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: ESB Dev
sn: ESBDEV
description: 19741108000000Z
employeeNumber: 7
givenName: ESBDEV
telephoneNumber: 254-323-1920
isActive: TRUE
uid: esbdev@dtg.nl
userPassword:: 123244


After the execution of this file i saw the entity is created but i do not see the isActive attribute of it.


Best Regards

Demet Dinc Oguz

DTG is een handelsnaam van De Telefoongids BV

Dit bericht is afkomstig van De Telefoongids BV en uitsluitend bestemd voor de geadresseerde. Dit bericht kan vertrouwelijke informatie bevatten. Als u dit bericht per abuis hebt ontvangen, dan wordt u verzocht de afzender te informeren en het bericht en eventuele bijlagen te vernietigen. Communicatie via Internet is niet beveiligd. De Telefoongids BV aanvaardt geen aansprakelijkheid voor wijzigingen in de inhoud van het bericht en eventuele bijlagen, onrechtmatige openbaarmaking ervan jegens derden of schade als gevolg van gebruik van e-mailcommunicatie. De Telefoongids BV is gevestigd te Amsterdam (Handelsregister nr. 27198207).
----------------------------------------------------------------------------------------------------------------------------
This message is sent from De Telefoongids BV and is intended only for use by the recipient. It may contain confidential information. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments.
Internet communications are not secure. De Telefoongids BV does not accept any liability for mutilations to the contents of this message and attachments thereto, if any, unlawful disclosure thereof to third parties, or damage resulting from the use of e-mail communications. De Telefoongids BV is a private limited company with its seat in Amsterdam (Trade Register no. 27198207).

Re: Defining an new attribute

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 16/10/14 17:07, Demet Dinc Oguz a écrit :
> Dear Sir/Madam
> I am trying to extend LDAP entities with a new attribute(isActive).

Please define a "LDAP entity".


>  Can you explain that how can i add a new attribute (isActive)  to an existing entity with ldif file.

Assuming entity == entry,

> Here is the ldif file i run to create my sample entity
>
> dn: cn=ESB Dev,ou=Users,dc=dtg,dc=nl
> objectClass: inetOrgPerson
> objectClass: organizationalPerson
> objectClass: person
> objectClass: top
> cn: ESB Dev
> sn: ESBDEV
> description: 19741108000000Z
> employeeNumber: 7
> givenName: ESBDEV
> telephoneNumber: 254-323-1920
> isActive: TRUE
> uid: esbdev@dtg.nl
> userPassword:: 123244
>
>
> After the execution of this file i saw the entity is created but i do not see the isActive attribute of it.

Which is quite normal. The isActive AttributeType is not present in any
of your ObjectClass.

You either have to add the extensible ObjectClass in your entry, or to
define a new ObjectClass which takes isActive as a MAY or MUST
attributeType, and include this ObjectClass into the list of ObjectClass
for your entry.

Of course, this isActive AttributeType must exist in your shema.


At this point, I stringly encourage you to read some information about
what is a LDAP schema (something like
http://www.yolinux.com/TUTORIALS/LinuxTutorialLDAP-DefineObjectsAndAttributes.html
could help, but it just scratchs the very surface of this matter), or
something similar.