Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java(TM) System Directory Server 5.2 2005Q1 Administration Reference 

Chapter 1
Command-Line Tools Reference

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


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 Linux systems), and many individual standalone tools under the ServerRoot directory. Table 1-1 lists the subcommands and what they do.

For information about the commands, see the Administration Server Man Page Reference and the Directory Server Man Page Reference.

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 help

Gives help on using subcommands

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 the ldapsearch command provided by the Directory Server Resource Kit. 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.



Previous      Contents      Index      Next     


Copyright 2005 Sun Microsystems, Inc. All rights reserved.