2

I installed LDAP and phpLDAPadmin following this tutorial, and so far it is working.

Now I am trying to create an entry in the address book with a duplicate email address.

I'm trying to set up contact sharing in outlook, but we have groups of employees that share a common email address.

For example:

  • There are three people in team A.
  • All three people share the email address teamA@MyDomain.com.
  • Each contact has their email address set to that address.

Creating the first contact works, but I cannot create the next contact because the email is already in use.

How I can create multiple contacts with the same email address in LDAP?

Example of my ldif file:

dn: cn=MrA,ou=MyOu,dc=MyDomain,dc=com
cn: MrA
givenname: MrA
mail: teamA@MyDomain.com
objectclass: inetOrgPerson
objectclass: top
sn: Mr

dn: cn=MrB,ou=MyOu,dc=MyDomain,dc=com
cn: MrB
givenname: MrB
mail: teamA@MyDomain.com   <= If I don't put email, MrB added successfully
objectclass: inetOrgPerson
objectclass: top
sn: MrB

I tried modifying /etc/ldap/schema/core.schema and other schema files, but nothing that I did fixed the problem.

user207421
  • 305,947
  • 44
  • 307
  • 483
jjsteing
  • 67
  • 7
  • Does [this Q&A](http://stackoverflow.com/q/33469557/4639281) solve the issue? –  Nov 20 '16 at 07:47
  • You're welcome, and welcome to Stack Overflow. I don't know much about the topic, if I deviated to far from the intent of your original post, please feel free to [edit] your post to correct any mistakes I may have made. –  Nov 20 '16 at 07:58
  • 1
    There is nothing in the definition of the inetOrgPerson objectClass that prevents two different entries from having the same mail attribute. However, as Ludivic Poitou mentioned, you may have a uniqueness constraint in place via an overlay. To see which overlays are enabled and their settings, you can run this search: `ldapsearch -h ldap-master -b cn=config '(objectClass=olcOverlayConfig)'` (assuming you store configurations in `cn=config`). – rlandster Nov 21 '16 at 00:18
  • rlandster, your command doesnt work but i found this on phpldapadin : `mail Description RFC1274: RFC822 Mailbox OID 0.9.2342.19200300.100.1.3 Obsolete No Inherits from Equality caseIgnoreIA5Match Ordering (not specified) Substring Rule caseIgnoreIA5SubstringsMatch Syntax IA5 String (1.3.6.1.4.1.1466.115.121.1.26) Single Valued No Collective No User Modification Yes Usage (not specified) Maximum Length 256 characters Aliases rfc822Mailbox Used by objectClasses inetOrgPerson Force as MAY by config No` – jjsteing Nov 21 '16 at 07:02

2 Answers2

2

FIND IT !!

in /etc/phpldapadmin/config.php

comment this :

//# $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));

and put

$servers->setValue('unique','attrs',array('uid','uidNumber'));

Thanks all :)

jjsteing
  • 67
  • 7
1

Some LDAP directory servers have a plugin (or overlay) that enforces uniqueness of values for a specific attribute. Email is one attribute, where usually you want to make sure every user has a different email address. But it not mandatory and the plugin could be disabled.

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30
  • I guess it s because it's that I cannot put 'shared email' .. do you have any information where I can looking for to change this ( damn ) uniqueness ? – jjsteing Nov 21 '16 at 07:29