Red Hat Training

A Red Hat training course is available for Red Hat Directory Server

Chapter 10. Command-Line Scripts

This chapter provides information on the scripts for managing Red Hat Directory Server, such as backing-up and restoring the database. Scripts are a shortcut way of executing the ns-slapd interface commands that are documented in Appendix A, Using the ns-slapd Command-Line Utilities.

10.1. Finding and Executing Command-Line Scripts

In Red Hat Directory Server 10, the scripts are located in the following directories:
  • The core scripts are located in the /usr/sbin/ and /usr/bin/ directories.
  • Scripts running on instances are stored in the /usr/sbin/ directory. Use the -Z instance_name option with the commands in order to set the instance the script should be executed on.


The /usr/lib64/dirsrv/slapd-instance/ directory previously used for command-line scripts is deprecated. However, until the instance-specific scripts are removed in a future Directory Server release, existing scripts in this directory are updated when running the --update command.
For further details and a list of scripts, see Chapter 10, Command-Line Scripts.
All the instance-specific scripts also exist in /usr/sbin/. All the other scripts are only located in /usr/bin/.
When scripts request either a directory name or a file name, always provide the absolute path. The scripts expect the dse.ldif file is located in the /etc/dirsrv/slapd-instance/ directory.
Table 10.1, “Shell Scripts” and Table 10.2, “Perl Scripts” list the available Directory Server scripts and specify their exact locations.