Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Ldapsearh command is braking my balls!!!...not litterally, There is this ldap search script that seems to work only the half of i
post Jan 7 2014, 08:19 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 7-January 14
Member No.: 18,615

ok so i need to search from a .txt file around 5000 numbers in a 1.2 gb data base so im usisng this command:

ldapsearch -h PL0 -x -D "cn=****************,dc=ok,dc=com" -w "***************" -s one -b "dc=imsi,ou=identities,dc=ok,dc=com" IMSI=%s -f iphfives.txt IMSI | grep 'IMSI: '

The idea is to print all the IMSI numbers that match my search how ever each time i try to run it it takes a lot of time and doesnt print anyting at all, then i tried to run it with only the ldap command and no grep

ldapsearch -h PL0 -x -D "cn=*********,dc=ok,dc=com" -w "********" -s one -b "dc=imsi,ou=identities,dc=ok,dc=com" IMSI=%s -f iphfives.txt IMSI

The command runs but shows the complete result and not only the imsi

# filter: IMSI=123456789101234
# 123456789101234, imsi, identities,
dn: IMSI=123456789101234,dc=imsi,ou=identities,dc=ok,dc=com

i tried to save the result in a file so i tried to run this

ldapsearch -h PL0 -x -D "cn=*******,dc=ok,dc=com" -w "*********" -s one -b "dc=imsi,ou=identities,dc=ok,dc=com" IMSI=%s -f iphfives.txt IMSI > results.txt

The results.txt file is run but the there is nothing saved inside it

Can anybody please explain me what am i doing wrong? why the grep from the first command is not running why is the file created "results.txt" but bothing is inside.

And why is the second command running ok and showing output but i cant save it.

I hope you guys here can help me

Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd October 2017 - 08:58 AM