The LDAP extended operation tool
Synopsis
ldapexop [-C charset] [-d debuglevel][-D binddn][-e] [-G realm] [-h ldaphost][-help][-K keyfile] [-m mechanism] [-N certificatename] [-p ldapport] [-P keyfilepw] [-?] [-U] [-v] [-w passwd | ?] [-Y] [-Z] -op {cascrepl | controlqueue | controlrepl | getAttributes | getusertype | quiesce | readconfig | uniqueattr}
Description
The ldapexop utility is a command-line interface that provides the capability to bind to a directory server and issue a single extended operation along with any data that makes up the extended operation value.
The ldapexop utility supports the standard host, port, SSL, and authentication options used by all of the LDAP client utilities. In addition, a set of options is defined to specify the operation to be performed, and the arguments for each extended operation
To display syntax help for ldapexop, type:
ldapexop -?
or
ldapexop -help
Options
The options for the ldapexop command are divided into two categories:
General Options
These options specify the methods of connecting to the server and must be specified before the -op option.
If the utility cannot locate a key database, the system key database is used. The key database file typically contains one or more certificates of certification authorities (CAs) that are trusted by the client. These types of X.509 certificates are also known as trusted roots.
This parameter effectively enables the -Z switch. For Directory Server on i5/OS if you use -Z and do not use -K or -N, the certificate associated with the Directory Services Client application ID will be used.
Extended operations option
The -op extended-op option identifies the extended operation to be performed. The extended operation can be one of the following values:
ldapexop -op cascrepl -action -quiesce -rc "o=acme,c=us" -timeout 60
ldapexop -op controlqueue -skip all -ra "cn=server3, ibm-replicaSubentry=master1-id,ibm-replicaGroup=default, o=acme,c=us" ldapexop -op controlqueue -skip 2185 -ra "cn=server3, ibm-replicaSubentry=master1-id,ibm-replicaGroup=default, o=acme,c=us"
ldapexop -op controlrepl -action suspend -ra "cn=server3, ibm-replicaSubentry=master1-id,ibm-replicaGroup=default, o=acme,c=us"
Example
ldapexop -op getattributes -attrType unique -matches bool true
Returns a list of all attributes that have been designated as unique attributes.
ldapexop -op getattributes -attrType unique -matches bool false
Returns a list of all attributes that have been not been designated as unique attributes.
This extended operation returns the user type based on the bound DN.
Example:
ldapexop - D <AdminDN> -w <Adminpw> -op getusertype
returns:
User : root_administrator Role(s) : server_config_administrator directory_administrator
ldapexop -op quiesce -rc "o=acme,c=us" ldapexop -op quiesce -end -rc "o=ibm,c=us"
ldapexop -op readconfig -scope entire ldapexop -op readconfig -scope single "cn=configuration" ibm-slapdAdminPW
cn=Configuration ibm-slapdadmindn2 ibm-slapdadminpw2, 3 ibm-slapderrorlog1, 4 ibm-slapdpwencryption1 ibm-slapdsizelimit1 ibm-slapdsysloglevel1, 4 ibm-slapdtimelimit1 cn=Front End, cn=Configuration ibm-slapdaclcache1 ibm-slapdaclcachesize1 ibm-slapdentrycachesize1 ibm-slapdfiltercachebypasslimit1 ibm-slapdfiltercachesize1 ibm-slapdidletimeout1 cn=Event Notification, cn=Configuration ibm-slapdmaxeventsperconnection2 ibm-slapdmaxeventstotal2 cn=Transaction, cn=Configuration ibm-slapdmaxnumoftransactions2 ibm-slapdmaxoppertransaction2 ibm-slapdmaxtimelimitoftransactions2 cn=ConfigDB, cn=Config Backends, cn=IBM SecureWay, cn=Schemas, cn=Configuration ibm-slapdreadonly2 cn=Directory, cn=RDBM Backends, cn=IBM SecureWay, cn=Schemas, cn=Configuration ibm-slapdbulkloaderrors1, 4 ibm-slapdclierrors1, 4 ibm-slapdpagedresallownonadmin2 ibm-slapdpagedreslmt2 ibm-slapdpagesizelmt2 ibm-slapdreadonly2 ibm-slapdsortkeylimit2 ibm-slapdsortsrchallownonadmin2 ibm-slapdsuffix2
disconnect connections based on DN, IP, DN/IP or disconnect all connections. All connections without any operations and all connections with operations on the work queue are ended immediately. If a worker is currently working on a connection, it is ended as soon as the worker completes that one operation.
Examples:
ldapexop -op unbind -dn cn=john ldapexop -op unbind -ip 9.182.173.43 ldapexop -op unbind -dn cn=john -ip 9.182.173.43 ldapexop -op unbind -all
Example:
ldapexop -op uniqueattr -a "uid"
The following line is added to the configuration file under the "cn=Directory,cn=RDBM Backends,cn=IBM Directory,cn=schema,cn=Configuration" entry for this extended operation:
ibm-slapdPlugin:extendedop /bin/libback-rdbm.dll initUniqueAttr
Diagnostics
Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.