Hi
$ cat ad.sh
ldapsearorg -x -LLL -h sb1131z.testbadbigcorp.org -D "CN=ADMINZZ,OU=AdminRoles,DC=testbadbigcorp,DC=org" -w "UT3w4f57lll--4...4" -b "OU=Test,DC=testbadbigcorp,DC=org" "(&(&(&(&(objectCategory=person)(objectClass=user)(lockoutTime:1.2.840.113556.1.4.804:=4294967295)))))" dn
$ ./ms_ad.sh
version: 1
[...]
dn: CN=TEST,OU=TEST,OU=TEST,OU=TEST,OU=TEST,DC=testbadbigcorp,
DC=org
[...]
I have the same problem like Abhishek Srivastava from Cisco:
I am using ldapsearch method to backup the data and writing the output to
some file. If the dn of any object is too long then the same is broken into
two lines. Is there any option to suppress this new line character for long
DN's.
>From ldif file:
*****************************************************
dn: cn=abcd.xyz.rty.aaaa,ou=config,ou=xyzApp,ou=xyzGroups,ou=
rain106,o=company,c=ountry
**************************************
After "ou=" there is a new line character introduced so rain106 comes into
next line..
source ldapsearch result breaks the long dn's in seperate lines
the answer was
There is no such option to OpenLDAP's ldapsearch. The ldapsearch from the Netscape SDK has a '-T' option to suppress line folding.
is there an other way to remove those line foldings (with shell script)?