Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide

Directory Server Command-Line Tools

Most tasks you perform on DSCC can be performed using command-line tools. These tools enable you to manage Directory Server directly from the command line, and to manage your server by using scripts.

The main directory server commands are dsadm and dsconf. You can use these commands to perform backups, export to LDIF, manage certificates, and so on. For information about these commands, see the dsadm(1M) and dsconf(1M) man pages.

The dpconf, dsconf, dsmig, dsccmon, dsccreg, and dsccsetup are LDAP based commands so you must specify the user bind DN and password for these commands to authenticate. While the dpadm and dsadm commands operate on the instance files.

This section contains the following information about Directory Server command-line tools:

Location of Directory Server Commands

The Directory Server command-line tools are contained in a default installation directory:


install-path/ds6/bin

The directory for your installation depends on your operating system. Installation paths for all operating systems are listed in Default Paths and Command Locations.

Setting Environment Variables for dsconf

The dsconf command requires some options that you can preset by using environment variables. If you do not specify an option when using the command, or do not set the environment variable, the default setting is used. You can configure environment variables for the following options:

-D user DN

User bind DN. Environment variable: LDAP_ADMIN_USER. Default: cn=Directory Manager.

-w password-file

Password file for the user bind DN. Environment variable: LDAP_ADMIN_PWF. Default: Prompt for password.

-h host

Host name. Environment variable: DIRSERV_HOST. Default: local host.

-p LDAP-port

LDAP port number. Environment variable: DIRSERV_PORT. Default: 389.

-e, --unsecured

Specifies that dsconf should open a clear connection by default. Environment variable: DIRSERV_UNSECURED. If this variable is not set, dsconf opens a secure connection by default.

For more details, see the dsconf(1M) man page.

Comparison of dsadm and dsconf

The following table shows a comparison of the dsadm and dsconf commands.

Table 2–1 Comparison of the dsadm and dsconf Commands

 

dsadm Command

dsconf Command

Description 

Administration commands that must be run directly on the local host. For example:

  • Starting and stopping the server

  • Creating a server instance

Administration commands that can be run from a remote host. For example:

  • Enabling replication

  • Setting cache size

Notes 

The server must be stopped (except for the dsadm stop and dsadm info commands).

The server is identified by the server instance path (instance-path).

You must have OS access permissions to the server instance path. 

The server must be running.  

The server is identified by host name (-h) port (-p) or LDAPS secure port (-P).

If you do not specify a port number, dsconf uses the default port (389 for LDAP).

You must have LDAP access permissions to configuration data, for example, as the user cn=admin,cn=Administrators,cn=config.  

Obtaining Help for Using dsadm and dsconf

For complete information about how to use the dsadm and dsconf commands, see the dsadm(1M) and dsconf(1M) man pages.

Modifying Configuration Properties by Using dsconf

Many of the dsconf subcommands enable you to view and modify configuration properties.

For more information about individual properties, see the man page for that property. The man pages are in Sun Java System Directory Server Enterprise Edition 6.3 Man Page Reference.

Setting Multi-Valued Properties With dsconf

Certain Directory Server properties can take multiple values. The syntax to specify these values is as follows:


$ dsconf set-container-prop -h host -p port container-name \
 property:value1 property:value2

For example, to set multiple encryption ciphers for a server, use the following command:


$ dsconf set-server-prop -h host1 -p 1389 ssl-cipher-family:SSL_RSA_WITH_RC4_128_MD5 \
 ssl-cipher-family:SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA

To add a value to a multi-valued property that already contains values, use the following syntax:


$ dsconf set-container-prop -h host -p port container-name property+:value

To remove a value from a multi-valued property that already contains values, use the following syntax:


$ dsconf set-container-prop -h host -p port container-name property-:value

For example, in the scenario described previously, to add the SHA encryption cipher to the list of ciphers, run this command:


$ dsconf set-server-prop -h host1 -p 1389 \
 ssl-cipher-family+:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

To remove the MD5 cipher from the list, run this command:


$ dsconf set-server-prop -h host1 -p 1389 ssl-cipher-family-:SSL_RSA_WITH_RC4_128_MD5

Man Pages

The man pages provide descriptions of all commands and attributes used in Directory Server. In addition, the man pages show some useful examples of how to use the commands in deployment.

Legacy Tools

Legacy tools are included with the regular Directory Server tools for backwards compatibility. These tools are present but deprecated.