SunOS man pages : ldaplist (1)
User Commands ldaplist(1)
NAME
ldaplist - search and list naming information from a LDAP
directory service
SYNOPSIS
/usr/bin/ldaplist [ -dlv ] [ database [ key ] ... ]
/usr/bin/ldaplist -h
DESCRIPTION
The ldaplist utility searches for and lists the naming
information from the LDAP directory service defined in the
/var/ldap/LDAP_CLIENT_CACHE file generated by ldapclient(1M)
during the client initialization phase.
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 Distiguished Name (RDN) of the container relative
to the search baseDN defined in the LDAP_CLIENT_CACHE file.
For example, for a container named "ou=people", the database
name is the database specified in nsswitch.conf. This data-
bases is mapped to a container (for example, "passwd" maps
to "ou=people"). If an invalid database is specified, it
will be mapped to a generic container (for example,
"nisMapName=name").
The key is the attribute value to be searched in the data-
base. 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 it is a valid database name
as defined in the nsswitch.conf, then a predefined attribute
type is used (see table below). If it is an invalid data-
base name, then "cn" is used as the attribute type.
The ldaplist utility relies on the Schema defined in the RFC
2307 (with new extension). The data stored on the LDAP
server must be stored based on this Schema. The following
table lists the mapping from the database names to the con-
tainer, the LDAP object class, and the attribute type used
if not defined in the key:
SunOS 5.8 Last change: 21 Oct 1999 1
User Commands ldaplist(1)
_________________________________________________________________________
| Database | Objectclass | Attr Type | Container |
|_______________|________________|_________________|_____________________|
| aliases | mailGroup | cn | ou=Aliases |
|_______________|________________|_________________|_____________________|
| automount | nisObject | cn | nisMapName=auto_* 1|
|_______________|________________|_________________|_____________________|
| bootparams | bootableDevice| cn | ou=Ethers |
|_______________|________________|_________________|_____________________|
| ethers | ieee802Device | cn | ou=Ethers |
|_______________|________________|_________________|_____________________|
| group | posixgroup | cn | ou=Group |
|_______________|________________|_________________|_____________________|
| hosts | ipHost | cn | ou=Hosts |
|_______________|________________|_________________|_____________________|
| ipnodes | ipHost | cn | ou=Hosts |
|_______________|________________|_________________|_____________________|
| netgroup | ipNetgroup | cn | ou=Netgroup |
|_______________|________________|_________________|_____________________|
| netmasks | ipNetwork | ipnetworknumber| ou=Networks |
|_______________|________________|_________________|_____________________|
| networks | ipNetwork | ipnetworknumber| ou=Networks |
|_______________|________________|_________________|_____________________|
| passwd | posixAccount | uid | ou=People |
|_______________|________________|_________________|_____________________|
| protocols | ipProtocol | cn | ou=Protocols |
|_______________|________________|_________________|_____________________|
| publickey | nisKeyObject | uidnumber | ou=People 2 |
|_______________|________________|_________________|_____________________|
| | | cn | ou=Hosts 3 |
|_______________|________________|_________________|_____________________|
| rpc | oncRpc | cn | ou=Rpc |
|_______________|________________|_________________|_____________________|
| services | ipService | cn | ou=Services |
|_______________|________________|_________________|_____________________|
The following notes correspond to the numerals in the far
right-hand column.
1 auto_* represents auto_home, auto_direct, ...
2 If the key starts with a digit, it will be interpreted
as an uid number.
3 If the key starts with a non-digit, it will be inter-
preted as a host name.
The ldaplist utility supports substring search by using the
wildcard "*" in the key. For example, "my*" will match any
strings that starts with "my". In some shell environments,
keys containing the wildcard may need to be quoted.
SunOS 5.8 Last change: 21 Oct 1999 2
User Commands ldaplist(1)
If the key is not specified, all the containers in the
current search baseDN will be listed.
OPTIONS
The following options are supported:
-d List the attributes for the specified database, rather
than the entries. By default, the entries are listed.
-h List the database mapping.
-l List all the attributes for each entry matching the
search criteria. By default, ldaplist lists only the
Distiguished Name of the entries found.
-v Set verbose mode. The ldaplist utility will also
print the filter used to search for the entry. The
filter will be prefixed with "+++".
EXAMPLES
Example 1: List all entries in the hosts database.
example% lpdalist hosts
Example 2: List all entries in a non-standard database
ou=new.
example% ldaplist ou=new
Example 3: Find "user1" in the passwd database.
example% ldaplist passwd user1
Example 4: Find the entry with service port of 4045 in the
services database.
example% ldaplist services ipserviceport=4045
Example 5: Find all users with username staring with "new"
in the passwd database.
example% ldaplist passwd 'new*'
Example 6: List the attributes for the hosts database.
example% ldaplist -d hosts
EXIT STATUS
The following exit values are returned:
0 Successfully matched some entries.
SunOS 5.8 Last change: 21 Oct 1999 3
User Commands ldaplist(1)
1 Successfully searched the table and no matches were
found.
2 An error occurred. An error message is output.
FILES
/var/ldap/ldap_client_cache
contains a list of servers, their transport addresses,
and the security method used to access them.
/var/ldap/ldap_client_cred
This file contains Bind Distinguished Name and the
encrypted password. This file is normally readable
only by root (uid 0) and is modified and read only by
ldap_cachemgr(1M).
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWnisu |
|_____________________________|_____________________________|
SEE ALSO
ldap(1), ldap_cachemgr(1M), ldapclient(1M), attributes(5)
NOTES
RFC 2307 is an IETF experimental document that defines an
approach for using LDAP as a Network Information Service. An
extension to the RFC 2307 draft is pending.
SunOS 5.8 Last change: 21 Oct 1999 4
|
 |
|
|