Wrtiting to a file in LDIF format

D

dakin999

Hi, I am trying to write to a file elements of an array. The output I
want is simple LDIF format like this:

dn:uid=xxx,cn=yyy,cn=zzz,O=xyz,C=OO
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top

Has some one done something like this using "sprintf" or any other
method?? . Any snippet will be really helpful....
 
M

Martijn Lievaart

Yes, I am aware of the this. But I need to construct the LDIF file first
before exporting the data into the LDAP server.

That's what it does, look under the heading Output.

M4
 
D

dakin999

That's what it does, look under the heading Output.

M4- Hide quoted text -

- Show quoted text -

Sorry for the confusion, but I am just looking to create a output LDIF
file without doing anything after that. (No loading to LDAP server,
etc. just a plain LDIF file in the format I mentioned at the top).
 
D

dakin999

That's what it does, look under the heading Output.

M4- Hide quoted text -

- Show quoted text -

Sorry, I forget to mention, I am using perl-ldap, not the mozilla....
 
M

Martijn Lievaart

Sorry for the confusion, but I am just looking to create a output LDIF
file without doing anything after that. (No loading to LDAP server, etc.
just a plain LDIF file in the format I mentioned at the top).

I would say perldap-1.4 can do exactly that. Where exactly does it not
meet your needs?

M4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top