lunes, 16 de noviembre de 2009

What you still haven't found on a ldap server

Sometimes you need to perform a ldap search from the unix console, for that hard times i use the folling recipe (using ldapsearch from openldap) :
ldapsearch -b BASEDN -s sub -h HOSTNAME -p PORT-x -D FULLDNTOBIND -w PASSWORDTOBIND QUERY

Where
BASEDN = is the base for the search.
HOSTNAME = is the ldap server
PORT= is the ldap server port
FULLDNTOBIND = it's the dn of the user that you want to use to login to the ldap server-
Example
cn=rene the frog, ou=muppets,o=jim hensons,c=us

QUERY = the parameters for the query. For further information please visit this link which contains the definition for the ldap filters
Example
cn=rene*

No hay comentarios:

Publicar un comentario