To search for all children of an entry in the appropriate subtree, run the
ldapsearch
command.
- To sort the resulting entries by the server in ascending order, use
sn
. - To sort the orders in descending order, use
givenName
.
For this example, the ldapsearch
command searches for children in
the ou=People,dc=example,dc=com
subtree.
$ bin/ldapsearch --baseDN ou=People,dc=example,dc=com \
--searchScope sub --sortOrder sn,-givenName '(objectclass=*)'