Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java(TM) System Directory Server 5 2004Q2 Administration Reference 

Chapter 1
Command-Line Tools Reference

This chapter contains reference information on the command-line tools provided with Directory Server. This chapter is divided into the following sections:


Paths to Command-Line Tools

This section covers the following:

Locations and Brief Descriptions

After configuration is complete, Directory Server command-line tools include the directoryserver wrapper to the other tools (/usr/sbin/directoryserver on Solaris systems, and /opt/sun/sbin/directoryserver on Red Hat systems), and many individual standalone tools under the ServerRoot directory where Directory Server instances are located (by default /var/opt/mps/serverroot, but typically customized during configuration). Table 1-1 lists the subcommands and what they do. For a list of options for the directoryserver wrapper itself, refer to directoryserver.

LDAP client commands, ldapcompare, ldapdelete, ldapmodify, ldapsearch, are provided as part of the Directory Server Resource Kit. Refer to the Directory Server Resource Kit Tools Reference for details.

Table 1-1  Command-Line Tools Quick Reference 

Command

Brief Description

prefix/sbin/directoryserver account-activate1

Activates an entry or group of entries

prefix/sbin/directoryserver account-inactivate

Inactivates an entry or group of entries

prefix/sbin/directoryserver account-status

Establishes account status

prefix/sbin/directoryserver admin_ip

Changes Administration Server IP address

prefix/sbin/directoryserver bak2db

Restores a database from backup

prefix/sbin/directoryserver bak2db-task

Restores a database from backup online

prefix/sbin/directoryserver configure

Configures a Directory Server instance

prefix/sbin/directoryserver db2bak

Creates a database backup archive

prefix/sbin/directoryserver db2bak-task

Creates a database backup archive online

prefix/sbin/directoryserver db2index-task

Creates and generates indexes online

prefix/sbin/directoryserver db2ldif

Exports database contents to LDIF

prefix/sbin/directoryserver db2ldif-task

Exports database contents to LDIF online

prefix/sbin/directoryserver idsktune

Checks patches and verifies system tuning

prefix/sbin/directoryserver ldif

Base64 encodes data for inclusion in LDIF

prefix/sbin/directoryserver ldif2db

Imports database contents from LDIF

prefix/sbin/directoryserver ldif2db-task

Imports database contents from LDIF online

prefix/sbin/directoryserver ldif2ldap

Imports data from LDIF over LDAP online

prefix/sbin/directoryserver magt

Starts the master SNMP agent

prefix/sbin/directoryserver mmldif

Combines multiple LDIF files

prefix/sbin/directoryserver monitor

Retrieves performance monitoring information

prefix/sbin/directoryserver nativetoascii

Converts one language encoding to another

prefix/sbin/directoryserver pwdhash

Prints the encrypted form of a password

prefix/sbin/directoryserver restart

Restarts a Directory Server instance

prefix/sbin/directoryserver restart-admin

Restarts Administration Server

prefix/sbin/directoryserver restoreconfig

Restores the Administration Server configuration

prefix/sbin/directoryserver sagt

Starts the proxy SNMP agent

prefix/sbin/directoryserver saveconfig

Saves the Administration Server configuration

prefix/sbin/directoryserver start

Starts a Directory Server instance

prefix/sbin/directoryserver start-admin

Starts Administration Server

prefix/sbin/directoryserver startconsole

Starts Server Console

prefix/sbin/directoryserver stop

Stops a Directory Server instance

prefix/sbin/directoryserver stop-admin

Stops Administration Server

prefix/sbin/directoryserver suffix2instance

Maps a suffix to a backend name

prefix/sbin/directoryserver sync-cds

Updates version in configuration directory server

prefix/sbin/directoryserver unconfigure

Removes a Directory Server instance

prefix/sbin/directoryserver vlvindex

Creates virtual list view indexes

ServerRoot/bin/slapd/admin/bin/migrateInstance5

Migrates data from a previous version

ServerRoot/bin/slapd/server/ns-slapd db2index

Creates and generates indexes

ServerRoot/sbin/entrycmp

Compares the same entry in multiple replicas

ServerRoot/sbin/fildif

Creates a filtered version of an LDIF file

ServerRoot/sbin/insync

Indicates synchronization between multiple replicas

ServerRoot/sbin/repldisc

Discovers a replication topology

ServerRoot/slapd-serverID/schema_push.pl2

Updates schema modification time stamps

1Here prefix is, by default, /usr on Solaris systems, /opt/sun on Red Hat systems.

2Here serverID reflects the name of the Directory Server instance defined during configuration.

Table of Correspondences

Many standalone tools have subcommand counterparts under the directoryserver wrapper command. Table 1-2 lists individual tool command names next to the corresponding tools wrapped by the directoryserver command.


Note

To execute standalone tools, you must change to the directory in which they reside. Although it is possible to set PATH and LD_LIBRARY_PATH variables to execute the utilities, this is not recommended. You run the risk of disrupting the correct execution of other utilities and of compromising the security of the system, particularly when you have more than one server version installed.


Table 1-2  Command-Line Tools Table of Correspondences 

Standalone Tool

Wrapper and Subcommand

none

directoryserver nativetoascii

ServerRoot/bin/slapd/admin/bin/migrateInstance5

none

ServerRoot/bin/slapd/server/idsktune

directoryserver idsktune

ServerRoot/bin/slapd/server/ldif

directoryserver ldif

ServerRoot/bin/slapd/server/mmldif

directoryserver mmldif

ServerRoot/bin/slapd/server/ns-slapd db2index

none

ServerRoot/bin/slapd/server/pwdhash

directoryserver pwdhash

ServerRoot/plugins/snmp/magt/magt

directoryserver magt

ServerRoot/plugins/snmp/sagt/sagt

directoryserver sagt

ServerRoot/restart-admin

directoryserver restart-admin

ServerRoot/sbin/entrycmp

none

ServerRoot/sbin/fildif

none

ServerRoot/sbin/insync

none

ServerRoot/sbin/repldisc

none

ServerRoot/shared/bin/admin_ip.pl

directoryserver admin_ip

ServerRoot/slapd-serverID/bak2db

directoryserver bak2db

ServerRoot/slapd-serverID/bak2db.pl

directoryserver bak2db-task

ServerRoot/slapd-serverID/db2bak

directoryserver db2bak

ServerRoot/slapd-serverID/db2bak.pl

directoryserver db2bak-task

ServerRoot/slapd-serverID/db2index.pl

directoryserver db2index-task

ServerRoot/slapd-serverID/db2ldif

directoryserver db2ldif

ServerRoot/slapd-serverID/db2ldif.pl

directoryserver db2ldif-task

ServerRoot/slapd-serverID/ldif2db

directoryserver ldif2db

ServerRoot/slapd-serverID/ldif2db.pl

directoryserver ldif2db-task

ServerRoot/slapd-serverID/ldif2ldap

directoryserver ldif2ldap

ServerRoot/slapd-serverID/monitor

directoryserver monitor

ServerRoot/slapd-serverID/ns-accountstatus.pl

directoryserver account-status

ServerRoot/slapd-serverID/ns-activate.pl

directoryserver account-activate

ServerRoot/slapd-serverID/ns-inactivate.pl

directoryserver account-inactivate

ServerRoot/slapd-serverID/restart-slapd

directoryserver restart

ServerRoot/slapd-serverID/restoreconfig

directoryserver restoreconfig

ServerRoot/slapd-serverID/saveconfig

directoryserver saveconfig

ServerRoot/slapd-serverID/schema_push.pl

none

ServerRoot/slapd-serverID/start-slapd

directoryserver start

ServerRoot/slapd-serverID/stop-slapd

directoryserver stop

ServerRoot/slapd-serverID/suffix2instance

directoryserver suffix2instance

ServerRoot/slapd-serverID/vlvindex

directoryserver vlvindex

ServerRoot/start-admin

directoryserver start-admin

ServerRoot/startconsole

directoryserver startconsole

ServerRoot/stop-admin

directoryserver stop-admin

setup (no longer extant)1

directoryserver configure

uninstall (no longer extant)2

directoryserver unconfigure

1Installation and configuration currently are separate operations. Earlier versions performed both as part of the setup process.

2Unconfiguration and uninstallation currently are separate operations. Earlier versions performed both as part of uninstallation.

Local Character Sets and UTF-8

Where possible, use iconv(1), to convert to UTF-8 before importing LDIF into Directory Server, and before viewing LDIF exported or output from Directory Server.

You can also use ldapsearch, described in the Directory Server Resource Kit Tools Reference. If you set the LANG environment variable to reflect the appropriate locale, and use ldapsearch with the -i charset and -e options, Directory Server accepts your local character set and also minimizes base64 encoding of values returned by the search.


Tools Reference

This section covers the command-line tools in detail, in alphabetical order by command or subcommand name. Refer to Table 1-1 and Table 1-2 for information on where to find each tool, and for brief descriptions.

account-activate

Activates an entry or group of entries. For details on inactivating and activating accounts, refer to the Directory Server Administration Guide.

Syntax

directoryserver account-activate [-D rootDN]
{-w password | -w - | -j filename }[-h host] [-p port] -I DN

Standalone

ns-activate.pl

Options

Table 1-3  account-activate Options 

Option

Meaning

-D

Directory Server user DN with root permissions, such as Directory Manager.

-h

Host name of Directory Server. The default value is the full host name of the machine on which Directory Server is installed.

-I DN

Entry DN or role DN to activate.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-p

Directory Server port. The default value is the Directory Server LDAP port, specified at installation time.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

account-inactivate

Inactivates, and thus locks, an entry or group of entries. For details on inactivating and activating accounts, refer to the Directory Server Administration Guide.

Standalone

ns-inactivate.pl

Syntax

directoryserver account-inactivate [-D rootDN]
{-w password | -w - | -j filename } [-h host] [-p port] -I DN

Options

Table 1-4  account-inactivate Options 

Option

Meaning

-D

Directory Server user DN with root permissions, such as Directory Manager.

-h

Host name of Directory Server. The default value is the full host name of the machine on which Directory Server is installed.

-I DN

Entry DN or role DN to inactivate.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-p

Directory Server port. The default value is the Directory Server LDAP port, specified at installation time.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

account-status

Provides account status information to establish whether an entry or group of entries is inactivated or not. For details on inactivating and activating accounts, refer to the Directory Server Administration Guide.

Syntax

directoryserver account-status [-D rootDN]
{-w password | -w - | -j filename } [-h host] [-p port] -I DN

Standalone

ns-accountstatus.pl

Options

Table 1-5  account-status Options 

Option

Meaning

-D

Directory Server user DN with root permissions, such as Directory Manager.

-h

Host name of Directory Server. The default value is the full host name of the machine on which Directory Server is installed.

-I DN

Entry DN or role DN whose status is required.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-p

Directory Server port. The default value is the Directory Server LDAP port, specified at installation time.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

admin_ip

When your system’s IP address changes, you must update the local Administration Server configuration file and the configuration directory. If you do not enter the new IP address in these locations, you will not be able to start the Administration Server. admin_ip changes the IP address for an instance of Administration Server in both the local.conf file and the configuration directory.

Standalone

admin_ip.pl

Usage

Enter the following

directoryserver admin_ip Directory_Manager_DN Directory_Manager_password old_IP new_IP [port]

The old IP address is saved in a file called local.conf.old.

bak2db

Restores the database from the most recent archived backup. Stop Directory Server before running this subcommand.

Syntax

directoryserver bak2db backup_directory

Standalone

bak2db

For more information on restoring databases, refer to Chapter 4, “Backing Up and Restoring Data” in the Directory Server Administration Guide.

bak2db-task

bak2db-task creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option. Directory Server must be running for this tool to work.

Syntax

directoryserver bak2db-task [-v] -D rootDN {-w password | -w - | -j filename }
-a backup_directory [-t databasetype]

Standalone

bak2db.pl

Options

Table 1-6  bak2db-task Options 

Option

Meaning

-a

Directory of the backup files.

-D

User DN with root permissions, such as Directory Manager. The default is the DN of the directory manager, which is read from the nsslapd-root attribute under cn=config.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-t

Database type. Currently, ldbm is the only possible type and the default value.

-v

Verbose mode.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

configure

Configures a Directory Server instance. The configure subcommand has two modes of operation. You can invoke it with a curses-based interaction to gather input. Alternatively, you can provide input in a configuration file using the -f option.

Syntax

directoryserver configure [-f configuration_file]

Standalone

None.

Options

Table 1-7  configure Options 

Option

Meaning

-f

Specifies the configuration file for silent installation.

db2bak

Creates a backup of the current database contents. This tool can be executed while the server is running.

Syntax

directoryserver db2bak [backup_directory]

Standalone

db2bak

The default backup_directory is ServerRoot/slapd-serverID/bak. The backup file is named according to the year-month-day-hour format (YYYY_MM_DD_hhmmss).

db2bak-task

db2bak-task creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option. Directory Server must be running for this tool to work.

Syntax

directoryserver db2bak-task [-v] -D rootDN {-w password | -w - | -j filename }
-a backup_directory [-t databasetype]

Standalone

db2bak.pl

Options

Table 1-8  db2bak-task Options 

Option

Meaning

-a

Directory where the backup files will be stored. By default it is under ServerRoot/slapd-serverID/bak.

The backup file is named according to the year-month-day-hour format (YYYY_MM_DD_hh_mm_ss).

-D

User DN with root permissions, such as Directory Manager. The default is the DN of the directory manager, which is read from the nsslapd-root attribute under cn=config.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-t

Database type. Currently, ldbm is the only possible type and the default value.

-v

Verbose mode.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

db2index-task

Creates and generates the new set of indexes to be maintained following the modification of indexing entries in the cn=config configuration file. Note that indexes are generated only for those attributes that are present in the database configuration as index attributes. Directory Server must be running for this tool to work.

Syntax

directoryserver db2index-task [-v] -D rootDN
{-w password | -w - | -j filename } -n backend_instance [-t attributeName]

Standalone

db2index.pl

Options

Table 1-9  db2index-task Options 

Option

Meaning

-D

User DN with root permissions, such as Directory Manager.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-n

Instance to be indexed.

-t

Name of the attribute to be indexed, with types of indexes to generate. Supported index types include approx, eq, pres, and sub.

For example, to generate equality and substring indexes for Common Name attribute values, use:

-t cn:eq,sub

Matching rule OIDs may also be included using the following syntax:

-t attributeName:indexTypeList:mrList

Here attributeName is the attribute type, such as cn, indexTypeList is a comma-separated list of index types, such as eq,sub, and mrList is a comma-separated list of matching rule OIDs.

If omitted, all indexes defined for that instance are generated.

-v

Verbose mode.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.


Note

This tool creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option.

There is no task available for VLV indexes.


db2ldif

Exports the contents of the database to LDIF. This tool can be executed while the server is still running.

Syntax

directoryserver db2ldif {-n backend_instance}* | {-s includesuffix}*
[{-x excludesuffix}*] [-r] [-C] [-u] [-U] [-m] [-M] [-a outputfile] [-1] [-N]
[-Y keydb-pwd] [-y keydb-pwd-file]

Standalone

db2ldif

Options

Code Example 1-1  db2ldif Options 

Option

Meaning

-1

For reasons of backward compatibility, delete the first line of the LDIF file, that gives the version of the LDIF standard.

-a

File name of the output LDIF file.

-C

Only the main db file is used.

-m

Minimal base64 encoding.

-M

Use of several files for storing the output LDIF, with each instance stored in instance_outfile (where outfile is the file name specified for -a option).

-n

Database backend to be exported.

-N

Specifies that entry IDs are not to be included in the LDIF output. The entry IDs are necessary only if the db2ldif output is to be used as input to db2index.

-r

Export replica.

-s

Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.

When exporting suffixes split across multiple backends, you must export each subsuffix separately. With the -s suffix option, Directory Server exports only those entries in the backend containing the suffix entry.

-u

Request that the unique id is not exported.

-U

Request that the output LDIF is not folded.

-x

Suffix(es) to be excluded.

-y

Specifies the file in which the password for the key database is held, also used when handling encrypted attributes.

-Y

Specifies the password for the key database, providing a means of authentication required by Directory Server when handling encrypted attributes.


Note

db2ldif -r cannot be used if another slapd process is running, because replication writes the RUV entry into the database during export. To export the database while a slapd process is running, use db2ldif-task -r instead.

You must specify either the -n or the -s option (or both).

The output LDIF will be stored in one file by default. Should you want to specify the use of several files, then use the option -M.


db2ldif-task

Exports the contents of the database to LDIF. This tool creates an entry in the directory that launches this dynamic task. The entry is generated based upon the values you provide for each option. The * indicates that multiple occurrences are allowed.

Directory Server must be running and you must specify either -n backend_instance or -s includesuffix for this tool to work.

Syntax

directoryserver db2ldif-task [-v] -D rootDN
{-w password | -w - | -j filename } {-n backend_instance}* | {-s includesuffix}*
[{-x excludesuffix}*] [-a outfile] [-N] [-r] [-C] [-u] [-U] [-m] [-o] [-1] [M]
[-Y keydb-pwd] [-y keydb-pwd-file]

Standalone

db2ldif.pl

Options

Table 1-10  db2ldif-task Options 

Option

Meaning

-1

For the purposes of backward compatibility, delete the first line of the LDIF file that gives the version of the LDIF standard.

-a

File name of the output LDIF file.

-C

Only the main db file is used.

-D

User DN with root permissions, such as Directory Manager.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-m

Minimal base64 encoding.

-M

Output LDIF is stored in multiple files.

-n

Database backend to be exported.

-N

Suppress printing sequential number.

-o

Output LDIF to be stored in one file by default with each instance stored in instance_outfile.

-r

Export replica.

-s

Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.

When exporting suffixes split across multiple backends, you must export each subsuffix separately. With the -s suffix option, Directory Server exports only those entries in the backend containing the suffix entry.

-u

Request that the unique id is not exported.

-U

Request that the output LDIF is not folded.

-v

Verbose mode.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

-x

Suffix(es) to be excluded.

-y

Specifies the file in which the password for the key database is held, also used when handling encrypted attributes.

-Y

Specifies the password for the key database, providing a means of authentication required by Directory Server when handling encrypted attributes.

directoryserver

This command wraps many of the tools as subcommands, setting command paths and library paths as necessary so you can use the subcommands without having to remember where the standalone tools reside.

For details on each subcommand, refer to the individual entries in this chapter.

Syntax

directoryserver help [subcommand]

directoryserver -g|-getdefaultversion

directoryserver -l|-listversions

directoryserver {-s|-server} serverID subcommand

directoryserver -s|-setdefaultversion

directoryserver -u|-useversion version subcommand

Options and Arguments

Table 1-11  directoryserver Options and Arguments 

Option

Meaning

help

Display a usage message for the wrapper tool, or for the subcommand specified.

-g

Display the Directory Server software version to which the wrapper tool applies when no version is specified.

-l

List the different versions of Directory Server software installed to which the wrapper tool can apply.

-s

Depending on what follows either:

  • Set the Directory Server software version permanently to which the wrapper tool applies when no version is specified. A version corresponds to a software release, such as 5.2.
    For example, to set the default version to 5.2:
    directoryserver -s 5.2
  • Apply the subcommand specified for the serverID instance specified. An instance is a set of data and scripts that when combined with the running software offer a directory service to client applications.
    For example, to start the instance located under Ser’verRoot/slapd-mydir/:
    directoryserver -s mydir start

-u

Apply the subcommand to the specified Directory Server software version.

entrycmp

The entrycmp tool compares the same entry on two or more different servers, used to troubleshoot replication of a particular entry present in two different Directory Server instances. An entry is retrieved from the master and the entry’s nsuniqueid is used to retrieve the same entry from a specified consumer. All the attributes and values of the two entries are compared. If they are identical, the entries are considered to be the same.

Background

Before describing how this tool works, it is important that you understand the following general replication information.

A Replication Update Vector (RUV) is maintained on each replica. The RUV identifies each master replica within the topology, its Replica ID, and the latest change on each master, expressed as a Change Sequence Number (CSN). A CSN identifies each change made to a master server. A CSN consists of a timestamp, a sequence number, the master Replica ID, and a subsequence number.

The node on which you are running the insync and entrycmp tools must be able to reach all the specified hosts. If the hosts are unreachable due to a firewall, VPN, or other network setup reasons, you will encounter difficulties using these tools. For the same reason, you should ensure that all the servers are up and running before attempting to use the replication monitoring tools.

This replication monitoring tool connects to the server(s) via LDAP and relies on access to cn=config to obtain the replication status. You must therefore have read access to the data under cn=config. This should be taken into account particularly when replication is configured over SSL.

Syntax

You must run this tool from the directory where it resides.

cd ServerRoot/sbin/
./entrycmp [-D binddn] [-w password] [-n] [-p port] [-e SSL port] [-j file]
[-J file] [-W keypasswd] [-K keydbpath] [-N certname] [-P certdbpath]
ServerSpec entryDN

Note that the ServerSpec option includes the -s and -c options.

Options

entrycmp takes the following options:

Table 1-12  Standard entrycmp Options 

Option

Meaning

-D

The distinguished name with which to bind to the server. This parameter is optional if the server is configured to support anonymous access. If a DN is specified in the ServerSpec, this overrides the -D option.

entryDN

Specifies the DN of the entry that you wish to compare.

HostSpec

HostSpec is defined as:

[bindDN[:[password]]@]host[:port]

For example
"cn=directory manager":mypword@myServer:5201

-j

If specifying the default password at the command line poses a security risk, the password can be stored in a file. The -j option specifies this file.

-n

Specifies that the tool should not run in interactive mode. Running in interactive mode allows you to re-enter the bindDN, password and host and port, if the tool encounters a bind error.

-p

The TCP port used by Directory Server. The default port is 389. If a port is specified in the ServerSpec, this overrides the -p option.

ServerSpec

The server specification. This can be:

-s/-S HostSpec [-c/-C HostSpec -c/-C HostSpec ...]

or

-c/-C HostSpec [-s/-S HostSpec -s/-S HostSpec ...]

where -s is the supplier replica and -c is the consumer replica. You can specify any number of supplier and consumer replicas in this list.

If you are using SSL, use -S and -C in the server specification. In addition, if you are using client authentication, HostSpec specifies the certificate name and key password, rather than the bind DN and password.

Note: If no -c option is specified, the -s HostSpec may refer to any server, either a consumer or a supplier.

-w

The password associated with the distinguished name specified by the -D option. If a password is specified in the ServerSpec, this overrides the -w option.


Note

When identifying hosts, you must use either symbolic names or IP addresses for all hosts. Using a combination of the two can cause problems.


SSL Options

You can use the following options to specify use of LDAPS when communicating with Directory Server. You also use these options if you want to use certificate-based authentication. These options are valid only when LDAPS has been turned on and configured. For more information on certificate-based authentication and how to create a certificate database for use with LDAP clients, refer to Chapter 11, “Managing SSL” in the Directory Server Administration Guide.

You must specify the Directory Server’s encrypted port when you use the SSL options:

Table 1-13  SSL Options 

Option

Meaning

-e

The default SSL port.

-J

This option has the same function as the -j option, for the key password.

-K

Specifies the location of the key database used for certificate-based client authentication.

-N

Specifies the certificate name to use for certificate-based client authentication. For example, -N Server-Cert. If this option is specified, the -W option is required.

-P

Specifies the location of the certificate database.

-W

Specifies the password for the certificate database identified by the -P option. For example, -W serverpassword.


Caution

When running the replication monitoring tools over SSL, the server on which you are running the tools must have a copy of all the certificates used by the other servers in the topology.


Examples
  1. Basic example
  2. # ./entrycmp -s "cn=directory manager:password@portugal:1389"
    -c "cn=directory manager:password@france:2389" "ou=people,dc=example,dc=com"

    entrycmp: france:2389 - entries match

  3. SSL example
  4. # ./entrycmp -n -K ServerRoot/alias/slapd-S1-key3.db
    -P ServerRoot/alias/slapd-S1-cert7.db -W password -N "MyCertificate" -S "portugal:24211" -C "france:24213" "ou=people,dc=example,dc=com"


    Note

    Operational attributes are not taken into account when comparing entries.


fildif

This utility enables you to create a filtered version of any LDIF input file. fildif does not require Directory Server to be running, but you must run this tool from the directory where it resides.

fildif takes a configuration file as an input parameter. This configuration file must conform to the configuration rules of the Filtering Service included as part of Directory Server, and must contain the specific set and element entries that define these rules. The configuration rules can be defined using the Server Console or at the command line. For more information on the Filtering Service and how it is configured, refer to Chapter 8, “Managing Replication” in the Directory Server Administration Guide.

Directory Server allows you to configure the following filtering rules:

  1. Filter in a list of attributes that must be included in an entry.
  2. Filter out a list of attributes that must be excluded from an entry.

A filtering service configuration is accessed through a pointer entry. The pointer entry is provided to fildif with the -b parameter. A pointer attribute within this entry (provided by the -a parameter) determines the RDN of the filtering service configuration entry to be used for the filtering.

Syntax

cd ServerRoot/sbin/
./fildif -i input_file [-f] [-o output_file] [-c config_file] -b pointer_entry [-a pointer_attr]

Options

Table 1-14  fildif Options 

Option

Meaning

-a

The attribute that will be used inside the pointer entry to point to a particular filtering service configuration definition. If this parameter is not present, the default partialReplConfiguration is used.

-b

The pointer entry. This parameter is mandatory and specifies the DN of the entry that will be used as the filtering service configuration entry point. The entry specified by this DN must exist in the configuration file specified by the -c parameter.

-c

The configuration file in which the filtering configuration is stored.

-f

Forces fildif to overwrite the contents of the specified output file, if it exists.

-i

The input LDIF file whose contents will be filtered. This parameter is mandatory.

-o

The output LDIF file in which the filtered results will be stored. If no output file is specified, the default output file is ./output.ldif.

Exit Status

The following exit values are returned:

On error, verbose error messages are output to standard output.

Example

# ./fildif -i data.ldif -o filt_data.ldif -f -c config_fildif.ldif
-b "cn=conf_20,cn=sets,cn=filtering service,cn=features,cn=config"
-a ds5PartialReplConfiguration

idsktune

Provides an easy and reliable way of checking the patch levels and kernel parameter settings for your system. You must install Directory Server before you can run idsktune. It gathers information about the operating system, kernel, and TCP stack to make tuning recommendations.

Syntax

directoryserver idsktune [-c] [-D] [-i installdir] [-q] [-v]

Standalone

idsktune

Options

Table 1-15  idsktune Options 

Option

Meaning

-c

Client-specific tuning: the output only includes tuning recommendations for running a directory client application.

-D

Debug mode: the output includes the commands it runs internally, preceded by the DEBUG heading.

-i installdir

Specifies the basedir installation directory.

-q

Quiet mode. Output only includes tuning recommendations. OS version statements are omitted.

-v

Version. Gives the build date identifying the version of the tool.

insync

The insync tool indicates the synchronization state between a master replica and one or more consumer replicas. insync compares the RUVs of replicas and displays the time difference or delay (in seconds) between the servers.

Background

Before describing how this tool works, it is important that you understand the following general replication information.

A Replication Update Vector (RUV) is maintained on each replica. The RUV identifies each master replica within the topology, its Replica ID, and the latest change on each master, expressed as a Change Sequence Number (CSN). A CSN identifies each change made to a master server. A CSN consists of a timestamp, a sequence number, the master Replica ID, and a subsequence number.

The node on which you are running the insync and entrycmp tools must be able to reach all the specified hosts. If the hosts are unreachable due to a firewall, VPN, or other network setup reasons, you will encounter difficulties using these tools. For the same reason, you should ensure that all the servers are up and running before attempting to use the replication monitoring tools.

This replication monitoring tool connects to the server(s) via LDAP and relies on access to cn=config to obtain the replication status. You must therefore have read access to the data under cn=config. This should be taken into account particularly when replication is configured over SSL.

Syntax

You must run this tool from the directory where it resides.

cd ServerRoot/sbin/
./insync [-D binddn] [-w password] [-n] [-d] [-t] [-p port] [-e SSL port]
[-j file] [-J file] [-W keypasswd] [-K keydbpath] [-N certname] [-P certdbpath]
[-b ReplicaRoot] ServerSpec [interval]

Note that the ServerSpec option includes the -s and -c options.

Options

insync takes the following options:

Table 1-16  Standard insync Options 

Option

Meaning

-b

The suffix (replica root) that has been specified for replication. If -b is not specified, the delay for all suffixes is printed.

-d

Prints the date of the last change recorded on the master. Using the -d option twice (-d -d) prints the time difference (in days, minutes, and seconds) between the time of the last change and the current time.

-D

The distinguished name with which to bind to the server. This parameter is optional if the server is configured to support anonymous access. If a DN is specified in the ServerSpec, this overrides the -D option.

HostSpec

HostSpec is defined as:

[bindDN[:[password]]@]host[:port]

For example
"cn=directory manager":mypword@myServer:5201

interval

The amount of time (in seconds) after which the synchronization query will start again (in an infinite loop). If no interval is specified, the synchronization query will run only once.

-j

If specifying the default password at the command line poses a security risk, the password can be stored in a file. The -j option specifies this file.

-n

Specifies that the tool should not run in interactive mode. Running in interactive mode allows you to re-enter the bindDN, password and host and port, if the tool encounters a bind error.

-p

The TCP port used by Directory Server. The default port is 389. If a port is specified in the ServerSpec, this overrides the -p option.

ServerSpec

The server specification. This can be:

-s/-S HostSpec [-c/-C HostSpec -c/-C HostSpec ...]

or

-c/-C HostSpec [-s/-S HostSpec -s/-S HostSpec ...]

where -s is the supplier replica and -c is the consumer replica. You can specify any number of supplier and consumer replicas in this list.

If you are using SSL, use -S and -C in the server specification. In addition, if you are using client authentication, HostSpec specifies the certificate name and key password, rather than the bind DN and password.

Note: If no -c option is specified, the -s HostSpec may refer to any server, either a consumer or a supplier.

-t

Prints the mode of transport (SSL or CLEAR).

-w

The password associated with the distinguished name specified by the -D option. If a password is specified in the ServerSpec, this overrides the -w option.


Note

If a delay of -1 is returned, insync was unable to obtain any replication information. This may indicate that a total update has just been run, that no changes have been sent to the supplier, or that the Replication Agreement is disabled. The corresponding warning is output in each of these cases.



Note

When identifying hosts, you must use either symbolic names or IP addresses for all hosts. Using a combination of the two can cause problems.


SSL Options

You can use the following options to specify use of LDAPS when communicating with Directory Server. You also use these options if you want to use certificate-based authentication. These options are valid only when LDAPS has been turned on and configured. For more information on certificate-based authentication and how to create a certificate database for use with LDAP clients, refer to Chapter 11, “Managing SSL” in the Directory Server Administration Guide.

You must specify the Directory Server’s encrypted port when you use the SSL options:

Table 1-17  SSL Options 

Option

Meaning

-e

The default SSL port.

-J

This option has the same function as the -j option, for the key password.

-K

Specifies the location of the key database used for certificate-based client authentication.

-N

Specifies the certificate name to use for certificate-based client authentication. For example, -N Server-Cert. If this option is specified, the -W option is required.

-P

Specifies the location of the certificate database.

-W

Specifies the password for the certificate database identified by the -P option. For example, -W serverpassword.


Caution

When running the replication monitoring tools over SSL, the server on which you are running the tools must have a copy of all the certificates used by the other servers in the topology.


Examples
  1. Specifying one supplier, one consumer, and a repetition interval of 30 seconds. Note that the delay changes to 2, indicating that the consumer is 2 seconds behind the supplier at this point.
  2. # ./insync -s "cn=directory manager:password@portugal:1389"
    -c "cn=directory manager:password@france:2389" 30

    ReplicaDn               Consumer  Supplier       Delay
    l=Europe,o=example.com  france:2389  portugal:1389  0
    l=States,o=example.com  france:2389  portugal:1389  0
    l=Europe,o=example.com  france:2389  portugal:1389  2
    l=States,o=example.com  france:2389  portugal:1389  2
    l=Europe,o=example.com  france:2389  portugal:1389  0
    l=States,o=example.com  france:2389  portugal:1389  0

  3. Requesting the date of the last change and restricting the output data to the DN o=example.com:
  4. # ./insync -s "cn=directory manager:password@portugal:1389" -b o=example.com -d

    ReplicaDn               Consumer  Supplier       Delay  Last Update
    l=Europe,o=example.com  france:2389  portugal:1389  0      05/12/2002 16:05:08
    l=States,o=example.com  france:2389  portugal:1389  0      05/12/2002 16:05:08

  5. Using certificate-based authentication
  6. # ./insync -n -K ServerRoot/alias/slapd-S1-key3.db
    -P ServerRoot/alias/slapd-S1-cert7.db -W password -N "MyCertificate" -S "portugal:24211" -C "france:24213"

ldif

The ldif subcommand formats input by adding base 64 encoding to make it suitable for inclusion in an LDIF file. This makes it easy to include binary data, such as JPEG images, along with other textual attribute values. In an LDIF file, base 64 encoded attribute values are indicated by a :: after the attribute name, for example:

jpegPhoto:: encoded data

In addition to binary data, other values that must be base 64 encoded include:

The ldif command-line utility takes any input and formats it with the correct line continuation and appropriate attribute information.

To undo base 64 encodings in LDIF files, you can use the ldifxform utility in the Directory Server Resource Kit (DSRK), with the -c nob64 option. Note, however, that the resulting file may not be reparsable as LDIF. For more information on the tools provided with the DSRK, refer to the Directory Server Resource Kit Tools Reference.

Syntax

directoryserver ldif [-b] [attrtypes]

Standalone

ldif

Options

Table 1-18  ldif Option 

Option

Meaning

-b

Specifies that the ldif utility should interpret the entire input as a single binary value. If -b is not present, each line is considered to be a separate input value.

As an alternative to the -b option, you can you can use the :< URL specifier notation, which is in fact simpler to use. For example:

jpegphoto:< file:///tmp/myphoto.jpg

Although the official notation requires three ///, the use of one / is tolerated.

ldif2db

Imports directory contents from LDIF. To run this tool Directory Server must be stopped.


NoteS

1.  ldif2db supports LDIF version 1 specifications. You can load an attribute using the :< URL specifier notation. For example:

jpegphoto:< file:///tmp/myphoto.jpg

Although the official notation requires three ///, the use of one / is tolerated. For more information on the LDIF format, refer to Chapter 7, "LDAP Data Interchange Format Reference."

2.  The default behavior of a read-write replica that has been initialized either online or offline from a backup or an LDIF file, is NOT to accept client update requests. The replica will remain in read-only mode and refer any updated operations to other suppliers in the topology until the administrator does one of the following:

  • changes the duration of the read-only mode default period using the ds5referralDelayAfterInit attribute
  • manually resets the server to read-write mode using the ds5BeginReplicaAcceptUpdates attribute (once the replica has completely converged with the other suppliers in the topology)

    The second option is advised because it does not present non-convergence risks. For more information, refer to Chapter 8, “Managing Replication” in the Directory Server Administration Guide.

Syntax

directoryserver ldif2db -n backend_instance | {-s includesuffix}*
[{-x excludesuffix}*] {-i ldif-file}* [-O] [-Y keydb-pwd] [-y keydb-pwd-file]

Standalone

ldif2db

Options

Table 1-19  ldif2db Options 

Option

Meaning

-i

File name of the input ldif file(s). When you import multiple files, they are imported in the order in which you specify them on the command line.

-n

Database backend to be imported. Ensure that you specify a database backend that corresponds to the suffix contained by the LDIF file. Otherwise the data contained by the database is deleted and the import fails.

-O

Request that only the core db is created without attribute indexes.

-s

Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.

When importing suffixes split across multiple backends, you must import each subsuffix separately. With the -s suffix option, Directory Server imports only those entries in the backend containing the suffix entry.

-x

Suffix(es) to be excluded.

-y

Specifies the file in which the password for the key database is held, also used when handling encrypted attributes.

-Y

Specifies the password for the key database, providing a means of authentication required by Directory Server when handling encrypted attributes.


Note

You must specify either the -n or the -s option (or both).


ldif2db-task

ldif2db-task creates an entry in the directory that launches this dynamic task. The entry is generated based upon the values you provide for each option. Directory Server must be running for this tool to work.

Syntax

directoryserver ldif2db-task [-v] -D rootDN {-w password | -w - | -j filename }
-n backend_instance | {-s includesuffix}* [{-x excludesuffix}*] [-O] [-c] [-g string]
[-G namespace_id] {-i filename}*

Standalone

ldif2db.pl

Options

Table 1-20  ldif2db-task Options 

Option

Meaning

-c

Merge chunk size.

-D

User DN with root permissions, such as Directory Manager.

-g string

Generation of a unique ID. Type none for no unique ID to be generated and deterministic for the generated unique ID to be name-based. By default a time based unique ID is generated.

If you use the deterministic generation to have a name-based unique ID, you can also specify the namespace you want the server to use as follows:

-g deterministic namespace_id

where namespace_id is a string of characters in the following format

00-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx

Use this option if you want to import the same LDIF file into two different Directory Servers, and if you want the contents of both directories to have the same set of unique IDs. If unique IDs already exist in the LDIF file you are importing, then the existing IDs are imported to the server regardless of the options you have specified.

-G
namespace_id

Generates a namespace ID as a name-based unique ID. This is the same as specifying the -g deterministic option.

-i

File name of the input LDIF file(s). When you import multiple files, they are imported in the order in which you specify them on the command line.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-n

Database backend to be imported.

-O

Request that only the core database is created without attribute indexes.

-s

Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.

When importing suffixes split across multiple backends, you must import each subsuffix separately. With the -s suffix option, Directory Server imports only those entries in the backend containing the suffix entry.

-v

Verbose mode.

-w

Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

-x

Suffix(es) to be excluded.

ldif2ldap

Performs an import operation over LDAP to Directory Server. Directory Server must be running for this tool to work.

Syntax

directoryserver ldif2ldap -D rootDN -w password -f filename

Standalone

ldif2ldap

Options

Table 1-21  ldif2ldap Options 

Option

Meaning

-D

User DN with root permissions, such as Directory Manager.

-f

File name of the file to be imported.

-w

Password associated with the user DN.

magt

Start SNMP master agent. By default, the CONFIG and INIT files are located in basedir/plugins/snmp/magt. For details, refer to the Directory Server Administration Guide.

Syntax

directoryserver magt CONFIG INIT

Standalone

magt

Arguments

Table 1-22  magt Arguments 

Argument

Meaning

CONFIG

File defining the community and manager the master agent works with. Specify the manager value as a valid system name or IP address.

INIT

Nonvolatile file containing information from the MIB-II system group, including system location and contact information. If INIT does not exist, starting the master agent for the first time creates this file. An invalid manager name in the INIT file prevents the master agent from starting.

migrateInstance5

The migrateInstance5 Perl script (note that this is a Perl script despite the fact that it does not have the .pl extension) migrates database content, configuration data, and schema from a Directory Server instance created using an earlier version of the product to a Directory Server instance using the current version of the product. Both instances must be installed on the same host system.

For complete information on upgrade and migration, refer to the Directory Server Installation and Migration Guide.

Before performing the migration, check that the user-defined variables contain the following associated values:

PERL5LIB

ServerRoot/bin/slapd/admin/bin

PATH

ServerRoot/bin/slapd/admin/bin

Syntax

migrateInstance5 -D rootDN {-w password | -w - | -j filename}
-n backend_instance -p port -o oldInstancePath -n newInstancePath [-t] [-L]

Options

Table 1-23  migrateInstance5 Options 

Option

Meaning

-D

Directory Server 5.2 user DN with root permissions, such as Directory Manager.

-j

Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.

-L

File in which to log the migration report. By default the migration report is stored under ServerRoot/slapd-serverID/logs/Migration_ddmmyyy_hhmmss.log

A sample log might contain:

ServerRoot/slapd-serverID/logs/Migration_20022004_153604.log

for a log created on 20 February 2004 at 15:36:04.

-n newInstancePath

Path to the new Directory Server instance.

-o oldInstancePath

Path to the old Directory Server instance.

-p

Directory Server 5.2 port.

-t

Trace level. The trace level is set to 0 by default with a valid range of 0 to 3.

-w

Password associated with the Directory Server 5.2 user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.

mmldif

Combine multiple LDIF files into a single authoritative set of entries. Typically each LDIF file is from a master server cooperating in a multi master replication agreement (for example, masters that refuse to sync up for whatever reason). Optionally, it can generate LDIF change files that could be applied to the original to bring it up to date with the authoritative version. At least two input files must be specified.

Syntax

directoryserver mmldif [-c] [-D] [-o out.ldif] inputfile ...

Standalone

mmldif

Options

Table 1-24  mmldif Options 

Argument

Meaning

-c

Write a change file (.delta) for each input file.

-D

Print debugging information.

-o out.ldif

Write authoritative data to this file. If not specified, the command compares the input files, but does not generate output LDIF.

inputfile ...

Two or more LDIF files to combine into a single set of entries.

monitor

Retrieves performance monitoring information using the ldapsearch command-line utility. Directory Server must be running for this tool to work.

Syntax

directoryserver monitor

Standalone

monitor

Options

There are no options for this tool.

For more information on the ldapsearch command-line utility, refer to the Directory Server Resource Kit Tools Reference.

nativetoascii

This subcommand is deprecated. Use iconv(1) instead.

ns-slapd db2index

Creates and regenerates indexes.

Syntax

ns-slapd db2index -D instancedir [-d debug_level] -n backend_name {-t attribute_type}*
{-T VLVSearchName}*

Options

Option

Meaning

-d

Specifies the debug level to use during index creation. For further information refer to nsslapd-errorlog-level (Error Log Level).

-D

Specifies the server configuration directory that contains the configuration information for the index creation process. You must specify the full path to the slapd-serverID directory.

-n

Specifies the name of the backend containing the entries to index.

-t

Specifies the attribute to be indexed as well as the types of indexes to create and matching rules to apply (if any). If you want to specify a matching rule, you must specify an index type. You cannot use this option with option -T.

-T

Specifies the VLV tag to use to create VLV indexes. You can use the console to specify VLV tags for each database supporting your directory tree. You can also define additional VLV tags by creating them in LDIF, and adding them to the Directory Server configuration. You cannot use this option with option -t.

pwdhash

pwdhash prints the encrypted form of a password using one of the server's encryption algorithms. If a user cannot log in, you can use this command to compare the user's password to the password stored in the directory.

Syntax

directoryserver pwdhash -D instance_dir [-H] [-c comparepwd | -s scheme] password...

Standalone

pwdhash

Options

pwdhash takes the following options

:

Table 1-25  pwdhash Options 

Option

Meaning

-c

Specifies the encrypted password to be compared with. The result of the comparison is either OK or doesn't match.

-D

The instance directory.

-H

Specifies that the passwords are hex-encoded.

password

The clear password/s from which the encrypted form should be generated (or against which the password in the directory should be compared).

-s

Generates the encrypted passwords according to the scheme's algorithm. The available schemes are SSHA, SHA, CRYPT and CLEAR.

Example

# directoryserver pwdhash -D ServerRoot/slapd-serverID -s SSHA myPassword
{SSHA}mtHyZSHfhOZ4FHmvQe09FQjvLZpnW1wbmw05cw==

# directoryserver pwdhash -D ServerRoot/slapd-serverID -c
"{SSHA}mtHyZSHfhOZ4FHmvQe09FQjvLZpnW1wbmw05cw==" aPassword
/usr/ds/v5.2/bin/slapd/server/pwdhash: password does not match.

repldisc

The repldisc utility enables you to “discover” a replication topology. Topology discovery starts with one server and constructs a graph of all known servers (using the RUVs and Replication Agreements). repldisc then prints an adjacency matrix describing the topology.

Background

Before describing how this tool works, it is important that you understand the following general replication information.

A Replication Update Vector (RUV) is maintained on each replica. The RUV identifies each master replica within the topology, its Replica ID, and the latest change on each master, expressed as a Change Sequence Number (CSN). A CSN identifies each change made to a master server. A CSN consists of a timestamp, a sequence number, the master Replica ID, and a subsequence number.

The node on which you are running the tool must be able to reach all the specified hosts. If the hosts are unreachable due to a firewall, VPN, or other network setup reasons, you will encounter difficulties using this tool. For the same reason, you should ensure that all the servers are up and running before attempting to use the tool.

This replication monitoring tool connects to the server(s) via LDAP and relies on access to cn=config to obtain the replication status. You must therefore have read access to the data under cn=config. This should be taken into account particularly when replication is configured over SSL.

Syntax

You must run this tool from the directory where it resides.

cd ServerRoot/sbin
./repldisc [-D binddn] [-w password] [-n] [-a] [-t] [-p port] [-e SSL port]
[-j file] [-J file] [-W keypasswd] [-K keydbpath] [-N certname] [-P certdbpath]
[-b ReplicaRoot] -s/-S HostSpec


Note

repldisc takes the host specification from the replication agreement, unless otherwise specified at the command line.


Note that the HostSpec option includes the -s option

Options

repldisc takes the following options:

Table 1-26  Standard repldisc Options 

Option

Meaning

-a

Specifies that only the arcs between pairs of connected hosts are printed. For more information, refer to the examples that follow.

Note: If the total line length of the output exceeds 80 characters, symbolic host names are used, accompanied by a legend. Otherwise, the full host name is printed. Using the -a option ensures that symbolic host names are not used.

-b

The suffix (replica root) that has been specified for replication. If -b is not specified, the topology for all suffixes is printed.

-D

The distinguished name with which to bind to the server. This parameter is optional if the server is configured to support anonymous access. If a DN is specified in the ServerSpec, this overrides the -D option.

HostSpec

HostSpec is defined as:

[bindDN[:[password]]@]host[:port]

For example
"cn=directory manager":mypword@myServer:5201

-j

If specifying the default password at the command line poses a security risk, the password can be stored in a file. The -j option specifies this file.

-n

Specifies that the tool should not run in interactive mode. Running in interactive mode allows you to re-enter the bindDN, password and host and port, if the tool encounters a bind error.

-p

The TCP port used by Directory Server. The default port is 389. If a port is specified in the ServerSpec, this overrides the -p option.

ServerSpec

The server specification. This can be:

-s/-S HostSpec [-c/-C HostSpec -c/-C HostSpec ...]

or

-c/-C HostSpec [-s/-S HostSpec -s/-S HostSpec ...]

where -s is the supplier replica and -c is the consumer replica. You can specify any number of supplier and consumer replicas in this list.

If you are using SSL, use -S and -C in the server specification. In addition, if you are using client authentication, HostSpec specifies the certificate name and key password, rather than the bind DN and password.

Note: If no -c option is specified, the -s HostSpec may refer to any server, either a consumer or a supplier.

-t

If used with the -a option, this option prints the mode of transport (SSL or CLEAR).

-w

The password associated with the distinguished name specified by the -D option. If a password is specified in the ServerSpec, this overrides the -w option.


Note

When identifying hosts, you must use either symbolic names or IP addresses for all hosts. Using a combination of the two can cause problems.


SSL Options

You can use the following options to specify use of LDAPS when communicating with Directory Server. You also use these options if you want to use certificate-based authentication. These options are valid only when LDAPS has been turned on and configured. For more information on certificate-based authentication and how to create a certificate database for use with LDAP clients, refer to Chapter 11, “Managing SSL” in the Directory Server Administration Guide.

You must specify the Directory Server’s encrypted port when you use the SSL options:

Table 1-27  SSL Options 

Option

Meaning

-e

The default SSL port.

-J

This option has the same function as the -j option, for the key password.

-K

Specifies the location of the key database used for certificate-based client authentication.

-N

Specifies the certificate name to use for certificate-based client authentication. For example, -N Server-Cert. If this option is specified, the -W option is required.

-P

Specifies the location of the certificate database.

-W

Specifies the password for the certificate database identified by the -P option. For example, -W serverpassword.


Caution

When running the replication monitoring tools over SSL, the server on which you are running the tools must have a copy of all the certificates used by the other servers in the topology.


Examples
  1. repldisc output in a single master replication scenario.
  2. # ./repldisc -D "cn=directory manager" -w mypword -b o=rtest -s myserver:1389

    Topology for suffix: o=rtest

    Legend:
    ^ : Host on row sends to host on column.
    v : Host on row receives from host on column.
    x : Host on row and host on column are in MM mode.
    H1 : france.example.com:1389
    H2 : spain:1389
    H3 : portugal:389

       | H1 | H2 | H3 |
    ===+===============
    H1 |    | ^  |    |
    ---+---------------
    H2 | v  |    | ^  |
    ---+---------------
    H3 |    | v  |    |
    ---+---------------

  3. The same example as above, but using the -a and -t options.
  4. # ./repldisc -D "cn=directory manager" -w mypword -b o=rtest
    -s myserver:1389 -a -t

    Topology for suffix: o=rtest

    Legend:
    The direction of the replication is indicated with arrows.
    Single-master: suppliers appear on left, consumers on right (->).
    Multi-master : servers are shown linked by a double arrow (<->).

    france.example.com:1389 -> spain:1389 CLEAR
    spain:1389 -> portugal:389 CLEAR

  5. SSL example
  6. # ./repldisc -n -K ServerRoot/alias/slapd-S1-key3.db
      -P ServerRoot/alias/slapd-S1-cert7.db -W password -N
      "MyCertificate" -S "portugal:24211" -a -t

    Topology for suffix: o=rtest

    Legend:
    The direction of the replication is indicated with arrows.
    Single-master: suppliers appear on left, consumers on right (->).
    Multi-master : servers are shown linked by a double arrow (<->).

    spain:24210 -> portugal:24211 SSL

restart

Restarts Directory Server.

Syntax

directoryserver restart

Standalone

restart-slapd

Options

There are no options for this tool.

Exit Status

0: Server restarted successfully.

1: Server could not be started.

2: Server restarted successfully but was already stopped.

3: Server could not be stopped.

restart-admin

Restarts Administration Server.

Syntax

directoryserver restart-admin

Standalone

restart-admin

restoreconfig

By default, restores the most recently saved Administration Server configuration information to the NetscapeRoot suffix under the following directory:

ServerRoot/slapd-serverID/config

To restore the Administration Server configuration:

  1. Stop Directory Server
  2. Run directoryserver restoreconfig
  3. Restart Directory Server
  4. Restart the Administration Server for the changes to be taken into account.
Syntax

directoryserver restoreconfig

Standalone

restoreconfig

Options

There are no options for this tool.

sagt

Start SNMP proxy agent. For details, refer to the Directory Server Administration Guide.

Syntax

directoryserver sagt [-c CONFIG]

Standalone

sagt

Options

Table 1-28  sagt Option 

Option

Meaning

-c CONFIG

Specifies a file including the SNMP port on which the daemon listens, and the MIB trees and traps the proxy SNMP agent forwards. By default, the file is located in basedir/plugins/snmp/sagt.

saveconfig

Saves the Administration Server configuration information to the following directory:

ServerRoot/slapd-serverID/confbak

Directory Server must be running for this tool to work.

Syntax

directoryserver saveconfig

Standalone

saveconfig

Options

There are no options for this tool.

schema_push.pl

When schema modifications are made manually (by editing the .ldif files directly), this script should be run to update the modification time used by replication. This ensures that the modified schema are replicated to the consumers. Once the script has been run, you must restart the server to trigger the schema replication.

Syntax

ServerRoot/slapd-serverID/schema_push.pl

start

Starts Directory Server.

Syntax

directoryserver start

Standalone

start-slapd

Options

There are no options for this tool.

Exit Status

0: Server started successfully.

1: Server could not be started.

2: Server was already started.

start-admin

Restarts Administration Server.

Syntax

directoryserver start-admin

Standalone

start-admin

startconsole

Starts Server Console, enabling GUI-based management of compliant servers, such as Administration Server and Directory Server.

Syntax

directoryserver startconsole

Standalone

startconsole

stop

Stops Directory Server.

Syntax

directoryserver stop

Standalone

stop-slapd

Options

There are no options for this tool.

Exit Status

0: Server stopped successfully.

1: Server could not be stopped.

2: Server was already stopped.

stop-admin

Stops Administration Server.

Syntax

directoryserver stop-admin

Standalone

stop-admin

suffix2instance

Maps a suffix to a backend name.

Syntax

directoryserver suffix2instance {-s suffix}

Standalone

suffix2instance

Options

Table 1-29  suffix2instance Option 

Option

Meaning

-s

The suffix to be mapped to the backend.

sync-cds

Synchronizes the Directory Server product version information with the configuration directory server after upgrade.

Syntax

directoryserver sync-cds [-f credentials_file] | [-l log_file]

Standalone

None.

Options

Table 1-30  sync-cds Options 

Option

Meaning

-f credentials_file

Full path to the file containing bind credentials on two lines:

Admin Id: uid

Admin Password: password

Here, uid is the user ID for the configuration directory server administrator user, and password is the corresponding password.

-l log_file

Full path to the file in which to log the synchronization operation results.

unconfigure

Removes all Directory Server instances and configuration, including any changes made following configuration.

Syntax

directoryserver unconfigure

Standalone

None.

vlvindex

To run vlvindex , Directory Server must be stopped. The vlvindex tool creates virtual list view (VLV) indexes, known in the Directory Server console as Browsing Indexes. VLV indexes introduce flexibility in the way you view search results. Using VLV indexes, you can organize search results alphabetically or in reverse alphabetical order, and you can scroll through the list of results. VLV index configuration must already exist prior to running this tool.

Syntax

directoryserver vlvindex [-d debug_level] [-n backend_instance] [-s suffix] [-T VLVTag]

Standalone

vlvindex

Options

Table 1-31  vlvindex Options 

Option

Meaning

-d

Specifies the debug level to use during index creation. Debug levels are defined in nsslapd-errorlog-level (Error Log Level).

-n

Name of the database containing the entries to index.

-s

Name of the suffix containing the entries to index.

-T

VLV index identifier to use to create VLV indexes. You can use the console to specify VLV index identifier for each database supporting your directory tree, as described in the Directory Server Administration Guide. You can define additional VLV tags by creating them in LDIF, and adding them to the Directory Server configuration, as described in the Directory Server Administration Guide. In any case, we recommend you use the DN of the entry for which you want to accelerate the search sorting.


Note

You must specify either the -n or the -s option.




Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.