LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

-n hostname Provides a simplified method for discovering a single host. Use of
-n is the same as -f (cn=name). If -n is used, the -g, -F
and -f options cannot be specified on the command line.
-g groupname Limits the hosts returned to those that are also members of the
specified group. The LDAP group is discovered by searching for
any entries under the default base (as configured in the LDAP-UX
profile or specified using -b) that are of the groupOfNames, or
groupOfUniqueNames object class and have the specified
groupname. ldaphostlist enumerates the members of the
specified group, searching for members that are hosts, and then
displays those entries. The -f or -F option can be used to further
narrow the list of returned host entries.
Note that the -n and -m options are mutually exclusive
-b base Overrides the search base as defined in the LDAP-UX configuration.
base is a distinguished name (DN) that describes the lowest (with
the tree branches facing up) location in the directory tree at which
to start the search. If base is not specified, ldaphostlist uses
the search base from the hosts serviceSearchDescriptor or
defaultSearchBase, as defined in the LDAP-UX configuration
profile, per section 4.6 of RFC 4876. If a partial DN is put into
theserviceSearchDescriptor, it is combined with the
defaultSearchBase. For example, if we have the following::
defaultsearchbase: dc=chn,dc=hp,dc=com
servicesearchdescriptor:
hosts:ou=hosts,?sub?(objectclass=iphost)
Then the search base for the hosts service will be:
ou=hosts,dc=chn,dc=hp,dc=com
-s scope Overrides the search scope as defined in the LDAP-UX configuration.
scope specifies how deep in the directory tree the search should
search. scope can be one of the following keywords:
base
Performs a search only on the base specified with the -b
option.
one
Searches all entries that are immediate child entries of the base.
sub
Searches all entries below and including the base.
-f filter Specifies an LDAP-style search filter, used to select specific host
entries from the LDAP directory. When -f is used, the specified
filter is assumed to apply to POSIX-style host entries. This means
the filter specified with -f is amended with the default LDAP-UX
search filter for the host object type. In addition, when -f is used,
if a known attribute for the host service (see the lists defined in
Section 9.3.9.3 (page 345)), has been mapped as defined by the
LDAP-UX configuration profile, then the mapped attribute name is
substituted in the search filter.
Consider an example with the following command:
ldaphostlist -f (cn=myhost)
9.3 LDAP user and group management tools 343