Loading...
 

performing a first ldap query

performing a first ldap query


We always are impatient and want to try things. The ldap server is running (check if the slapd process is running). Performing queries in your ldap directory are conducted through ldapsearch:

ldapsearch -x -b "dc=redflo,dc=de" "(objectClass=*)"
# extended LDIF
#
# LDAPv3
# base <dc=redflo,dc=de> with scope sub
# filter: (objectClass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1

The line "result: 32 No such object" says, that the ldap directory is empty. What do the ldapsearch options mean? The "-x" tells ldapsearch to use simple autentication. We don't specify a username or password. This is called a anonymous bind. We will disable this later, but for not it is o.k. The "-b ...." specifies the starting point for the ldap search. It shall therefore start to search in the branch "dc=redflo,dc=de". Use -b "" to search all branches. The last option "(objectClass=*)" means to search all. It is the "search filter". We'll talk later about the filter syntax.
Created by admin. Last Modification: Tuesday 13 of December, 2005 23:05:27 GMT-0000 by admin.

Flattr me!