ldapsearch cmdline question

Craig White craigwhite at azapple.com
Fri Sep 25 19:26:59 UTC 2009


On Fri, 2009-09-25 at 08:06 -0700, bruce wrote:
> Hi..
> 
> Trying to run a simple ldap search/query against a supposedly public ldap
> server. I've tried a number of copy/paste attempts that I've seen from
> various sites with no luck...
> 
> If anyone has successfully pinged/queried a public ldap server from the
> cmdline, can you post your cmd that you used so I can see what I'm missing..
> 
> the site www.emailman.com/ldap/public lists a number of public ldap servers.
> i'm simply trying to figure out how to query/access the names from one of
> the ldap servers.
> 
> as an example, i tried to use:
> 	ldapsearch -x -h ldap.bu.edu -b "dc=bu,dc=edu" "(sn=tom*)"
> 	(but this generates a ldap_bind: protocol error...
> 
> however, if i do:
> 	ldapsearch -x -h stanford.edu -b "dc=stanford,dc=edu" "(sn=tom*)"
> 	or
> 	ldapsearch -x -h usc.edu -b "dc=usc,dc=edu" "(sn=tom*)"
> 	then i get back a list of data...
> 
> also, the bu.edu for boston university, works on the website...
> 
> so, i'm sure i'm missing something simple, but i can't pin it down. any
> help/pointers would be 'ppreciated!
> 
> my goal is to be able to understand how to query a public ldap server and to
> be able to return different data elements.. (ie, name, given, first, or
> email/phone/etc..)
----
I am not sure whether you should be called Tom or Bruce...

Bruno has already told you that you apparently must use protocol level 2
to communicate with BU's public LDAP server.

I would think that it is hardly useful to try to use ldapsearch from
command line on public servers but you may have a good reason for this.

I would suggest that you use a tool like GQ (yum install gq) and enter
the host name and base and turn off passwords (public server) and then
try putting in something like 'givenname=Tom' into the search box. Once
you get some returns, you can click on one to see the attributes they
are storing which will give you some ideas.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the users mailing list