以 PDF 格式下载本书 (7229 KB)
ldaplist(1)Name | Synopsis | Description | Options | Examples | Exit Status | Files | Attributes | See Also | Notes Name
Synopsis/usr/bin/ldaplist [-dlv] [-h LDAP_server[:serverPort] [-M domainName] [-N profileName] [-a authenticationMethod] [-P certifPath] [-D bindDN] [-w bindPassword] [-j passwdFile]] [database [key]...] /usr/bin/ldaplist -g /usr/bin/ldaplist -h Description
If the -h LDAP_server[:serverPort] option is specified, ldaplist establishes a connection to the server pointed to by the option to obtain a DUAProfile specified by the -N option. Then ldaplist lists the information from the directory described by the configuration obtained. By default (if the -h LDAP_server[:serverPort] option is not specified), the utility searches for and lists the naming information from the LDAP directory service defined in the LDAP configuration files generated byldapclient(1M) during the client initialization phase. To use the utility in the default mode, the Solaris LDAP client must be set up in advance. The database is either a container name or a database name as defined in nsswitch.conf(4). A container is a non-leaf entry in the Directory Information Tree (DIT) that contains naming service information. The container name is the LDAP Relative Distinguished Name (RDN) of the container relative to the defaultSearchBase as defined in the configuration files. For example, for a container named ou=people, the database name is the database specified in nsswitch.conf. This database is mapped to a container, for example, passwd maps to ou=people. If an invalid database is specified, it is mapped to a generic container, for example, nisMapName=name). The key is the attribute value to be searched in the database. You can specify more than one key to be searched in the same database. The key can be specified in either of two forms: attribute=value or value. In the first case, ldaplist passes the search key to the server. In the latter case, an attribute is assigned depending on how the database is specified. If the database is a container name, then the “cn” attribute type is used. If the database is a valid database name as defined in the nsswitch.conf, then a predefined attribute type is used (see table below). If the database is an invalid database name, then cn is used as the attribute type. The ldaplist utility relies on the Schema defined in the RFC 2307bis, currently an IETF draft. The data stored on the LDAP server must be stored based on this Schema, unless the profile contains schema mapping definitions. For more information on schema mapping see ldapclient(1M). The following table lists the default mapping from the database names to the container, the LDAP object class, and the attribute type used if not defined in the key.
The following databases are available only if the system is configured with Trusted Extensions:
The ldaplist utility supports substring search by using the wildcard “*” in the key. For example, “my*” matches any strings that starts with “my”. In some shell environments, keys containing the wildcard might need to be quoted. If the key is not specified, all the containers in the current search baseDN is listed. Options
The following options are supported: ExamplesExample 1 Listing All Entries in the Hosts DatabaseThe following example lists all entries in the hosts database:
Example 2 Listing All Entries in a Non-Standard Database ou=newThe following example lists all entries in a non-standard database:
Example 3 Finding user1 in the passwd DatabaseThe following example finds user1 in the passwd database:
Example 4 Finding the Entry With Service Port of 4045 in the services DatabaseThe following example finds the entry with the service port of 4045 in the services database:
Example 5 Finding All Users With Username Starting with new in the passwd DatabaseThe following example finds all users with the username starting with new in the passwd database:
Example 6 Listing the Attributes for the hosts DatabaseThe following example lists the attributes for the hosts database:
Example 7 Finding user1 in the passwd DatabaseThe following example finds user1 in the passwd database. An LDAP server is specified explicitly.
Exit Status
The following exit values are returned: Files
AttributesSee attributes(5) for descriptions of the following attributes:
See Alsoldap(1), ldapadd(1), ldapdelete(1), ldapmodify(1), ldapmodrdn(1), ldapsearch(1), idsconfig(1M), ldap_cachemgr(1M), ldapaddent(1M), ldapclient(1M), suninstall(1M), resolv.conf(4), attributes(5) NotesRFC 2307bis is an IETF informational document in draft stage that defines an approach for using LDAP as a naming service. Currently StartTLS is not supported by libldap.so.5, therefore the port number provided refers to the port used during a TLS open, versus the port used as part of a StartTLS sequence. For example, -h foo:1000 -a tls:simple, refers to a raw TLS open on host foo, port 1000, not a open, StartTLS sequence on an unsecured port 1000. If port 1000 is unsecured the connection is not made. Name | Synopsis | Description | Options | Examples | Exit Status | Files | Attributes | See Also | Notes |
|||||||||||||||||