Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
RDNReverse.pl ReadMe File for v1.0 2007-01-01
Readme Text File Download: RDN Reverse.txt
PROGRAM PURPOSE:
It's easy enough for anybody to extract data from an LDAP directory, but
trying to sort that data in a useful way is often hampered by not being
able to sort by object context / container. This program reverses the
order of an object's RDN giving you a field that can be used to sort
a mass of data in to container (OU) order:-
e.g.
cn=employee1.ou=finance.o=novell
cn=employee2.ou=student.ou=finance.o=novell
cn=employee3.ou=finance.o=novell
cn=employee4.ou=IT.o=novell
cn=employee5.ou=finance.o=novell
cn=employee6.ou=student.ou=finance.o=novell
Can be sorted in to:
o=novell.ou=finance.cn=employee1
o=novell.ou=finance.cn=employee3
o=novell.ou=finance.cn=employee5
o=novell.ou=finance.ou=student.cn=employee2
o=novell.ou=finance.ou=student.cn=employee6
o=novell.ou=IT.cn=employee4
PROGRAM REQUIREMENTS:
The input file must be a Comma Separated Values formatted file.
This program will only work where the input file contains one record
per line.
If RDN components are separated by ',' then RDN MUST be enclosed in
quotes in the input file.
Any Header line must be separated with ',' and have NO Quoted fields
or special characters.
This program should work with output from any LDAP compliant database,
including eDirectory, Active Directory etc; but it has only been
tested with LDAP output from eDirectory.
The program has been tested on SUSE Linux 10 on x86 using Perl v5.8.8
and on MS Windows 2000 SP4 using ActivePerl v5.8.8. It should
run on most Linux/Unix/Windows platforms with Perl v5.6 and
above.
RELEASE NOTES:
The program can deal with RDNs formatted with ',' or with '.' or a
mixture of both BUT the outputted RDN and reverse RDN will all
be formatted the same way, depending on how you answered the
pre-run questions.
The program can deal with a mix of non-quotation enclosed and quotation
enclosed data fields.
The program detects which operating system it is running on.
If the host OS is Linux you will be given the option to write the output
using Linux or Windows line termination.
The program can accept a file with lines terminated by carriage-
return newline (ascii 13 & 10) or with just newline (ascii 10)
or a mixture of both.
The program can also be used simply to change the formatting of an RDN
from '.' to ',' or vice-versa.
This program DOES NOT work against LDIF files.
Any special characters in the RDN may invalidate the output.
The program does not work with multi-line fields (such as the LDAP
exported Login Script attribute).
The resulting reverse RDN will always be enclosed in quotes.
PROGRAM QUESTIONS: