[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: I wrote a script to automate using ldapdelete



> From: Oscar Armanini
> Subject: I wrote a script to automate using ldapdelete

> So I wrote a short shell script "anteldapdelete.sh"
> that reverses the order of LDIF file created by ldapsearch
> and generates an LDIF file (usable later while running ldapdelete one time
> only)
>
> I discovered that:
> - ldapsearch creates files with a maximum column size
> and continue on next line leaving a blank as first char
> - ldapadd accept files in the form:
> "dn: ou=myou, dc=mydomain, dc=c
>  om" (note that this line has a blank as first char)
> while ldapdelete accept file without "dn: " and only on a single line, that
> is:
> "ou=myou, dc=mydomain, dc=com"
>
> I assume those are expected behaviours of ldapsearch, ldapadd, ldapdelete,
> aren't they?

That's the format of an ldif file.  Lines that do not have characters
in column 0 are taken to be continuations of the previous line.

There's actually a specification for the file format :)

   http://www.faqs.org/rfcs/rfc2849.html


Steve