0

This question is related to Convert a Base64 LDIF file to plaintext (for import) .

A LDAP I'm using has some attributes containing multiple values. E.g. foobarStatus has the following value:

market = "US"
mgmt.account.mode = "X12"
foo.field = "Something"
bar.field = "Something else" 

(When this attribute is added or modified via a LDIF file, this value is imported encoded in Base64.)

Using Ldapadmin (a LDAP GUI client) to examine the entry shows the value of this attribute as such:

market = "US"mgmt.account.mode = "X12"foo.field = "Something"bar.field = "Something else" 

which made me think about the question in the title: What is the appropriate syntax to separate multiple values in a LDAP multi-valued attribute?

Community
  • 1
  • 1
dr_
  • 2,400
  • 1
  • 25
  • 39

1 Answers1

1

IF I understand what you are trying to perform.

You do not use a separator to implement multiple values within LDAP/LDIF. Each attribute is a container for value(s).

So IF I understand what you are trying to perform a LDIF something like this should work:

dn: cn=johndoe,ou=clients,ou=management,dc=example,dc=com
changetype: modify
delete: foobarStatus
-
add:foobarStatus
foobarStatus: market = "US"
foobarStatus: mgmt.account.mode = "X12"
foobarStatus: foo.field = "Something"
foobarStatus: bar.field = "Something else"

Also keep in mind:

  • there are some characters that either need escaped within LDIF operations
  • there can NOT be any spaces at the end of a value

or the values will be base64 encoded.

jwilleke
  • 10,467
  • 1
  • 30
  • 51