1
votes

I need to migrate all the user accounts in my Sun DS 5.2 ldap server to 389 Directory server. And I'm getting stuck with the import of some users account which have blank value for some of the attributes. Here is a sample of the record.

dn: uid=1234,dc=example,dc=com <br>
uid: 1234 <br>
cn: John Smith <br>
custom_attribute1:  <br>
custom_attribute2: blah <br>
objectClass: top <br>
objectClass: person <br>

dn: uid=4321,dc=example,dc=com <br>
uid: 4321 <br>
cn: Jane Smith <br>
custom_attribute1:  <br>
custom_attribute2: blah <br>
objectClass: top <br>
objectClass: person <br>

. .

I have been using the "ldapmodify -a" or ldapadd command to insert these records but it's complaining about the missing attribute value. In my example, it would be complaining the "custom_attribute1" field.

So is there a way to enter these records with a blank space in the missing fields?

Thanks in advance!!

Ken

2
Delete them from the LDIF.user207421

2 Answers

1
votes

You can't add empty attrs to DIT. You should delete the attr from yout LDIF as EJP said.

1
votes

The DirectoryString syntax doesn't allow empty values. Unfortunately SunDS was very relaxed with regards to syntax checking (didn't exist in 5.2 and was off by default in later releases). When migrating, it is preferred to remove or fix invalid values (within the LDIF file).