I created two attributes in LDAP (multivalued strings) and I want to (somehow) create a relationship between their values so that each value in one of then is linked to a value in the second: for example the attributes are 'cars' and 'owners'

car name - owner name
BMW   ->   john doe1
KIA   ->   john doe2

Any ideas on how to do that?

Edit: can I use the freeipa plugins to modify the user input so that it appends a value from the second attribute to the first attribute?

BMW(john doe1)
KIA(john doe2)

Think about LDAP is not a Relationship Database but a plain directory. What you can do is create a group for the cars and add to this group the users who have this car.

Something like:

dn: cn=BMW,ou=cars,dc=yourcompany,dc=com
cn: BMW
objectclass: posixgroup
memberuid: john
memberuid: alex

dn: cn=KIA,ou=cars,dc=yourcompany,dc=com
cn: KIA
objectclass: posixgroup
memberuid: tara
memberuid: gina
memberuid: peter
  • +1. One important note - LDAP does not guarantee order of the values for the multivalued string. So the original proposal would never work. – Martin Kosek May 22 '15 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.